forked from dpasztor11/CBA_CANON
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
executable file
·43 lines (32 loc) · 1.66 KB
/
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
FLAGS_COMMON = -std=c++17 -pedantic -Wall -Wextra -fmax-errors=3
FLAGS_DEBUG = -g -O0 -DDEBUG -DBA_GRAPH_DEBUG $(FLAGS_COMMON)
FLAGS_RELEASE = -O3 -ltbb $(FLAGS_COMMON)
FINDING_CBAS_TARGETS = graphJoin graphJoin2 generateCSKSolutions generateCSKSolutions2
EQUIVALENCE_GENERATION_TARGETS = generateCSKEq generateCEqCSEq
EQUIVALENCE_GENERATION_OLD_TARGETS = generatefeasibleCBA generatefeasibleCBA_parallel
OTHER_TARGETS = unfoundCsEq generateCskPoset
define generate_compile_rule
$(2): | createBuildFolders/$(1)
g++ $(FLAGS_RELEASE) src/$(1)/$(2).cpp -o build/$(1)/$(2).out -ltbb
./build/$(1)/$(2).out
endef
# Generates rules for all targets
$(foreach target, $(FINDING_CBAS_TARGETS), $(eval $(call generate_compile_rule,findingCBAs,$(target))))
$(foreach target, $(EQUIVALENCE_GENERATION_TARGETS), $(eval $(call generate_compile_rule,EquivalenceGeneration,$(target))))
$(foreach target, $(EQUIVALENCE_GENERATION_OLD_TARGETS), $(eval $(call generate_compile_rule,EquivalenceGeneration/old,$(target))))
$(foreach target, $(OTHER_TARGETS), $(eval $(call generate_compile_rule,other,$(target))))
createBuildFolders/%:
mkdir -p build/$*
test:
g++ $(FLAGS_DEBUG) test_colouring_bit_array_canon.cpp -o build/test.out
./build/test.out
test_kempe:
g++ $(FLAGS_DEBUG) test_kempe.cpp -o build/test_kempe.out
./build/test_kempe.out
test_reduced:
g++ $(FLAGS_DEBUG) tests/test_getReducedComplement.cpp -o build/test_getReducedComplement.out
./build/test_getReducedComplement.out
test_is_kempe_closed_union:
g++ $(FLAGS_DEBUG) tests/test_is_kempe_closed_union.cpp -o build/test_is_kempe_closed_union.out
./build/test_is_kempe_closed_union.out
.PHONY: test 5poles test_kempe createBuildFolders/%