NAME = minishell LIBFT = libft.a SRCS = minishell.c lexer.c parser.c utils.c OBJS = ${SRCS:.c=.o} READLINE_INC = ~/.brew/opt/readline/include LIB = -L ~/.brew/lib -lreadline -L ~/.brew/lib -lhistory -L. -lft $(NAME): $(OBJS) gcc ${OBJS} ${LIB} -o ${NAME} $(LIBFT): ${MAKE} -C ./libft cp ./libft/libft.a . all: $(LIBFT) $(NAME) %.o: %.c gcc -Werror -Wextra -Wall -g -c $< -I ${READLINE_INC} #for rl_replace_line clean: rm -rf ${OBJS} fclean: clean ${MAKE} -C ./libft fclean rm libft.a rm -rf ${NAME} re: fclean all .PHONY: all clean fclean re