-
Notifications
You must be signed in to change notification settings - Fork 1
/
Makefile
94 lines (70 loc) · 1.65 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
##
## EPITECH PROJECT, 2019
## makefile
## File description:
## makefile
##
SRC = src/main.cpp \
src/dynamicFile.cpp \
src/Error/Error.cpp \
src/LoadLib/LoadLib.cpp \
src/Core/Core.cpp \
src/Graphic/ADisplayModule.cpp \
OBJ = $(SRC:.cpp=.o)
###############################################################################
NAME = arcade
CXXFLAGS = -Wall -Wextra -std=c++17
CPPFLAGS = -iquote./src/
CXX = g++
#MAIN RULES
all: core games graphicals
.PHONY: core
core: $(OBJ)
$(CXX) -o $(NAME) $(OBJ) -ldl -lncurses
################################################################################
#GAME RULES
.PHONY: games
games:
mkdir -p lib
make -C ./src/Game
.PHONY: graphicals
graphicals:
mkdir -p lib
make -C ./src/Graphic
################################################################################
#CLEAN RULES
clean: doc-clean
$(RM) $(OBJ) *.gcda *.gcno
make clean -C ./src/Graphic
make clean -C ./src/Game
fclean: clean
$(RM) $(NAME) unit_tests
make fclean -C ./src/Graphic
make fclean -C ./src/Game
re: fclean all
re:
make re -C src/Graphic
make re -C src/Game
debug: CPPFLAGS += -g3 -ggdb
debug: re
make debug -C ./src/Graphic
make debug -C ./src/Game
.PHONY: all fclean re clean debug
DOC_DIR = ./Documentation
.PHONY: doc
doc:
doxygen $(DOC_DIR)/Doxyfile
# Generate PDF documentation
.PHONY: doc_pdf
doc-pdf: doc
make -C $(DOC_DIR)/latex/
cp $(DOC_DIR)/latex/refman.pdf $(DOC_DIR)
# Launch doxygen in firefox browser
.PHONY: doc-firefox
doc-firefox: doc
firefox $(DOC_DIR)/html/index.html
.PHONY: doc-clean
doc-clean:
$(RM) -r $(DOC_DIR)/html/
$(RM) -r $(DOC_DIR)/latex/
$(RM) $(DOC_DIR)/refman.pdf