C++ and CUDA Makefile In need of help in order to write a makefile for C++ & CUDA

Good Evening.
As a part of my research, I have to develop a system that consists of C++ source code, and NVIDIA CUDA code. To be specific, my project has the following files:

and the following CUDA file
I have installed the CUDA toolkit 3.2 on Ubuntu 10.04 (32 bit), on the default location. Can anyone please help me with the makefile? :thanks:

If you use a tool like Eclipse it will do most of the makefile maintenance for you.

But if you must write one, try here:


Remember you need to compile .cc files with gcc (which GNU make knows about) and .cu files with nvcc
(which you will need to write as an explicit rule).

Also, you will avoid problems by not starting your file names with ‘-’