-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathmakefile
74 lines (66 loc) · 1.57 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
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
src = cleanup/clean_up.c \
lexing/check_input.c \
lexing/create_token.c \
lexing/ft_split.c \
lexing/ft_split_helper.c \
lexing/handle_operator.c \
lexing/handle_quotes.c \
lexing/handle_word.c \
lexing/tokenazation.c \
lexing/trim_string.c \
lexing/unclosed_quotes.c \
parsing/parse_cmd.c \
parsing/parse_utils.c \
parsing/parse_utile_2.c \
parsing/remove_quotes.c \
parsing/redirection.c \
expansion/expand_dollar.c \
expansion/expand.c \
expansion/split_value.c \
expansion/expand_string.c \
built-in/init_env.c \
built-in/env.c \
built-in/built_exe.c\
built-in/cd.c\
built-in/echo.c\
built-in/pwd.c\
built-in/unset.c\
built-in/export.c\
built-in/exit.c\
built-in/export_helper.c\
main.c \
execution/exec_utils.c\
execution/exec_utils2.c\
execution/exec_utils3.c\
execution/execute_command_line.c\
execution/here_doc.c\
execution/expand_string_hec.c\
execution/here_doc_utils.c\
execution/get_next_line.c\
execution/pipes.c\
execution/redirection.c\
syntax_checker/syntax_checker.c\
syntax_checker/syntax_utils.c\
syntax_checker/syntax_utils2.c\
signals/signals.c\
OBJ = $(src:.c=.o)
NAME = minishell
LIBFT_DIR = libft
libft = $(LIBFT_DIR)/libft.a
flags = -Wall -Wextra -Werror
all: $(NAME)
$(NAME): $(OBJ) $(libft)
cc $(flags) $(OBJ) -o $(NAME) $(libft) -lreadline
# -fsanitize=address
$(libft):
@make -s -C $(LIBFT_DIR)
%.o: %.c
cc $(flags) -c $< -o $@
clean:
rm -f $(OBJ)
@make clean -s -C $(LIBFT_DIR)
fclean: clean
rm -f $(NAME)
@make fclean -s -C $(LIBFT_DIR)
re: fclean all
.SECONDARY: $(OBJ)