-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathMakefile
62 lines (50 loc) · 1.25 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
NAME= game_2048
SRC = src/drawing.c \
src/ending.c \
src/filling.c \
src/initialization.c \
src/main.c \
src/move.c \
libft/libft.a \
src/numbers_generator.c \
src/draw_piece.c \
src/putting.c \
src/piece.c \
src/score.c \
src/user_info.c \
src/user_name.c \
src/loser_screen.c \
src/winner_screen.c \
src/redrawing.c \
src/high_score.c \
src/save_score.c \
src/usefull.c \
HEAD = -I ./includes
OBJ = $(SRC:.c=.o)
FLAGS = -Wall -Wextra -Werror
LIB = -lncurses
EOC = \033[0m
GREEN = \e[38;5;132m
RED = \e[38;5;96m
PURPLE = \e[38;5;213m
CYAN = \e[38;5;170m
COL = \e[38;5;225m
all : $(NAME)
$(NAME) :
@printf "$(COL)Compilation started:$(EOC)\n"
@make -C ./libft
@printf "$(CYAN).........................$(EOC)"
@printf " $(RED)>$(EOC) $(GREEN)$(NAME) is ready.$(EOC)\n"
@gcc $(FLAGS) $(SRC) $(HEAD) $(LIB) -o $(NAME)
@printf "$(COL)Compilation succeed!$(EOC)\n"
clean :
@make -C ./libft clean
@printf "$(RED)Remove .o-files ...$(EOC)\n"
@/bin/rm -f $(OBJ)
@printf "$(RED)Removal of .o-files done!$(EOC)\n"
fclean : clean
@make -C ./libft fclean
@printf "$(RED)Remove .exe-file ...$(EOC)\n"
@/bin/rm -f $(NAME)
@printf "$(RED)Removal of .exe-file done!$(EOC)\n"
re : fclean all