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.

34 lines
644 B

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