Updated makefile to compile for dynamic parallelism

We were missing the -lcudadevrt flag to support dynamic parallelism, but
I needed to change the program template code to handle the different
link flags to the two different compilers.