-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
33 lines (27 loc) · 1.24 KB
/
Makefile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
CLSOURCES=$(CLDIR)/CLMonte.cpp $(CLDIR)/CLMonte_goldstandard.c
CLSOURCES_newSpin=$(CLDIR)/CLMonte_newSpin.cpp $(CLDIR)/CLMonte_goldstandard.c
CUDASOURCES=$(CUDADIR)/CUDAMC.cu
CLOUT=CLMonte
CLOUT_newSpin=CLMonte_newSpin
CUDAOUT=CUDAMC
CLFLAGS =-O3 -g -o
CUDAFLAGS=-O3 -o
CLLIB=-l OpenCL
CUDAARCH=-arch=sm_11
SRCDIR=SRC
CUDADIR=$(SRCDIR)/CUDA_SRC
CLDIR=$(SRCDIR)/CLMonte_SRC
CLDIR_UNITTESTS=$(SRCDIR)/CLMonte_SRC/UnitTests
UNITTESTS = unitTests
UTSOURCES=$(CLDIR_UNITTESTS)/CLMonteUT.cpp
all: $(CLOUT) $(CUDAOUT)
$(CLOUT): $(CLDIR)/CLMonte.cpp $(CLDIR)/CLMonteTransport.cl $(CLDIR)/CLMonte_goldstandard.c $(CLDIR)/defines.h $(CLDIR)/CLMonte.h
g++ $(CLSOURCES) $(CLFLAGS) $(CLOUT) $(CLLIB)
$(CLOUT_newSpin): $(CLDIR)/CLMonte_newSpin.cpp $(CLDIR)/CLMonteTransport_newSpin.cl $(CLDIR)/CLMonte_goldstandard.c $(CLDIR)/defines.h $(CLDIR)/CLMonte.h
g++ $(CLSOURCES_newSpin) $(CLFLAGS) $(CLOUT_newSpin) $(CLLIB)
$(CUDAOUT): $(CUDADIR)/CUDAMC.cu $(CUDADIR)/CUDAMCtransport.cu $(CUDADIR)/CUDAMC_goldstandard.c
nvcc $(CUDAARCH) $(CUDASOURCES) $(CUDAFLAGS) $(CUDAOUT)
$(UNITTESTS): $(CLDIR_UNITTESTS)/CLMonteUT.cpp $(CLDIR_UNITTESTS)/CLMonteUT.cl
g++ $(UTSOURCES) $(CLFLAGS) $(UNITTESTS) $(CLLIB)
clean:
rm -rf *.txt $(CLOUT) $(CUDAOUT) $(UNITTESTS) $(CLOUT_newSpin)