-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
58 lines (43 loc) · 1.43 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
# **************************************************************************** #
# #
# ::: :::::::: #
# Makefile :+: :+: :+: #
# +:+ +:+ +:+ #
# By: marcosv2 <marcosv2@student.42.rio> +#+ +:+ +#+ #
# +#+#+#+#+#+ +#+ #
# Created: 2024/01/20 00:36:02 by marcosv2 #+# #+# #
# Updated: 2024/01/20 00:36:08 by marcosv2 ### ########.fr #
# #
# **************************************************************************** #
NAME = philo
CC = gcc
CFLAGS = -g
Y = \033[38;5;99m
R = \033[38;5;93m
G = \033[38;5;40m
B = \033[38;5;32m
X = \033[0m
CFILES = src/main.c src/utils/init.c src/utils/utils.c \
src/utils/threads.c src/utils/actions.c \
OBJECTS = $(CFILES:.c=.o)
all: $(NAME)
%.o : %.c
@printf "$(Y)Compiling [$<]...$(X)\r"
@$(CC) $(CFLAGS) -c -o $@ $<
$(NAME): $(OBJECTS)
@printf "$(Y)Compiling [$(CFILES)]...$(X)\n"
@printf "$(Y)Compiling [$(NAME)]...$(X)\n"
@$(CC) $(CFLAGS) $(LIBFT_LIB) $(PRINTF_LIB) $(OBJECTS) -o $(NAME)
@printf "$(G)Finished [$(NAME)]$(X)\n"
clean:
@rm -rf $(OBJECTS)
@printf "$(R)Removed [$(OBJECTS)]$(X)\n"
@printf "$(R)Removed libraries.o$(X)\n"
fclean: clean
@rm -rf $(NAME)
@printf "$(R)Removed [$(NAME)]$(X)\n"
re: fclean all
norm:
norminette ft_printf utils checker
#run: all
.PHONY: all clean fclean re norm