-
Notifications
You must be signed in to change notification settings - Fork 1
/
Makefile
39 lines (25 loc) · 791 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
INC := -I${CUDA_HOME}/include
LIB := -L${CUDA_HOME}/lib64 -lcudart -lcuda -lcufft
# -lfftw3f -lgsl -lgslcblas
# use this compilers
# g++ just because the file write
GCC = g++
NVCC = ${CUDA_HOME}/bin/nvcc
NVCCFLAGS = -O3 -arch=sm_70 --ptxas-options=-v -Xcompiler -Wextra -lineinfo
GCC_OPTS =-O3 -Wall -Wextra $(INC)
ANALYZE = SKA_degrid.exe
ifdef reglim
NVCCFLAGS += --maxrregcount=$(reglim)
endif
ifdef fastmath
NVCCFLAGS += --use_fast_math
endif
all: clean analyze
analyze: SKA_degrid.o GPU_SKA_degrid.o Makefile
$(NVCC) -o $(ANALYZE) SKA_degrid.o GPU_SKA_degrid.o $(LIB) $(NVCCFLAGS)
GPU_SKA_degrid.o: timer.h utils_cuda.h
$(NVCC) -c -dc GPU_SKA_degrid.cu $(NVCCFLAGS)
SKA_degrid.o: SKA_degrid.cpp
$(GCC) -c SKA_degrid.cpp $(GCC_OPTS)
clean:
rm -f *.o *.~ $(ANALYZE)