Cluster der kan alt/makefile script

From Teknologisk videncenter
Jump to: navigation, search
CC := g++
CUDACC := /usr/local/cuda-6.5/bin/nvcc
LINKER := /usr/local/cuda-6.5/bin/nvcc
CCFLAGS := -Wall
CUDAFLAGS := -arch sm_21
LINKFLAGS := -link
CCSRC := integrateMain.c
CUDASRC := integrate.cu
INC := 
TARGET := integrate

$(TARGET) : $(patsubst %.c, %.o, $(CCSRC)) $(patsubst %.cu, %.o, $(CUDASRC))
	$(LINKER) $(LINKFLAGS) -o $@ $^

%.o : %.c $(INC)
	$(CC) $(CCFLAGS) -c -o $@ $<

%.o : %.cu $(INC)
	$(CUDACC) $(CUDAFLAGS) -c -o $@ $<

clean :
	rm -f *.o *~