On Sat, Jun 27, 2009 at 05:33, Ralf Wildenhues<ralf.wildenh...@gmx.de> wrote:
Ralf > Why not name the product file CudaChisq.c rather than CudaChisq.cu.c? > The problem here is that the other half of the circle comes from the > make-internal rule `%: %.c' for compiling single-source programs. > I guess you can also avoid it with `make -r', but that may have other, > unwanted consequences. > > (Note also that using $< in target rules is not portable to non-GNU > make). Is there a more portable version? > Here's what I would do: > > NVCC = nvcc > NVCFLAGS = -cuda --host-compilation=c > SUFFIXES = .cu .c > .cu.c: > $(NVCC) $(NVCFLAGS) $(INCLUDES) $(CPPFLAGS) --output-file $@ $< > > and then list *.cu files in automake *_SOURCES variables instead of the > *.c files. You can list *.c files in EXTRA_DIST if you want to have > them distributed (which implies that the output of nvcc should be > portable, which I don't know whether it is the case). > > Hope that helps. Thanks, that's got rid of the warning! Cheers Adam