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.
29 lines
565 B
29 lines
565 B
NAME = minishell
|
|
LIBFT = 42-libft/libft.a
|
|
SRCS = minishell.c lexer.c parser.c caller.c built-in.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 ./42-libft
|
|
cp ./42-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
|
|
rm -rf ${NAME}
|
|
|
|
re: fclean all
|
|
|
|
.PHONY: all clean fclean re
|
|
|