-
Notifications
You must be signed in to change notification settings - Fork 8
Expand file tree
/
Copy pathmakefile
More file actions
69 lines (51 loc) · 2.18 KB
/
makefile
File metadata and controls
69 lines (51 loc) · 2.18 KB
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
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
compiler = $(shell which nvcc)
debug = -g -G -lineinfo
arch = -arch=sm_35
oflags = $(arch) -Xptxas="-v" -I inc -dc -D_FORCE_INLINES
objDir = bin/
sources = $(wildcard src/*.cu)
#objects = $(patsubst src%, $(objDir)%, $(patsubst %.cu, %.o, $(sources)))
objects = GPUbounce.o centermass.o postscriptinit.o PressureKernels.o\
propagatebound.o propagate.o volume.o BondKernels.o
linkObjects = $(patsubst %, $(objDir)%, $(objects))
eflags = $(arch) -o $(objDir)/"CellDiv" $(linkObjects) bin/jsoncpp.o -lm -lcurand
opt = -O3
CELLSIM3D_ROOT = $(PWD)
debug: opt= -O0
debug: oflags += $(debug)
debug: eflags += $(debug)
debug: CellDiv
oflags += $(opt)
eflags += $(opt)
# $(objects): bin/%.o : src/%.cu
# @mkdir -p $(@D)
# $(compiler) $(oflags) -c $< -o $@
$(objDir)centermass.o: src/centermass.cu
$(compiler) $(oflags) -c src/centermass.cu -o $(objDir)centermass.o
# NeighbourSearch.o: src/NeighbourSearch.cu
# $(compiler) $(oflags) -c src/NeighbourSearch.o
$(objDir)postscriptinit.o: src/postscriptinit.cu
$(compiler) $(oflags) -c src/postscriptinit.cu -o $(objDir)postscriptinit.o
$(objDir)PressureKernels.o: src/PressureKernels.cu
$(compiler) $(oflags) -c src/PressureKernels.cu -o $(objDir)PressureKernels.o
$(objDir)propagatebound.o: src/propagatebound.cu
$(compiler) $(oflags) -c src/propagatebound.cu -o $(objDir)propagatebound.o
$(objDir)propagate.o: src/propagate.cu
$(compiler) $(oflags) -c src/propagate.cu -o $(objDir)propagate.o
$(objDir)volume.o : src/volume.cu
$(compiler) $(oflags) -c src/volume.cu -o $(objDir)volume.o
$(objDir)BondKernels.o : src/BondKernels.cu
$(compiler) $(oflags) -c src/BondKernels.cu -o $(objDir)BondKernels.o
$(objDir)GPUbounce.o : src/GPUbounce.cu
$(compiler) $(oflags) -c src/GPUbounce.cu -o $(objDir)GPUbounce.o
CellDiv: $(linkObjects)
$(compiler) $(eflags)
echo "export PYTHONPATH=${CELLSIM3D_ROOT}/scripts/:${PYTHONPATH}" > $(objDir)CellSim3D.rc
echo "export PATH=${CELLSIM3D_ROOT}/bin:${PATH}" >> $(objDir)CellSim3D.rc
echo "${CELLSIM3D_ROOT}"
# Third party libraries
$(objDir)jsoncpp.o: src/utils/jsoncpp.cpp inc/json/json.h
$(compiler) $(oflags) -c src/utils/jsoncpp.cpp -o $(objDir)/jsoncpp.o
.PHONY: clean
clean:
rm -f $(objDir)/CellDiv $(linkObjects)