Making CUDA 8 Toolkit example work on LinuxMint - how to fix

LinuxMint 18 is bascially Ubuntu, with enhancements. However the makefile module in the CUDA 8 toolkit examples fails to detect it as an ubuntu distribution, therefore it fails to find the graphics libraries.

To fix this you need to change the test for ubuntu in the file

Original line:

UBUNTU = $(shell echo $(DISTRO) | grep -i ubuntu      >/dev/null 2>&1; echo $?)

Modified line:

UBUNTU = $(shell echo $(DISTRO) | grep -i linuxmint      >/dev/null 2>&1; echo $?)

A more permanent fix will be for the CUDA Toolkit developers to include “linuxmint” in their test for ubuntu.

You will have to do this on all the copies of :(