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:
-MyMatrix.h
-MyMatrix.cpp
-MyVector.h
-MyVector.cpp
-ObjectFileClass.h
-ObjectFileClass.cpp
-TriangleFace.h
-TriangleFace.cpp
-Main.cpp

and the following CUDA file
-gpu_Di.cu
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:

http://www.gnu.org/software/make/manual/make.html
http://www.metalshell.com/view/tutorial/120/

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 ‘-’