-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathMakefile
52 lines (43 loc) · 1.96 KB
/
Makefile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
# **************************************************************************** #
# #
# ::: :::::::: #
# Makefile :+: :+: :+: #
# +:+ +:+ +:+ #
# By: evmorvan <[email protected]> +#+ +:+ +#+ #
# +#+#+#+#+#+ +#+ #
# Created: 2023/06/22 11:08:02 by evmorvan #+# #+# #
# Updated: 2023/10/02 13:12:11 by evmorvan ### ########.fr #
# #
# **************************************************************************** #
NAME = minishell
CC = cc
CFLAGS = -Wall -Werror -Wextra
SRCS = $(addprefix sources/, \
minishell.c lexer/lexer.c \
utils/split_lexer.c utils/ft_epurstr.c \
env/env.c utils/node.c \
builtins/echo.c builtins/env.c builtins/pwd.c \
builtins/unset.c builtins/cd.c utils/ft_strtrim_lexer.c \
builtins/export.c builtins/exit.c expander/expander.c \
env/env2.c lexer/quote.c utils/debug.c signals/signals.c \
lexer/memory.c utils/misc.c utils/random.c \
parser/parser.c parser/utils.c parser/heredoc.c \
executor/executor.c executor/utils.c executor/misc.c \
utils/ft_add_space.c utils/misc2.c utils/quote.c \
executor/utils2.c env/init.c \
)
OBJS = ${SRCS:.c=.o}
.c.o:
${CC} ${CFLAGS} -c $< -o ${<:.c=.o}
${NAME}: ${OBJS}
$(MAKE) -C ./libft
${CC} ${OBJS} -o ${NAME} libft/libft.a -lreadline -I/opt/homebrew/Cellar/readline/8.2.1/include -L/opt/homebrew/Cellar/readline/8.2.1/lib
all: ${NAME}
clean:
${MAKE} -C ./libft clean
rm -f ${OBJS}
fclean: clean
${MAKE} -C ./libft fclean
rm -f ${NAME}
re: fclean all
.PHONY: all clean fclean re