-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
126 lines (113 loc) · 3.93 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
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
# **************************************************************************** #
# #
# ::: :::::::: #
# Makefile :+: :+: :+: #
# +:+ +:+ +:+ #
# By: moel-asr <moel-asr@student.1337.ma> +#+ +:+ +#+ #
# +#+#+#+#+#+ +#+ #
# Created: 2023/02/05 17:07:31 by moel-asr #+# #+# #
# Updated: 2023/03/15 22:44:58 by moel-asr ### ########.fr #
# #
# **************************************************************************** #
NAME = minishell
RE_PATH = ~/brew/opt/readline/
LFLAGS = -lreadline -L $(RE_PATH)/lib -I $(RE_PATH)/include
CFLAGS = -Wall -Wextra -Werror
SRCS = minishell_utils/catch_eof.c \
minishell_utils/catch_heredoc_eof.c \
minishell_utils/check_errors_and_redisplay.c \
minishell_utils/check_quotes_and_redisplay.c \
minishell_utils/count_words.c \
minishell_utils/free_minishell.c \
minishell_utils/free_parser.c \
minishell_utils/free_token.c \
minishell_utils/ft_free.c \
minishell_utils/ft_perror.c \
minishell_utils/sigint_handler.c \
minishell_utils/sigquit_handler.c \
minishell_utils/start_minishell.c \
lexer/advance_with_token.c \
lexer/create_token_list.c \
lexer/expand_dollar_sign_variable.c \
lexer/expand_variable.c \
lexer/init_lexer.c \
lexer/init_token.c \
lexer/is_env_variable.c \
lexer/is_not_special_char.c \
lexer/lexer_advance.c \
lexer/lexer_get_char_as_string.c \
lexer/lexer_get_operator.c \
lexer/lexer_get_string_in_quotes.c \
lexer/lexer_get_string_or_char.c \
lexer/lexer_get_string.c \
lexer/lexer_get_token.c \
lexer/lexer_process_quotes_and_chars.c \
lexer/process_quoted_string_token.c \
lexer/skip_whitespace_backwards.c \
lexer/skip_whitespace.c \
lexer/split_variable.c \
lexer/token_add_back.c \
lexer/token_last.c \
parser/check_ambiguous_redirect.c \
parser/check_export.c \
parser/check_heredoc_variables.c \
parser/check_operators_syntax_errors.c \
parser/check_quotes.c \
parser/check_string_syntax_errors.c \
parser/check_syntax_errors_plus.c \
parser/check_syntax_errors.c \
parser/check_token_type.c \
parser/commands_count.c \
parser/concatenate_chars_until_termination.c \
parser/count_heredocs.c \
parser/expand_heredoc_var_and_join.c \
parser/expand_heredoc_var_with_status.c \
parser/expand_heredoc_variable.c \
parser/get_char_as_string.c \
parser/get_cmd_size.c \
parser/handle_heredoc_input.c \
parser/handle_heredoc.c \
parser/handle_input_redirection.c \
parser/handle_operators_tokens.c \
parser/handle_output_append_operator.c \
parser/handle_output_redirection.c \
parser/init_parser.c \
parser/parse_and_store_command.c \
parser/parse_command_with_export_check.c \
parser/parser_add_back.c \
execution/strlen.c \
execution/handle_single_command.c \
execution/pipex.c \
execution/pipex_utils.c \
execution/multiple.c \
execution/execution_utils1.c \
execution/execution_utils2.c \
execution/execution_utils3.c \
execution/execution_utils4.c \
execution/execution_utils5.c \
execution/execution_utils6.c \
execution/execution_utils7.c \
execution/execution_utils8.c \
execution/execution_utils9.c \
execution/execution_utils10.c \
execution/execution_utils11.c \
execution/execution_utils12.c \
execution/execution_utils13.c \
execution/execution_utils14.c \
execution/builtins.c \
main.c
OBJS = $(SRCS:.c=.o)
all : $(NAME)
$(NAME) : $(OBJS)
make -C minilibft
$(CC) $(CFLAGS) $(LFLAGS) minilibft/minilibft.a $(OBJS) -o $(NAME)
clean :
$(RM) $(OBJS)
make clean -C minilibft
fclean : clean
$(RM) $(NAME)
make fclean -C minilibft
re : fclean all
run : re
./minishell
.PHONY : clean fclean