1 # 2 # 3 # 4 5 SRC_C = ../../../common/util.c \ 6 ../../../common/cuda/assert_cuda.c \ 7 main.c 8 9 SRC_CPP = sort.cpp \ 10 11 SRC_CU = ../sm_35/u32/hs_cuda_u32.cu \ 12 ../sm_35/u64/hs_cuda_u64.cu 13 14 OBJ_C = $(addsuffix .o,$(basename $(notdir $(SRC_C)))) 15 16 OBJ_CPP = $(addsuffix .o,$(basename $(notdir $(SRC_CPP)))) 17 18 # 19 # 20 # 21 22 NVCC_OPTS = -std=c++11 -res-usage -O2 -D NDEBUG 23 24 25 NVCC_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 36 GCC_OPTS = -O2 -D NDEBUG 37 GPP_OPTS = -O2 -D NDEBUG -std=c++11 38 39 # 40 # 41 # 42 43 hs_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 54 clean: 55 rm -f $(OBJ_C) $(OBJ_CPP) hs_bench_cuda 56