forked from sbeamer/gapbs
-
Notifications
You must be signed in to change notification settings - Fork 1
/
Makefile
52 lines (38 loc) · 954 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
45
46
47
48
49
50
51
52
# See LICENSE.txt for license details.
CXX_FLAGS += -std=c++11 -O3 -Wall -I$(RISCY_HOME)/riscv_custom
PAR_FLAG = -fopenmp
BUILD_DIR := build/x86
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
ifdef RISCV
CXX = riscv64-unknown-linux-gnu-g++
CXX_FLAGS += -static
BUILD_DIR := build/riscv
endif
ifdef USE_RELAXED_ATOMICS
BUILD_DIR := $(BUILD_DIR)-relax
CXX_FLAGS += -DUSE_RELAXED_ATOMICS
endif
KERNELS = bc bfs cc cc_sv pr sssp tc
SUITE = $(addprefix $(BUILD_DIR)/,$(KERNELS) converter)
.PHONY: all
all: $(SUITE)
$(SUITE): $(BUILD_DIR)/% : src/%.cc src/*.h | $(BUILD_DIR)
$(CXX) $(CXX_FLAGS) $< -o $@
$(BUILD_DIR):
mkdir -p $@
# Testing
include test/test.mk
# Benchmark Automation
include benchmark/bench.mk
.PHONY: clean
clean:
rm -f $(SUITE) test/out/*