-
Notifications
You must be signed in to change notification settings - Fork 7
/
Makefile
122 lines (99 loc) · 2.96 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
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
CC = g++ -fdiagnostics-color=always
FLAGS = -std=c++17 -g -O3 -Wall -I.
LIBS = -pthread
BUILD = build
OBJ = build/obj
GRAPH = graph
MATCH = matching
UTILS = utils
BUILD_TOOLS = build/tools
all : dir $(BUILD)/csm
dir: $(OBJ)
$(OBJ) :
mkdir -p $(OBJ)
#################### start ####################
$(BUILD)/csm: $(OBJ)/main.o \
$(OBJ)/matching.o \
$(OBJ)/sj_tree.o $(OBJ)/graphflow.o \
$(OBJ)/turboflux.o $(OBJ)/symbi.o \
$(OBJ)/iedyn.o \
$(OBJ)/graph.o $(OBJ)/induced_graph.o \
$(OBJ)/globals.o
$(CC) $(FLAGS) $(OBJ)/main.o \
$(OBJ)/matching.o \
$(OBJ)/sj_tree.o $(OBJ)/graphflow.o \
$(OBJ)/turboflux.o $(OBJ)/symbi.o \
$(OBJ)/iedyn.o \
$(OBJ)/graph.o $(OBJ)/induced_graph.o \
$(OBJ)/globals.o \
-o $(BUILD)/csm $(LIBS)
$(OBJ)/main.o: $(MATCH)/main.cpp \
$(UTILS)/CLI11.hpp \
$(UTILS)/globals.h $(UTILS)/types.h \
$(GRAPH)/graph.h \
$(MATCH)/sj_tree.h $(MATCH)/graphflow.h \
$(MATCH)/turboflux.h $(MATCH)/symbi.h \
$(MATCH)/iedyn.h
$(CC) -c $(FLAGS) $(MATCH)/main.cpp -o $(OBJ)/main.o
#################### matching ####################
$(OBJ)/iedyn.o: $(MATCH)/iedyn.cpp \
$(UTILS)/types.h $(UTILS)/globals.h \
$(GRAPH)/graph.h \
$(MATCH)/matching.h \
$(MATCH)/iedyn.h
$(CC) -c $(FLAGS) $(MATCH)/iedyn.cpp \
-o $(OBJ)/iedyn.o
$(OBJ)/symbi.o: $(MATCH)/symbi.cpp \
$(UTILS)/types.h $(UTILS)/globals.h \
$(GRAPH)/graph.h \
$(MATCH)/matching.h \
$(MATCH)/symbi.h
$(CC) -c $(FLAGS) $(MATCH)/symbi.cpp \
-o $(OBJ)/symbi.o
$(OBJ)/turboflux.o: $(MATCH)/turboflux.cpp \
$(UTILS)/types.h $(UTILS)/globals.h \
$(GRAPH)/graph.h \
$(MATCH)/matching.h \
$(MATCH)/turboflux.h
$(CC) -c $(FLAGS) $(MATCH)/turboflux.cpp \
-o $(OBJ)/turboflux.o
$(OBJ)/graphflow.o: $(MATCH)/graphflow.cpp \
$(UTILS)/types.h $(UTILS)/utils.h \
$(UTILS)/globals.h \
$(GRAPH)/graph.h \
$(MATCH)/matching.h \
$(MATCH)/graphflow.h
$(CC) -c $(FLAGS) $(MATCH)/graphflow.cpp \
-o $(OBJ)/graphflow.o
$(OBJ)/sj_tree.o: $(MATCH)/sj_tree.cpp \
$(UTILS)/types.h $(UTILS)/globals.h \
$(GRAPH)/graph.cpp $(GRAPH)/induced_graph.h \
$(MATCH)/matching.h \
$(MATCH)/sj_tree.h
$(CC) -c $(FLAGS) $(MATCH)/sj_tree.cpp \
-o $(OBJ)/sj_tree.o
$(OBJ)/matching.o: $(MATCH)/matching.cpp \
$(UTILS)/types.h \
$(GRAPH)/graph.h \
$(MATCH)/matching.h
$(CC) -c $(FLAGS) $(MATCH)/matching.cpp \
-o $(OBJ)/matching.o
#################### graph ####################
$(OBJ)/graph.o: $(GRAPH)/graph.cpp \
$(UTILS)/types.h $(UTILS)/utils.h \
$(GRAPH)/graph.h
$(CC) -c $(FLAGS) $(GRAPH)/graph.cpp \
-o $(OBJ)/graph.o
$(OBJ)/induced_graph.o: $(GRAPH)/induced_graph.cpp \
$(UTILS)/types.h \
$(GRAPH)/induced_graph.h $(GRAPH)/graph.h
$(CC) -c $(FLAGS) $(GRAPH)/induced_graph.cpp \
-o $(OBJ)/induced_graph.o
#################### utils ####################
$(OBJ)/globals.o: $(UTILS)/globals.cpp $(UTILS)/globals.h
$(CC) -c $(FLAGS) $(UTILS)/globals.cpp \
-o $(OBJ)/globals.o
#################### end ####################
.PHONY: clean
clean:
rm -r ${BUILD}