-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathMakefile
43 lines (29 loc) · 885 Bytes
/
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
NAME = philo
CC = cc
RM = rm -rf
CFLAGS = -Wall -Wextra -Werror #-g fsanitize=address
SRC = main.c init.c utils.c utils2.c utils3.c police.c routines.c
OBJ = $(SRC:.c=.o)
all: $(NAME)
$(NAME): $(addprefix SRC/,$(OBJ))
@$(CC) $(addprefix SRC/,$(OBJ)) -pthread -o $(NAME)
run: $(NAME)
@./philo 5 8000 200 200 7
valgrind: $(NAME)
@make re && valgrind --leak-check=full --show-leak-kinds=all ./philo 5 8000 200 200 7
git: fclean
@git add .
@git commit
@git push
@clear
@echo " "
@echo " "
@echo " -------Commited and Pushed------- "
@echo " "
@echo " "
commit: fclean
clean:
@$(RM) $(addprefix SRC/,$(OBJ))
fclean: clean
@$(RM) $(NAME)
re: fclean all