-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathMakefile
40 lines (29 loc) · 816 Bytes
/
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
34
35
36
37
38
39
40
CUDACC = nvcc
MPICXX=mpicxx
CXX=g++
CUDAFLAGS=
#CUDAFLAGS=--maxrregcount=128
DEBUGFLAGS=-g
CUDALDFLAGS=-L/usr/local/cuda/lib64/ -lcuda -lcudart -lm -lnvToolsExt
LDFLAGS=-fopenmp
FILES = params.o main.o read_particles.o init.o mpi_shortcut.o archAPI.o memory_control.o
OUT_EXE = all
all: $(FILES)
$(MPICXX) -o $(OUT_EXE) $(FILES) $(LDFLAGS)
main.o:
$(MPICXX) -c $(CUDAFLAGS) $(DEBUGFLAGS) main.cpp
read_particles.o:
$(MPICXX) -c $(DEBUGFLAGS) read_particles.cxx
mpi_shortcut.o:
$(MPICXX) -c $(DEBUGFLAGS) mpi_shortcut.cxx
params.o:
$(MPICXX) -c $(DEBUGFLAGS) params.cxx
archAPI.o:
$(MPICXX) -c $(DEBUGFLAGS) archAPI.cxx
memory_control.o:
$(MPICXX) -c $(DEBUGFLAGS) memory_control.cxx
init.o:
$(CXX) -c $(DEBUGFLAGS) init.cpp
clean:
rm -f *.o core $(OUT_EXE)
rebuild: clean build