-
Notifications
You must be signed in to change notification settings - Fork 3
/
makefile
executable file
·81 lines (57 loc) · 2.19 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
BUILD_DIR = build
SRC_DIR = src
BIN_DIR = bin
CFLAGS = -Winline -O2 -std=c++0x -g
#CFLAGS = -Winline -DDEBUG_MESSAGE -O0 -std=c++0x -g
#SOURCES_TMP += LightWeightSparseFullMCS.cpp
#SOURCES_TMP += LightWeightSparseStaticOrderMCS.cpp
#SOURCES_TMP += LightWeightSparseMCR.cpp
SOURCES_TMP += Experiments.cpp
SOURCES_TMP += OrderingTools.cpp
SOURCES_TMP += MaxSubgraphAlgorithm.cpp
SOURCES_TMP += LightWeightFullMISS.cpp
SOURCES_TMP += LightWeightStaticOrderMISS.cpp
SOURCES_TMP += LightWeightMISR.cpp
SOURCES_TMP += LightWeightMISQ.cpp
SOURCES_TMP += SparseIndependentSetColoringStrategy.cpp
SOURCES_TMP += IndependentSetColoringStrategy.cpp
SOURCES_TMP += Isolates4.cpp
SOURCES_TMP += CliqueTools.cpp
SOURCES_TMP += MatchingTools.cpp
SOURCES_TMP += BiDoubleGraph.cpp
SOURCES_TMP += GraphTools.cpp
SOURCES_TMP += MemoryManager.cpp
SOURCES_TMP += Algorithm.cpp
SOURCES_TMP += Tools.cpp
SOURCES=$(addprefix $(SOURCES_DIR)/, $(SOURCES_TMP))
OBJECTS_TMP=$(SOURCES_TMP:.cpp=.o)
OBJECTS=$(addprefix $(BUILD_DIR)/, $(OBJECTS_TMP))
DEPFILES_TMP:=$(SOURCES_TMP:.cpp=.d)
DEPFILES=$(addprefix $(BUILD_DIR)/, $(DEPFILES_TMP))
EXEC_NAMES = kernel-mis
EXECS = $(addprefix $(BIN_DIR)/, $(EXEC_NAMES))
#DEFINE += -DDEBUG #for debugging
#DEFINE += -DMEMORY_DEBUG #for memory debugging.
#DEFINE += -DRETURN_CLIQUES_ONE_BY_ONE
#DEFINE += -DPRINT_CLIQUES_ONE_BY_ONE
#DEFINE += -DPRINT_CLIQUES_TOMITA_STYLE # used by Eppstein and Strash (2011)
#some systems handle malloc and calloc with 0 bytes strangely.
DEFINE += -DALLOW_ALLOC_ZERO_BYTES# used by Eppstein and Strash (2011)
VPATH = src
.PHONY : all
all: $(EXECS)
.PHONY : clean
clean:
rm -rf $(EXECS) $(BUILD_DIR) $(BIN_DIR)
$(BIN_DIR)/printnm: printnm.cpp ${OBJECTS} | ${BIN_DIR}
g++ ${DEFINE} ${OBJECTS} $(SRC_DIR)/printnm.cpp -o $@
$(BIN_DIR)/kernel-mis: main.cpp ${OBJECTS} | ${BIN_DIR}
g++ $(CFLAGS) ${DEFINE} ${OBJECTS} $(SRC_DIR)/main.cpp -o $@
$(BUILD_DIR)/%.o: $(SRC_DIR)/%.cpp $(SRC_DIR)/%.h $(BUILD_DIR)/%.d | $(BUILD_DIR)
g++ $(CFLAGS) ${DEFINE} -c $< -o $@
$(BUILD_DIR)/%.d: $(SRC_DIR)/%.cpp | $(BUILD_DIR)
g++ $(CFLAGS) -MM -MT '$(patsubst $(SRC_DIR)/%.cpp,$(BUILD_DIR)/%.o,$<)' $< -MF $@
$(BUILD_DIR):
mkdir -p $(BUILD_DIR)
$(BIN_DIR):
mkdir -p $(BIN_DIR)