NAME = philo SRC = main.c \ error.c \ ft_libft.c OBJ_NAME = $(SRC:.c=.o) OBJ_PATH = ./obj OBJ = $(addprefix $(OBJ_PATH)/, $(OBJ_NAME)) all : $(NAME) $(NAME): $(OBJ) gcc -Wall -Wextra -Werror $^ -o $@ $(OBJ_PATH)/%.o : %.c mkdir ./obj 2> /dev/null || true gcc -Wall -Wextra -Werror -o $@ -c $< re : fclean all clean : rm -rf $(OBJ_NAME) rm -rf $(OBJ_PATH) fclean : clean rm -rf $(NAME) 다만 mkdir ./ob..