Need help with the Makefile Compiling C source using the makefile

I have a header file timing.h and corresponding timing.c in the ./timing directory. I have included in the header in the .cu file. How do I edit the Makefile so as to compile the timing.c too? I tried adding the file under CFILES,

CFILES		:= \

	timing/timing.c\

But it gives the following error:

make: *** No rule to make target `obj/release/timing.c.o', needed by `../../bin/linux/release/u-list'.  Stop.

I’m not really good at using Makefiles, as you probably can tell.

Oh, and I’m fully aware that CUDA provides its own timing routines.

because you can’t put the file in other folder. the makefile called common.mk, which is in NVIDIA_CUDA_SDK/common, catch directly a file into a variable OBJ.

Yes, you can do it – just not as-is.

Read the documentation for the vpath directive / VPATH variable in GNU manual or pmake manpage.

Have you found how to use VPATH together with the Makefile to enable files to be located in subfolders, and if so could you please explain?

The Makefile is a small nightmare to make sense of.