2023-02-14 01:26:18 -05:00
|
|
|
UTILS_SRC = utils/ft_is_in_quote.c utils/ft_strncpy.c utils/ft_strreplace.c utils/ft_strnchr.c utils/ft_getstr.c
|
|
|
|
SRCS = ${UTILS_SRC} main.c file.c infile.c outfile.c heredoc.c syntatics.c ft_split_quoted.c env.c
|
2023-01-31 08:40:15 -05:00
|
|
|
|
|
|
|
OBJS = ${SRCS:.c=.o}
|
|
|
|
|
|
|
|
NAME = minishell
|
|
|
|
|
2023-02-14 01:26:18 -05:00
|
|
|
CC = gcc
|
2023-01-31 08:40:15 -05:00
|
|
|
|
2023-02-14 01:26:18 -05:00
|
|
|
CFLAGS = -Wall -Werror -Wextra -g
|
2023-01-31 08:40:15 -05:00
|
|
|
|
2023-01-31 09:02:23 -05:00
|
|
|
LIBS = libftx/libftx.a
|
|
|
|
|
2023-01-31 08:40:15 -05:00
|
|
|
%.o: %.c
|
|
|
|
${CC} ${CFLAGS} -c -o $@ $<
|
|
|
|
|
|
|
|
all: ${NAME}
|
|
|
|
|
|
|
|
${NAME}: ${OBJS}
|
2023-02-01 11:28:38 -05:00
|
|
|
make -C libftx all
|
2023-02-14 01:26:18 -05:00
|
|
|
${CC} ${OBJS} -o ${NAME} ${LIBS} -lreadline
|
2023-01-31 08:40:15 -05:00
|
|
|
|
|
|
|
clean:
|
2023-01-31 09:02:23 -05:00
|
|
|
make -C libftx clean
|
2023-01-31 08:40:15 -05:00
|
|
|
rm -f ${OBJS}
|
|
|
|
|
|
|
|
fclean: clean
|
2023-01-31 09:02:23 -05:00
|
|
|
make -C libftx fclean
|
2023-01-31 08:40:15 -05:00
|
|
|
rm -f ${NAME}
|
|
|
|
|
|
|
|
re: fclean all
|
|
|
|
|
|
|
|
.PHONY: all clean fclean re
|
|
|
|
|