-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
94 lines (80 loc) · 2.16 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
#**************************************************************************** #
# #
# ::: :::::::: #
# Makefile :+: :+: :+: #
# +:+ +:+ +:+ #
# By: zhabri <[email protected]> +#+ +:+ +#+ #
# +#+#+#+#+#+ +#+ #
# Created: 2022/09/04 08:44:16 by zhabri #+# #+# #
# Updated: 2023/01/12 14:29:11 by zhabri ### ########.fr #
# #
# **************************************************************************** #
CC = clang
CFLAGS = -Wall -Wextra -Werror -I. -g
LIBFTFLAGS = -Llibft -lft -Ilibft/includes
RM = rm -f
NAME = minishell
SRCS = add_cmd.c \
arg.c \
builtin.c \
cd.c \
dollar.c \
echo.c \
env.c \
errors.c \
exit.c \
export.c \
find_cmd.c \
find_ops.c \
ft_atoll.c \
ft_split_quotes.c \
ft_split_sep.c \
ft_strjoinf.c \
ft_strtrimf.c \
get_after.c \
get_sum.c \
heredocs.c \
insert_node.c \
main_utils.c \
minishell.c \
nuke.c \
open.c \
pipe_error.c \
pipex.c \
pipex_children.c \
print.c \
pwd.c \
remove_quotes.c \
signal.c \
split_cmds.c \
unset.c \
utils.c \
utils_bis.c \
utils_cd.c \
utils_dollar.c \
utils_exit.c \
utils_export.c \
utils_export_bis.c \
utils_heredocs.c \
utils_pipex.c \
utils_pipex_bis.c \
utils_signal.c \
utils_table.c \
utils_ter.c
OBJS = $(SRCS:.c=.o)
%.o: %.c
$(CC) $(CFLAGS) -c $< -o $@
$(NAME): $(OBJS)
@make --no-print-directory -sC libft
$(CC) $(CFLAGS) $(OBJS) $(LIBFTFLAGS) -lreadline -o $@
all: $(NAME)
clean:
make clean -sC libft
$(RM) $(OBJS)
fclean: clean
make fclean -sC libft
$(RM) $(NAME)
re:
make fclean
make all
.PHONY: all clean fclean re