-
Notifications
You must be signed in to change notification settings - Fork 8
/
Copy pathMakefile
executable file
·34 lines (26 loc) · 967 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
#Make sure that this points to the cuda install you want to use
CUDA_DIRECTORY=/usr/local/cuda
CC=$(CUDA_DIRECTORY)/bin/nvcc
#Volta
ARCH=-gencode=arch=compute_70,code=sm_70
#Pascal
#ARCH=-gencode=arch=compute_60,code=sm_60
CFLAGS=-c -use_fast_math -lineinfo -O2 -std=c++11 $(ARCH) -I$(CUDA_DIRECTORY)/include
#If you want to use the matlab hook, please specify the compute capability of your GPU below
MATLABARCH=-gencode=arch=compute_60,code=sm_60
MATFLAGS=-ptx -src-in-ptx -use_fast_math -lineinfo -std=c++11 $(MATLABARCH) -O2 -I$(CUDA_DIRECTORY)/include
LDFLAGS=-L$(CUDA_DIRECTORY)/lib64 -lcufft
SOURCES=STOMP.cu
HEADERS=STOMP.h
OBJECTS=STOMP.o
EXECUTABLE=STOMP
all: $(SOURCES) $(EXECUTABLE)
best: $(SOURCES) $(BESTEX)
matlab: $(SOURCES) $(HEADERS)
$(CC) $(MATFLAGS) $(SOURCES)
$(EXECUTABLE): $(OBJECTS) $(SOURCES) $(HEADERS)
$(CC) $(LDFLAGS) $(OBJECTS) -o $@
STOMP.o: $(SOURCES) $(HEADERS)
$(CC) $(CFLAGS) STOMP.cu -o $@
clean:
rm -f *.o STOMP