61ccaf82623dcf41f8b6f17950ba8a500f5ae036
[RBC.git] / Makefile
1 CC=gcc
2 NVCC=nvcc
3 CCFLAGS=
4 NVCCFLAGS= --ptxas-options=-v -arch=sm_20
5 #other flags: -deviceemu -arch=sm_20 --compiler-bindir=/usr/bin/gcc-4.3
6 LINKFLAGS=-lcuda -lgsl -lgslcblas -lm
7 #other linkflags:
8 SOURCES=
9 CUSOURCES= driver.cu utils.cu utilsGPU.cu rbc.cu brute.cu kernels.cu kernelWrap.cu sKernel.cu sKernelWrap.cu
10 OBJECTS=$(SOURCES:.c=.o)
11 CUOBJECTS=$(CUSOURCES:.cu=.o)
12 EXECUTABLE=testRBC
13 all: $(SOURCES) $(CUSOURCES) $(EXECUTABLE)
14
15 $(EXECUTABLE): $(OBJECTS) $(CUOBJECTS)
16 $(NVCC) $(NVCCFLAGS) $(OBJECTS) $(CUOBJECTS) -o $@ $(LINKFLAGS)
17
18 %.o:%.c
19 $(NVCC) $(NVCCFLAGS) -c $+
20
21 %.o:%.cu
22 $(NVCC) $(NVCCFLAGS) -c $+
23
24 clean:
25 rm -f *.o
26 rm -f $(EXECUTABLE)