-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathMakefile
64 lines (47 loc) · 1.56 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
# **************************************************************************** #
# #
# ::: :::::::: #
# Makefile :+: :+: :+: #
# +:+ +:+ +:+ #
# By: kafortin <[email protected]> +#+ +:+ +#+ #
# +#+#+#+#+#+ +#+ #
# Created: 2022/04/05 20:32:19 by kafortin #+# #+# #
# Updated: 2023/06/07 21:46:03 by kafortin ### ########.fr #
# #
# **************************************************************************** #
CC = gcc
CFLAGS = -Wall -Wextra -Werror -fsanitize=thread
NAME = philo
FILES = ./srcs/main.c \
./srcs/data.c \
./srcs/death.c \
./srcs/free.c \
./srcs/meals.c \
./srcs/philos.c \
./srcs/thread.c \
./srcs/time.c \
./srcs/utils.c \
OBJS = $(FILES:.c=.o)
RM = @rm -f
.SILENT: $(OBJS)
all: $(NAME)
$(NAME): $(OBJS)
@echo "Compiling philo..."
@$(CC) $(CFLAGS) $(OBJS) -o $(NAME)
@echo "Completed! 🤠"
clean:
$(RM) $(OBJS)
fclean:
$(RM) $(OBJS)
$(RM) $(NAME)
re: fclean all
add:
git add $(FILES)
git add *.h
git add Makefile
commit:
git commit -m "$m"
push:
git push origin master
git: add commit push
.PHONY: all clean fclean re add commit push git