-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
87 lines (67 loc) · 2.42 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
# **************************************************************************** #
# #
# ::: :::::::: #
# Makefile :+: :+: :+: #
# +:+ +:+ +:+ #
# By: ailopez- <[email protected] +#+ +:+ +#+ #
# +#+#+#+#+#+ +#+ #
# Created: 2022/05/09 16:48:38 by ailopez- #+# #+# #
# Updated: 2022/06/03 13:50:22 by aitoraudi ### ########.fr #
# Updated: 2022/05/24 00:35:24 by aitorlope ### ########.fr #
# #
# **************************************************************************** #
# ----------------------------- VAR DECLARATION ------------------------------ #
NAME := philo
MANDATORY_DIR := philo/
BONUS_DIR := philo_bonus/
# Git submodule update
GSU = git submodule update
# Flags for GSU
GSU_FLAGS = --remote --merge --recursive
# Flags to compile with gcc
FLAGS = -Werror -Wextra -Wall
# Variable to compile .c files
CC = gcc
# Colors
DEF_COLOR = \033[0;39m
GRAY = \033[0;90m
RED = \033[0;91m
GREEN = \033[0;92m
YELLOW = \033[0;93m
BLUE = \033[0;94m
MAGENTA = \033[0;95m
CYAN = \033[0;96m
WHITE = \033[0;97m
BLACK = \033[0;99m
ORANGE = \033[38;5;209m
BROWN = \033[38;5;94m
DARK_GRAY = \033[38;5;234m
MID_GRAY = \033[38;5;245m
RANDM = \033[38;5;95m
DARK_GREEN = \033[38;5;64m
DARK_YELLOW = \033[38;5;143m
# --------------------------------- ACTIONS ---------------------------------- #
all:
@$(MAKE) -C $(MANDATORY_DIR)
@$(MAKE) -C $(BONUS_DIR)
# Action to update the git submodules
update:
@echo "$(YELLOW)Updating submodules"
@$(GSU) $(GSU_FLAGS)
@echo "$(YELLOW)DONE"
$(NAME):
@$(MAKE) -C $(MANDATORY_DIR)
bonus:
@$(MAKE) -C $(BONUS_DIR)
clean:
@make clean -sC $(MANDATORY_DIR)
@make clean -sC $(BONUS_DIR)
fclean:
@make fclean -sC $(MANDATORY_DIR)
@make fclean -sC $(BONUS_DIR)
re: fclean
@$(MAKE)
@echo "$(GREEN)Cleaned and rebuilt everything for Philosophers!$(DEF_COLOR)"
norm:
@norminette $(SRC) $(INCLUDE) | grep -v Norme -B1 || true
.PHONY: all clean fclean re norm