42_minishell/Makefile

60 lines
1.2 KiB
Makefile
Raw Normal View History

UTILS_SRC = utils/ft_is_in_quote.c utils/ft_strncpy.c utils/ft_strreplace.c utils/ft_strnchr.c utils/ft_split_quoted.c utils/ft_strshift.c utils/ft_quote_remover.c utils/ft_str_is_empty.c utils/ft_atoi_check.c ./utils/ft_get_executable.c ./utils/fd.c
BUILTINS_SRC = builtins/pwd.c \
builtins/export.c \
builtins/env.c \
builtins/cd.c \
builtins/exit.c \
builtins/unset.c \
builtins/echo.c
SRCS = ${BUILTINS_SRC} \
${UTILS_SRC} \
main.c \
./cmd/cmd.c \
./env/env1.c \
./env/env2.c \
./env/env3.c \
./env/env_fill.c \
./data/data.c \
./execution/execution.c \
./syntax/syntax.c \
./format/format.c \
./redirection/heredoc.c \
./redirection/file.c \
2023-03-13 09:23:27 -04:00
./redirection/redirection.c \
./parse/parse.c
2023-01-31 08:40:15 -05:00
OBJS = ${SRCS:.c=.o}
NAME = minishell
2023-02-24 05:01:57 -05:00
CC = clang
2023-01-31 08:40:15 -05:00
CFLAGS = -Werror -Wextra -Wall -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-03 10:02:52 -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}
2023-02-17 10:33:52 -05:00
re: fclean
make all
2023-01-31 08:40:15 -05:00
.PHONY: all clean fclean re