NAME = philosophers SRCS = philo_threads.c philo_launcher.c philo_utils.c philo_init.c OBJS = ${SRCS:.c=.o} CC = gcc CFLAGS = -Werror -Wextra -Wall -g -fsanitize=thread -D_REENTRANT RM = rm -rf .c.o: $(CC) $(CFLAGS) -c $< -o $(<:.c=.o) all: $(NAME) $(NAME): $(OBJS) ${CC} ${CFLAGS} -lpthread ${OBJS} -o ${NAME} clean: ${RM} ${OBJS} fclean: clean ${RM} ${NAME} re: fclean all .PHONY: all clean fclean re