-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMakefile
More file actions
45 lines (33 loc) · 734 Bytes
/
Makefile
File metadata and controls
45 lines (33 loc) · 734 Bytes
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
NAME = philo
FLAGS = -Wall -Wextra -Werror -g
SRCS = main.c verify.c philo.c philo_utils.c init.c utils.c
RM = rm -rf
.c.o:
@gcc ${FLAGS} -c $< -o ${<:.c=.o}
OBJS = ${SRCS:.c=.o}
CC = gcc
all: ${NAME}
${NAME}:${OBJS}
@${CC} ${OBJS} ${FLAGS} -o ${NAME}
run: all
./philo 2 60 60 60
val: all
valgrind --leak-check=full --track-origins=yes -s --trace-children=yes ./philo 1 310 200 100 2 40
test: all
@echo "error asserting"
./philo 5
./philo 5 2
./philo 5 2 3
./philo 5 2 4 5
./philo 5 2 4 6 7
./philo 5 2 4 6 7 8
./philo 5 2 4 6 7 0
clean:
${RM} ${OBJS}
git:
@git add ${SRCS} Makefile
fclean: clean
@${RM} ${NAME}
@$(MAKE) -C libft fclean
re: fclean all
.PHONY: clean fclean re all