You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
26 lines
394 B
26 lines
394 B
NAME = philo
|
|
|
|
SRCS = philo.c philo_init.c philo_life.c philo_utils.c
|
|
OBJS = ${SRCS:.c=.o}
|
|
|
|
CC = clang
|
|
CFLAGS = -Werror -Wextra -Wall -g -D_REENTRANT
|
|
RM = rm -rf
|
|
|
|
%.o : %.c
|
|
$(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
|
|
|