-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
56 lines (43 loc) · 1.13 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
##
## EPITECH PROJECT, 2020
## OOP_arcade_2019
## File description:
## Makefile
##
ROOT := $(shell dirname $(realpath $(firstword $(MAKEFILE_LIST))))
COMMON_CXXFLAGS = -std=c++17 \
-Wall \
-Wextra \
-Wshadow \
-Wsign-compare \
-Wno-unused-parameter \
-Wno-unused-variable \
-I$(ROOT)
DEBUG = -g
MAKE = @make --no-print-directory
COREDIR = core
MENUDIR = menu
GAMESDIR = games
LIBSDIR = lib
all: games graphicals core
core:
$(MAKE) -C $(COREDIR) COMMON_CXXFLAGS="$(COMMON_CXXFLAGS)"
$(MAKE) -C $(MENUDIR) COMMON_CXXFLAGS="$(COMMON_CXXFLAGS)"
games:
$(MAKE) -C $(GAMESDIR) COMMON_CXXFLAGS="$(COMMON_CXXFLAGS)"
graphicals:
$(MAKE) -C $(LIBSDIR) COMMON_CXXFLAGS="$(COMMON_CXXFLAGS)"
clean:
$(MAKE) clean -C $(COREDIR)
$(MAKE) clean -C $(GAMESDIR)
$(MAKE) clean -C $(LIBSDIR)
$(MAKE) clean -C $(MENUDIR)
fclean: clean
$(MAKE) fclean -C $(COREDIR)
$(MAKE) fclean -C $(GAMESDIR)
$(MAKE) fclean -C $(LIBSDIR)
$(MAKE) fclean -C $(MENUDIR)
re: fclean all
debug:
$(MAKE) all COMMON_CXXFLAGS="$(COMMON_CXXFLAGS) $(DEBUG)"
.PHONY: all clean fclean re core graphicals games debug