-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
39 lines (27 loc) · 1.15 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
# compilation flags
CCX_FLAGS=-std=c++17 -O3 -fstrict-aliasing -march=native -funroll-loops
CCX=g++
# directory containing executables
OUT_DIR = exec
# makedir command
MKDIR_P = mkdir -p
# main executables
EXECS = $(OUT_DIR)/gen-dfa.x $(OUT_DIR)/gen-dfa-file.x $(OUT_DIR)/gen-dfa-dot.x $(OUT_DIR)/gen-dfa-bin.x $(OUT_DIR)/gen-dfa-bin-64.x
# targets not producing a file declared phony
.PHONY: build clean
build: ${OUT_DIR} $(EXECS)
${OUT_DIR}:
${MKDIR_P} ${OUT_DIR}
$(OUT_DIR)/gen-dfa.x: internal/cons-spa-WDFA-gen.cpp
$(CCX) $(CCX_FLAGS) -o $@ internal/cons-spa-WDFA-gen.cpp
$(OUT_DIR)/gen-dfa-file.x: internal/cons-spa-WDFA-gen.cpp
$(CCX) $(CCX_FLAGS) -o $@ internal/cons-spa-WDFA-gen.cpp -DOFILE
$(OUT_DIR)/gen-dfa-dot.x: internal/cons-spa-WDFA-gen.cpp
$(CCX) $(CCX_FLAGS) -o $@ internal/cons-spa-WDFA-gen.cpp -DDOT
$(OUT_DIR)/gen-dfa-bin.x: internal/cons-spa-WDFA-gen-bin.cpp
$(CCX) $(CCX_FLAGS) -o $@ internal/cons-spa-WDFA-gen-bin.cpp
$(OUT_DIR)/gen-dfa-bin-64.x: internal/cons-spa-WDFA-gen-bin.cpp
$(CCX) $(CCX_FLAGS) -o $@ internal/cons-spa-WDFA-gen-bin.cpp -DM64
clean:
rm -f $(EXECS) #lib/*.o
rmdir $(OUT_DIR)