-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMakefile
More file actions
149 lines (121 loc) · 3.39 KB
/
Makefile
File metadata and controls
149 lines (121 loc) · 3.39 KB
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
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
##
## Makefile for in /home/sousa_v/rendu/cpp_arcade
##
## Made by Victor Sousa
## Login <sousa_v@epitech.net>
##
## Started on Mon Mar 13 22:42:09 2017 Victor Sousa
## Last update Sat Apr 8 22:17:41 2017 Sousa Victor
##
CPP = g++
NAME = arcade
RM = rm -f
MAKEFLAGS += --no-print-directory
LDFLAGS += -ldl
CPPFLAGS += -std=c++11
CPPFLAGS += -Werror -Wall -Wextra -fpic -g
CPPFLAGS += -I./includes/ -I./includes/utils -I./includes/utils/data
SRCSDIR = sources
UTILSDIR = $(SRCSDIR)/utils
DATASDIR = $(UTILSDIR)/data
SRCS = $(SRCSDIR)/main.cpp \
$(SRCSDIR)/Arcade.cpp \
$(SRCSDIR)/ScoreManager.cpp \
$(SRCSDIR)/Menu.cpp
SRCS += $(UTILSDIR)/Position.cpp \
$(UTILSDIR)/Color.cpp \
$(UTILSDIR)/Texture.cpp \
$(UTILSDIR)/DirectoryManager.cpp \
$(UTILSDIR)/Model3D.cpp
SRCS += $(DATASDIR)/AData.cpp \
$(DATASDIR)/AVisual.cpp \
$(DATASDIR)/Audio.cpp \
$(DATASDIR)/Text.cpp \
$(DATASDIR)/AScene.cpp \
$(DATASDIR)/Camera.cpp \
$(DATASDIR)/Light.cpp \
$(DATASDIR)/Cube.cpp \
$(DATASDIR)/Sphere.cpp
OBJS = $(SRCS:.cpp=.o)
## LIB DIRECTORY
GAMEDIR = ./games
SNAKEDIR = $(GAMEDIR)/Snake
SOLARDIR = $(GAMEDIR)/SolarFox
GRAPHDIR = ./lib
NCURSESDIR = $(GRAPHDIR)/NCurses
SFMLDIR = $(GRAPHDIR)/SFML
OPENGLDIR = $(GRAPHDIR)/OpenGL
all: games $(NAME)
dump: all snake ncurses
dump_clean: clean snake_clean ncurses_clean
dump_fclean: fclean snake_fclean ncurses_fclean
dump_re: re snake_re ncurses_re
global: all games graph
global_clean: clean games_clean graph_clean
global_fclean: fclean games_fclean graph_fclean
global_re: re games_re graph_re
games: snake solar
games_clean: snake_clean solar_clean
games_fclean: snake_fclean solar_fclean
games_re: snake_re solar_re
snake:
@make -C $(SNAKEDIR)
snake_clean:
@make -C $(SNAKEDIR) clean
snake_fclean:
@make -C $(SNAKEDIR) fclean
snake_re:
@make -C $(SNAKEDIR) re
solar:
@make -C $(SOLARDIR)
solar_clean:
@make -C $(SOLARDIR) clean
solar_fclean:
@make -C $(SOLARDIR) fclean
solar_re:
@make -C $(SOLARDIR) re
graph: opengl sfml ncurses
graph_clean: opengl_clean sfml_clean ncurses_clean
graph_fclean: opengl_fclean sfml_fclean ncurses_fclean
graph_re: opengl_re sfml_re ncurses_re
opengl:
@make -C $(OPENGLDIR)
opengl_clean:
@make -C $(OPENGLDIR) clean
opengl_fclean:
@make -C $(OPENGLDIR) fclean
opengl_re:
@make -C $(OPENGLDIR) re
sfml:
@make -C $(SFMLDIR)
sfml_clean:
@make -C $(SFMLDIR) clean
sfml_fclean:
@make -C $(SFMLDIR) fclean
sfml_re:
@make -C $(SFMLDIR) re
ncurses:
@make -C $(NCURSESDIR)
ncurses_clean:
@make -C $(NCURSESDIR) clean
ncurses_fclean:
@make -C $(NCURSESDIR) fclean
ncurses_re:
@make -C $(NCURSESDIR) re
$(NAME): $(OBJS)
@$(CPP) $(OBJS) $(LDFLAGS) -o $(NAME) && \
printf "[\033[1;36mbuilt\033[0m] % 32s\n" $(NAME) | tr ' ' '.' || \
printf "[\033[1;31mfailed\033[0m] % 31s\n" $(NAME) | tr ' ' '.'
.cpp.o:
@$(CPP) $(CPPFLAGS) $(LDFLAG) -c $< -o $@ && \
printf "[\033[1;32mcompiled\033[0m] % 29s\n" $< | tr ' ' '.' || \
printf "[\033[1;31mfailed\033[0m] % 31s\n" $< | tr ' ' '.'
clean: games_clean
@$(RM) $(OBJS) && \
printf "[\033[1;31mdeleted\033[0m] % 30s\n" $(OBJ) | tr ' ' '.' || \
printf "[\033[1;31mdeleted\033[0m] % 30s\n" $(OBJ) | tr ' ' '.'
fclean: games_fclean clean
@$(RM) $(NAME) && \
printf "[\033[1;31mdeleted\033[0m] % 30s\n" $(NAME) | tr ' ' '.' || \
printf "[\033[1;31mdeleted\033[0m] % 30s\n" $(NAME) | tr ' ' '.'
re: fclean all