summaryrefslogtreecommitdiff
path: root/TS/baselines/gpu/Makefile
blob: 6122dd0cab04b0ffaca4b7fb68247a4ae314da82 (plain)
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
CUDA_DIRECTORY=/usr/local/cuda
CC=$(CUDA_DIRECTORY)/bin/nvcc
#ARCH=-gencode=arch=compute_61,code=sm_61 -gencode=arch=compute_60,code=sm_60 -gencode=arch=compute_52,code=sm_52 -gencode=arch=compute_37,code=sm_37 -gencode=arch=compute_35,code=sm_35 -gencode=arch=compute_30,code=sm_30 -gencode=arch=compute_20,code=sm_20   -gencode=arch=compute_50,code=sm_50
ARCH=-gencode=arch=compute_70,code=sm_70
CFLAGS=-c -std=c++11 $(ARCH) -O3 -I$(CUDA_DIRECTORY)/include 
LDFLAGS=-L$(CUDA_DIRECTORY)/lib64 -lcufft -lcuda
#CFLAGS=-c -std=c++11 $(ARCH) -O3  
SOURCES=STREAMP.cu
#LDFLAGS= -lcufft -lcuda
OBJECTS=STREAMP.o
EXECUTABLE=STREAMP

all: $(SOURCES) $(EXECUTABLE)

matlab:
	nvcc $(MATFLAGS) $(SOURCES)
    
$(EXECUTABLE): $(OBJECTS)  $(SOURCES)
	$(CC) $(LDFLAGS) $(OBJECTS) -o $@
	

STREAMP.o: $(SOURCES)
	$(CC) $(CFLAGS) STREAMP.cu -o $@
	
clean:
	rm -f *.o STREAMP