1# 2# 3# 4 5SRC_C = ../../../common/util.c \ 6 ../../../common/cuda/assert_cuda.c \ 7 main.c 8 9SRC_CPP = sort.cpp \ 10 11SRC_CU = ../sm_35/u32/hs_cuda_u32.cu \ 12 ../sm_35/u64/hs_cuda_u64.cu 13 14OBJ_C = $(addsuffix .o,$(basename $(notdir $(SRC_C)))) 15 16OBJ_CPP = $(addsuffix .o,$(basename $(notdir $(SRC_CPP)))) 17 18# 19# 20# 21 22NVCC_OPTS = -std=c++11 -res-usage -O2 -D NDEBUG 23 24 25NVCC_ARCH = -gencode arch=compute_37,code=sm_37 \ 26 -gencode arch=compute_60,code=sm_60 \ 27 -gencode arch=compute_61,code=sm_61 \ 28 -gencode arch=compute_70,code=sm_70 29 30# NVCC_ARCH = -gencode arch=compute_37,code=sm_37 31 32# 33# 34# 35 36GCC_OPTS = -O2 -D NDEBUG 37GPP_OPTS = -O2 -D NDEBUG -std=c++11 38 39# 40# 41# 42 43hs_bench_cuda: $(OBJ_C) $(OBJ_CPP) $(SRC_CU) 44 nvcc $(NVCC_ARCH) $(NVCC_OPTS) -I ../../.. -o $@ $^ 45 46$(OBJ_C): $(SRC_C) 47 gcc $(GCC_OPTS) -c $^ -I ../../.. -I .. -I $(CUDA_HOME)/include 48 49$(OBJ_CPP): $(SRC_CPP) 50 g++ $(GPP_OPTS) -c $^ -I ../../../ -I $(CUDA_HOME)/include 51 52 53.PHONY: clean 54clean: 55 rm -f $(OBJ_C) $(OBJ_CPP) hs_bench_cuda 56