Cluster der kan alt/makefile script

From Teknologisk videncenter
< Cluster der kan alt
Revision as of 08:57, 31 October 2014 by Minoo (talk | contribs) (Created page with "<source lang=cli> 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 := in...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
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 *~