Rules for Makefile

I don’t have much experience with makefiles and I can’t seem to include rules for compiling the CUDA files. In my code, I have an “ifdef TEST”. What changes do I have to make to the SDK template makefile so that I could do something like “make test=1” and have the TEST portion of the code included?

you have in NVIDIA_CUDA_SDK/common a file called common.mk. It’s a makefile. Remember, if you put “make -n” you can view all lines that should be executed.

Thanks! I found what I needed in that file. To my makefile, I added
ifeq ($(test),1)
NVCCFLAGS += -DTEST
endif