forked from snytav/atom
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
executable file
·52 lines (38 loc) · 1.39 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
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
LD=mpicxx
CUDACC=nvcc
CXX=mpicxx
CPP=g++
CUDA=/usr/local/cuda
CUDALIB=$(CUDA)/lib64
LDFLAGS= -lm -L$(CUDALIB) -arch=sm_35
#CUDAFLAGS= --maxrregcount=128 -arch=sm_35 --ptxas-options=-v -I/usr/local/cuda-7.5/include/
CUDAFLAGS= -arch=sm_35 -lineinfo --maxrregcount=128 -g -I$(CUDA)/include/ #--relocatable-device-code=true
CUDALIBS= -g -L$(CUDALIB) -lcuda -lcudart #-lthrust
MPIFLAGS=
CFLAGS=
OBJ = main.o mpi_shortcut.o service_functions.o compare.o maxwell.o load_data.o archAPI.o
#plasma.o
main.o: main.cu $(DEPS)
$(CUDACC) -g -c -o $@ $< $(CUDAFLAGS)
kernels.o: kernels.cu $(DEPS)
$(CUDACC) -g -c -o $@ $< $(CUDAFLAGS) --relocatable-device-code=true
#compare.o: compare.cu $(DEPS)
# $(CUDACC) -g -c -o $@ $< $(CUDAFLAGS)
load_data.o: load_data.cu $(DEPS)
$(CUDACC) -g -c -o $@ $< $(CUDAFLAGS)
service_functions.o: service_functions.cu $(DEPS)
$(CUDACC) -g -c -o $@ $< $(CUDAFLAGS)
archAPI.o: archAPI.cu $(DEPS)
$(CUDACC) -g -c -o $@ $< $(CUDAFLAGS)
#kernels.o: kernels.cu $(DEPS)
# $(CUDACC) -g -c -o $@ $< $(CUDAFLAGS)
#plasma.o: plasma.cu $(DEPS)
# $(CUDACC) -g -c -o $@ $< $(CUDAFLAGS)
%.o: %.cxx $(DEPS)
$(CXX) -g -c -o $@ $< $(MPIFLAGS)
%.o: %.cpp $(DEPS)
$(CPP) -g -c -o $@ $< $(CBFLAGS)
all: $(OBJ)
$(LD) -g -o $@ $^ $(CFLAGS) $(DBFLAGS) $(CUDALIBS)
clean:
rm *.o all