Make clean using the SDK makefile deleted my c files Making cuda projects

Hi,

This is probably a really stupid question and I apologise for that but I was hoping someone can help me. I am using the makefile from the cuda SDK to compile my code. I am trying to compile a programme I wrote with a file main.c and a file second.cu holding the kernel. I did a make clean and the .c file was deleted. I am not particularly used to make files and probably missed something obvious but was wondering if anyone could tell me why? I have a make file in the directory where my code in which has the following lines:

EXECUTABLE :=cuda.prog
CUFILES :=second.cu
CCFILES :=main.c

ROOTDIR = path to nvidia SDK/C/common

include $(ROOTDIR)/common.mk

NVCCFLAGS += -arch sm_13 (Which sets double precision)

NVCCFLAGS += -Xptxas

This should compile the program. Unfortunately I have now lost about a days work because it seems to have deleted my host code. If anyone has any idea of why it did this I would appreciate it as I don’t want to lose everything again.

Thanks

Dean

Hi,

This is probably a really stupid question and I apologise for that but I was hoping someone can help me. I am using the makefile from the cuda SDK to compile my code. I am trying to compile a programme I wrote with a file main.c and a file second.cu holding the kernel. I did a make clean and the .c file was deleted. I am not particularly used to make files and probably missed something obvious but was wondering if anyone could tell me why? I have a make file in the directory where my code in which has the following lines:

EXECUTABLE :=cuda.prog
CUFILES :=second.cu
CCFILES :=main.c

ROOTDIR = path to nvidia SDK/C/common

include $(ROOTDIR)/common.mk

NVCCFLAGS += -arch sm_13 (Which sets double precision)

NVCCFLAGS += -Xptxas

This should compile the program. Unfortunately I have now lost about a days work because it seems to have deleted my host code. If anyone has any idea of why it did this I would appreciate it as I don’t want to lose everything again.

Thanks

Dean