This repository has been archived by the owner on Aug 3, 2021. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 5
/
Copy pathMakefile
45 lines (37 loc) · 1.46 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
PRECISION ?= double
ifeq ($(MANAGED),1)
USERFLAGS += -D__MANAGED
endif
ifeq ($(DEBUG),1)
USERFLAGS += -g -G -lineinfo -D__CPU_CHECK
endif
ifeq ($(SCATTER),1)
USERFLAGS += -D__SCATTER
endif
ifeq ($(CPU_CHECK),1)
USERFLAGS += -D__CPU_CHECK
endif
ifeq ($(MOVING_WINDOW),1)
USERFLAGS += -D__MOVING_WINDOW
endif
ifeq ($(COMPUTE_GCF),1)
USERFLAGS += -D__COMPUTE_GCF
endif
USERFLAGS += -Xcompiler -fopenmp
all: degrid GPUDegrid.so
clean:
rm *.o
rm GPUDegrid.so
rm degrid
degrid: degrid.cu cucommon.cuh degrid_gpu.cuh degrid_gpu.o Defines.h
nvcc -arch=sm_35 -std=c++11 -DPRECISION=${PRECISION} $(USERFLAGS) -o degrid degrid.cu degrid_gpu.o
degrid_gpu.o: degrid_gpu.cu degrid_gpu.cuh cucommon.cuh Defines.h
nvcc -c -arch=sm_35 -std=c++11 $(USERFLAGS) -o degrid_gpu.o degrid_gpu.cu
degrid_gpu_pic.o: degrid_gpu.cu degrid_gpu.cuh cucommon.cuh Defines.h
nvcc -Xcompiler -fPIC -c -arch=sm_35 -std=c++11 $(USERFLAGS) -o degrid_gpu_pic.o degrid_gpu.cu
degrid-debug: degrid.cu degrid_gpu-debug.o cucommon.cuh Defines.h
nvcc -arch=sm_35 -std=c++11 -DPRECISION=${PRECISION} -g -G -lineinfo $(USERFLAGS) -o degrid-debug degrid_gpu-debug.o degrid.cu
degrid_gpu-debug.o: degrid_gpu.cu degrid_gpu.cuh cucommon.cuh Defines.h
nvcc -c -arch=sm_35 -std=c++11 -g -G -lineinfo $(USERFLAGS) -o degrid_gpu-debug.o degrid_gpu.cu
GPUDegrid.so: GPUDegrid.cpp degrid_gpu_pic.o
nvcc -std=c++11 -shared -Xcompiler -fPIC -I/usr/include/python2.7/ -lpython2.7 -o GPUDegrid.so GPUDegrid.cpp degrid_gpu_pic.o