38 lines
442 B
Makefile
38 lines
442 B
Makefile
SRCS = parsing.c \
|
|
utils/ft_isnum.c \
|
|
utils/ft_atoi.c \
|
|
main.c \
|
|
time.c \
|
|
print.c \
|
|
data.c \
|
|
philo.c \
|
|
philos.c \
|
|
threads.c
|
|
|
|
OBJS = ${SRCS:.c=.o}
|
|
|
|
NAME = philo
|
|
|
|
CC = clang
|
|
|
|
FLAGS = -Wall -Wextra -Werror -g
|
|
|
|
%.o: %.c
|
|
${CC} ${FLAGS} -c -o $@ $<
|
|
|
|
${NAME}: ${OBJS}
|
|
${CC} ${OBJS} -o ${NAME}
|
|
|
|
all: ${NAME}
|
|
|
|
clean:
|
|
rm -f ${OBJS}
|
|
|
|
fclean: clean
|
|
rm -f ${NAME}
|
|
|
|
re: fclean
|
|
make all
|
|
|
|
.PHONY: all clean fclean re
|