-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
100 lines (73 loc) · 3.2 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
SRC_DIR = src
INCLUDE_DIR = include
BUILD_DIR = build
FIFOS_DIR = fifos
EXECUTABLE_FILE = EnsembleClassifier.out
CC = g++
CFLAGS = -std=c++11 -I $(INCLUDE_DIR)
.PHONY: make_build_dir make_fifos_dir all clean
all: make_build_dir make_fifos_dir EnsembleClassifier LinearClassifier Voter
make_build_dir:
mkdir -p $(BUILD_DIR)
make_fifos_dir:
mkdir -p $(FIFOS_DIR)
#Ensemble Classifier
ENSEMBLE_CLASSIFIER_OBJECTS = $(BUILD_DIR)/EnsembleClassifierMain.o \
$(BUILD_DIR)/EnsembleClassifier.o \
$(BUILD_DIR)/Tools.o
EnsembleClassifier: $(ENSEMBLE_CLASSIFIER_OBJECTS)
$(CC) $(ENSEMBLE_CLASSIFIER_OBJECTS) -o EnsembleClassifier.out
EnsembleClassifierMainSensitivityList = $(SRC_DIR)/EnsembleClassifierMain.cpp \
$(INCLUDE_DIR)/EnsembleClassifier.hpp \
$(INCLUDE_DIR)/Exception.hpp \
$(INCLUDE_DIR)/Exceptions.hpp \
$(INCLUDE_DIR)/Tools.hpp
$(BUILD_DIR)/EnsembleClassifierMain.o: $(EnsembleClassifierMainSensitivityList)
$(CC) $(CFLAGS) -c $(SRC_DIR)/EnsembleClassifierMain.cpp -o $(BUILD_DIR)/EnsembleClassifierMain.o
EnsembleClassifierSensitivityList = $(SRC_DIR)/EnsembleClassifier.cpp \
$(INCLUDE_DIR)/EnsembleClassifier.hpp \
$(INCLUDE_DIR)/Exceptions.hpp \
$(INCLUDE_DIR)/Tools.hpp
$(BUILD_DIR)/EnsembleClassifier.o: $(EnsembleClassifierSensitivityList)
$(CC) $(CFLAGS) -c $(SRC_DIR)/EnsembleClassifier.cpp -o $(BUILD_DIR)/EnsembleClassifier.o
#Linear Classifier
LINEAR_CLASSIFIER_OBJECTS = $(BUILD_DIR)/LinearClassifierMain.o \
$(BUILD_DIR)/LinearClassifier.o \
$(BUILD_DIR)/Tools.o
LinearClassifier: $(LINEAR_CLASSIFIER_OBJECTS)
$(CC) $(LINEAR_CLASSIFIER_OBJECTS) -o LinearClassifier
LinearClassifierMainSensitivityList = $(SRC_DIR)/LinearClassifierMain.cpp \
$(INCLUDE_DIR)/LinearClassifier.hpp \
$(INCLUDE_DIR)/Tools.hpp
$(BUILD_DIR)/LinearClassifierMain.o: $(LinearClassifierMainSensitivityList)
$(CC) $(CFLAGS) -c $(SRC_DIR)/LinearClassifierMain.cpp -o $(BUILD_DIR)/LinearClassifierMain.o
LinearClassifierSensitivityList = $(SRC_DIR)/LinearClassifier.cpp \
$(INCLUDE_DIR)/LinearClassifier.hpp \
$(INCLUDE_DIR)/Tools.hpp
$(BUILD_DIR)/LinearClassifier.o: $(LinearClassifierSensitivityList)
$(CC) $(CFLAGS) -c $(SRC_DIR)/LinearClassifier.cpp -o $(BUILD_DIR)/LinearClassifier.o
#Voter
VOTER_OBJECTS = $(BUILD_DIR)/VoterMain.o \
$(BUILD_DIR)/Voter.o \
$(BUILD_DIR)/Tools.o
Voter: $(VOTER_OBJECTS)
$(CC) $(VOTER_OBJECTS) -o Voter
VoterMainSensitivityList: $(SRC_DIR)/VoterMain.cpp \
$(INCLUDE_DIR)/Voter.hpp
$(INCLUDE_DIR)/Tools.hpp
$(BUILD_DIR)/VoterMain.o: $(VoterMainSensitivityList)
$(CC) $(CFLAGS) -c $(SRC_DIR)/VoterMain.cpp -o $(BUILD_DIR)/VoterMain.o
VoterSensitivityList = $(SRC_DIR)/Voter.cpp \
$(INCLUDE_DIR)/Voter.hpp \
$(INCLUDE_DIR)/Tools.hpp
$(BUILD_DIR)/Voter.o: $(VoterSensitivityList)
$(CC) $(CFLAGS) -c $(SRC_DIR)/Voter.cpp -o $(BUILD_DIR)/Voter.o
#Tools
ToolsSensitivityList = $(SRC_DIR)/Tools.cpp \
$(INCLUDE_DIR)/Tools.hpp
$(BUILD_DIR)/Tools.o: $(ToolsSensitivityList)
$(CC) $(CFLAGS) -c $(SRC_DIR)/Tools.cpp -o $(BUILD_DIR)/Tools.o
#Others
clean:
rm -rf $(BUILD_DIR) $(FIFOS_DIR) *.o *.out
rm -rf Voter LinearClassifier