-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMakefile
More file actions
105 lines (95 loc) · 2.77 KB
/
Copy pathMakefile
File metadata and controls
105 lines (95 loc) · 2.77 KB
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
# **************************************************************************** #
# #
# ::: :::::::: #
# Makefile :+: :+: :+: #
# +:+ +:+ +:+ #
# By: nmatondo <marvin@42.fr> +#+ +:+ +#+ #
# +#+#+#+#+#+ +#+ #
# Created: 2024/07/06 01:32:20 by nmatondo #+# #+# #
# Updated: 2024/08/07 16:44:49 by nmatondo ### ########.fr #
# #
# **************************************************************************** #
CC = cc
DIR_LIBFT = ./libft/
LIBFT = $(DIR_LIBFT)libft.a
NAME = ./minishell
SRC = ./src/
INCLUDE = ./include
FILES = adjust_file_name.c \
adjust_file_name_util.c \
cd_1.c \
cd_2.c \
cd_3.c \
echo.c \
echo_util.c \
env_1.c \
env_2.c \
environment_variation_expansion_1.c \
environment_variation_expansion_2.c \
environment_variation_expansion_3.c \
environment_variation_expansion_util.c \
exec_all_redirect_directions.c \
exec_main_redirect.c \
exec_redirect_directions.c \
exec_redirection.c \
exec_redirection_util.c \
execute_commands_without_pipe.c \
execute_commands_with_pipe.c \
execute_commands_with_pipe_util.c \
exit_1.c \
exit_2.c \
export_1.c \
export_2.c \
export_3.c \
export_4.c \
heredoc.c \
heredoc_util_1.c \
heredoc_util_2.c \
lstnew_util_1.c \
lstnew_util_2.c \
main.c \
other_command.c \
other_command_util.c \
pwd.c \
redirection.c \
redirection_util_10.c \
redirection_util_1.c \
redirection_util_2.c \
redirection_util_3.c \
redirection_util_4.c \
redirection_util_5.c \
redirection_util_6.c \
redirection_util_7.c \
redirection_util_8.c \
redirection_util_9.c \
signs_handler.c \
split.c \
split_env_var_with_space.c \
split_env_var_with_space_util_1.c \
split_env_var_with_space_util_2.c \
unset.c \
util_1.c \
util_2.c \
util_3.c \
util_4.c \
util_5.c \
util_6.c \
SRC_FILES = $(addprefix $(SRC),$(FILES))
OBJ = $(FILES:.c=.o)
FLAGS = -Wall -Wextra -Werror
FLAGRL = -lreadline
PLIBFT = ./libft
all: $(NAME)
$(NAME): $(LIBFT)
$(CC) $(FLAGS) -c $(SRC_FILES) -I$(INCLUDE) -I$(DIR_LIBFT)
$(CC) $(FLAGS) $(OBJ) -o $(NAME) $(FLAGRL) -I$(INCLUDE) -I$(DIR_LIBFT) -L$(DIR_LIBFT) -lft
$(LIBFT):
$(MAKE) bonus -C $(DIR_LIBFT)
clean:
/bin/rm -f $(OBJ)
$(MAKE) clean -C $(DIR_LIBFT)
fclean: clean
/bin/rm -f $(NAME)
$(MAKE) fclean -C $(DIR_LIBFT)
re: fclean all
.PHONY: all clean fclean re