updated text files
[RBC.git] / Makefile
1 CC=gcc
2 NVCC=nvcc
3 NVCCFLAGS=-O3
4 # sometimes useful flags: -arch=sm_20 --ptxas-options=-v -g -G
5 # Note that you will need to specify an arch (as above) if you wish to use
6 # double precision
7 LINKFLAGS=-lcuda -lm
8 CUSOURCES=driver.cu utils.cu utilsGPU.cu rbc.cu brute.cu kernels.cu kernelWrap.cu sKernel.cu sKernelWrap.cu
9 CUOBJECTS=$(CUSOURCES:.cu=.o)
10 EXECUTABLE=testRBC
11 all: $(CUSOURCES) $(EXECUTABLE)
12
13 $(EXECUTABLE): $(OBJECTS) $(CUOBJECTS)
14 $(NVCC) $(NVCCFLAGS) $(OBJECTS) $(CUOBJECTS) -o $@ $(LINKFLAGS)
15
16 %.o:%.c
17 $(NVCC) $(NVCCFLAGS) -c $+
18
19 %.o:%.cu
20 $(NVCC) $(NVCCFLAGS) -c $+
21
22 clean:
23 rm -f *.o
24 rm -f $(EXECUTABLE)