-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathMakefile
76 lines (58 loc) · 1.39 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
##
## EPITECH PROJECT, 2019
## makefile
## File description:
## build
##
# Mandatory
SHELL = /bin/sh
# Security
CXX ?= g++
RM ?= rm -f
# Sources
SRC = main.cpp \
arcade.cpp \
initLib.cpp \
selectLib.cpp \
SRC_FILE = $(addprefix ./src/, $(SRC))
TESTS = \
# Flags
CXXFLAGS = -Wall -Wextra -W
CPPFLAGS = -I./include
# OBJ
OBJ = $(SRC_FILE:.cpp=.o)
OBJ_LIB = $(SRC_LIB:.a)
NAME = arcade
all: $(NAME)
graphicals:
$(MAKE) -C lib/lib_arcade_sfml/
$(MAKE) -C lib/lib_arcade_ncurse/
$(MAKE) -C lib/lib_arcade_opengl/
games:
$(MAKE) -C games/lib_arcade_nibbler/
$(MAKE) -C games/lib_arcade_pacman/
$(MAKE) -C games/lib_arcade_menu/
core: $(OBJ)
$(CXX) $(OBJ) -o $(NAME) -ldl
$(NAME): graphicals games $(OBJ)
$(CXX) $(OBJ) -o $(NAME) -ldl
clean:
$(MAKE) clean -C games/lib_arcade_nibbler/
$(MAKE) clean -C games/lib_arcade_pacman/
$(MAKE) clean -C games/lib_arcade_menu/
$(MAKE) clean -C lib/lib_arcade_sfml/
$(MAKE) clean -C lib/lib_arcade_ncurse/
$(MAKE) clean -C lib/lib_arcade_opengl/
$(RM) $(OBJ)
fclean: clean
$(MAKE) fclean -C games/lib_arcade_pacman/
$(MAKE) fclean -C games/lib_arcade_nibbler/
$(MAKE) fclean -C games/lib_arcade_menu/
$(MAKE) fclean -C lib/lib_arcade_sfml/
$(MAKE) fclean -C lib/lib_arcade_ncurse/
$(MAKE) fclean -C lib/lib_arcade_opengl/
$(RM) $(NAME)
$(RM) *.gcda
$(RM) *.gcno
re: fclean all
.PHONY: all clean fclean re games graphicals core