updated readme/version.txt
[RBC.git] / Makefile
1 CC=gcc
2 NVCC=nvcc
3 CCFLAGS=
4 NVCCFLAGS=
5 #other flags: -deviceemu -arch=sm_20 --ptxas-options=-v
6 #These are useful when debugging sometimes.
7 LINKFLAGS=-lcuda -lm
8 #other linkflags: -lgsl -lgslcblas
9 # lgsl and lgslcblas are required if you want to use the GSL.
10 SOURCES=
11 CUSOURCES= driver.cu utils.cu utilsGPU.cu rbc.cu brute.cu kernels.cu kernelWrap.cu sKernel.cu sKernelWrap.cu
12 OBJECTS=$(SOURCES:.c=.o)
13 CUOBJECTS=$(CUSOURCES:.cu=.o)
14 EXECUTABLE=testRBC
15 all: $(SOURCES) $(CUSOURCES) $(EXECUTABLE)
16
17 $(EXECUTABLE): $(OBJECTS) $(CUOBJECTS)
18 $(NVCC) $(NVCCFLAGS) $(OBJECTS) $(CUOBJECTS) -o $@ $(LINKFLAGS)
19
20 %.o:%.c
21 $(NVCC) $(NVCCFLAGS) -c $+
22
23 %.o:%.cu
24 $(NVCC) $(NVCCFLAGS) -c $+
25
26 clean:
27 rm -f *.o
28 rm -f $(EXECUTABLE)