-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathMakefile
108 lines (84 loc) · 2.89 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
##
## EPITECH PROJECT, 2019
## OOP_NanoTekSpice
## File description:
## Makefile of the whole project
##
## ----------- DOCUMENTATION ------------ ##
DOC_FILE = Doxyfile
BINARY_NAME = nanotekspice
BINARY_UT_NAME = unit_tests
CXX = g++ $(HEADER)
PATH_TEST = ./Tests
PATH_SRC = ./Src
UT_SRC = $(PATH_TEST)/Parser/TestsOpenFile.cpp \
$(PATH_TEST)/Parser/TestsParseFile.cpp \
$(PATH_TEST)/Parser/TestsErrorHandling.cpp \
$(PATH_TEST)/Parser/Line/TestsClearLine.cpp \
$(PATH_TEST)/Parser/Line/TestsCommentLine.cpp \
$(PATH_TEST)/Parser/Line/TestsSplitLineInTwo.cpp \
$(PATH_TEST)/Parser/Checker/TestsIsUseless.cpp \
$(PATH_TEST)/Components/TestsFactoryInput.cpp \
$(PATH_TEST)/Components/TestsC4001.cpp \
$(PATH_TEST)/Components/TestsC4008.cpp \
$(PATH_TEST)/Components/TestsC4011.cpp \
$(PATH_TEST)/Components/TestsC4030.cpp \
$(PATH_TEST)/Components/TestsC4069.cpp \
$(PATH_TEST)/Components/TestsC4071.cpp \
$(PATH_TEST)/Components/TestsC4081.cpp \
$(PATH_TEST)/Components/TestsCircuit.cpp \
$(PATH_TEST)/Components/TestsClock.cpp \
$(PATH_TEST)/Argument/TestsGetFilename.cpp \
$(PATH_TEST)/Argument/TestsGetInputValue.cpp \
MAIN = $(PATH_SRC)/Main.cpp
SRC = $(PATH_SRC)/Parser/Parser.cpp \
$(PATH_SRC)/Parser/Checker.cpp \
$(PATH_SRC)/Parser/LineParser.cpp \
$(PATH_SRC)/Components/Factory.cpp \
$(PATH_SRC)/Components/Component.cpp \
$(PATH_SRC)/Components/Input.cpp \
$(PATH_SRC)/Components/Output.cpp \
$(PATH_SRC)/Components/True.cpp \
$(PATH_SRC)/Components/False.cpp \
$(PATH_SRC)/Components/C4001.cpp \
$(PATH_SRC)/Components/C4008.cpp \
$(PATH_SRC)/Components/C4011.cpp \
$(PATH_SRC)/Components/C4030.cpp \
$(PATH_SRC)/Components/C4069.cpp \
$(PATH_SRC)/Components/C4071.cpp \
$(PATH_SRC)/Components/C4081.cpp \
$(PATH_SRC)/Components/C4514.cpp \
$(PATH_SRC)/Components/Circuit.cpp \
$(PATH_SRC)/Components/Clock.cpp \
$(PATH_SRC)/Error.cpp \
$(PATH_SRC)/Argument/ArgumentParser.cpp \
$(PATH_SRC)/Simulation/Simulation.cpp \
HEADER = -I./Include/
CXXFLAGS = -W -Wextra -Werror
LDFLAGS = -lcriterion -lgcov --coverage
OBJS = $(SRC:.cpp=.o) $(MAIN:.cpp=.o)
all: $(BINARY_NAME)
$(BINARY_NAME): $(OBJS)
$(CXX) -o $(BINARY_NAME) $(HEADER) $(OBJS)
run:
echo "bite"
debug:
$(CXX) -o $(BINARY_NAME) $(HEADER) $(SRC) $(MAIN) -g3
tests_run:
g++ -o $(BINARY_UT_NAME) $(UT_SRC) $(SRC) $(CXXFLAGS) $(LDFLAGS) $(HEADER)
./$(BINARY_UT_NAME) -j1
tests_run_docker:
docker run -v $(PWD):/app epitechcontent/epitest-docker bash -c "cd app && make fclean && make tests_run && gcovr"
tests_run_coverage:
g++ -o $(BINARY_UT_NAME) $(UT_SRC) $(SRC) $(CXXFLAGS) $(LDFLAGS) $(HEADER)
./$(BINARY_UT_NAME) -j1
echo "\n"
gcov *.gcno
doxygen:
doxygen $(DOC_FILE)
clean:
rm -f $(OBJS) *.gc*
fclean: clean
rm -f $(BINARY_UT_NAME) $(BINARY_NAME)
rm -rf ./latex ./html
re: fclean all