forked from sbeamer/gapbs
-
Notifications
You must be signed in to change notification settings - Fork 5
/
Makefile
44 lines (31 loc) · 793 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
38
39
40
41
42
43
44
# See LICENSE.txt for license details.
CXX_FLAGS += -std=c++11 -O3 -Wall
PAR_FLAG = -fopenmp
ifneq (,$(findstring icpc,$(CXX)))
PAR_FLAG = -openmp
endif
ifneq (,$(findstring sunCC,$(CXX)))
CXX_FLAGS = -std=c++11 -xO3 -m64 -xtarget=native
PAR_FLAG = -xopenmp
endif
ifneq ($(SERIAL), 1)
CXX_FLAGS += $(PAR_FLAG)
endif
KERNELS = bc bfs cc cc_afforest pr sssp tc
KERNELS_CUDA = cc_cuda
SUITE = $(KERNELS) converter
.PHONY: all
all: $(SUITE)
.PHONY: cuda
cuda: $(KERNELS_CUDA)
%_cuda: device/%.cu src/*.h
nvcc -arch sm_60 -O3 -std=c++11 -Isrc -Ideps/cub -Xcompiler -fopenmp -Xcompiler -Wall $< -o $@
% : src/%.cc src/*.h
$(CXX) $(CXX_FLAGS) $< -o $@
# Testing
include test/test.mk
# Benchmark Automation
include benchmark/bench.mk
.PHONY: clean
clean:
rm -f $(SUITE) test/out/*