-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
85 lines (67 loc) · 1.66 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
NAME = minishell
CC = gcc
CFLAGS = -g -Wall -Wextra -Werror
LIBFT_FLAGS = -lft -L./lib/libft
INC = -I./includes
RM = rm -rf
BUILTIN_SRCS = \
ft_first_envv.c \
ft_env.c \
ft_execve.c \
ft_export.c \
ft_unset.c \
ft_cd.c \
ft_echo.c \
ft_pwd.c \
ft_exit.c
BUILTIN_SRCS_DIR = ./srcs/builtin
COMMAND_SRCS = \
ft_pipe.c \
ft_redirection.c \
ft_semicolon.c \
ft_controller.c \
ft_command_utils.c \
ft_pipe_utils.c \
ft_pipe_utils_2.c \
ft_check_cmd.c \
ft_execute_builtin_utils_1.c \
ft_execute_builtin_utils_2.c
COMMAND_SRCS_DIR = ./srcs/command
PARSING_SRCS = \
ft_parsing_push.c \
ft_parsing_second.c \
ft_parsing_first.c \
ft_parsing_second_utils.c
PARSING_SRCS_DIR = ./srcs/parsing
UTILS_SRCS = \
double_ptr_utils.c \
list_print.c
# get_next_line.c \ -> libft 안에 넣어놨음
UTILS_SRCS_DIR = ./srcs/utils
ERROR_SRCS = \
ft_error_free_utils.c \
ft_error.c \
ft_parsing_error.c
ERROR_SRCS_DIR = ./srcs/error
SRCS_LIST = \
$(addprefix $(PARSING_SRCS_DIR)/, $(PARSING_SRCS)) \
$(addprefix $(UTILS_SRCS_DIR)/, $(UTILS_SRCS)) \
$(addprefix $(BUILTIN_SRCS_DIR)/, $(BUILTIN_SRCS)) \
$(addprefix $(COMMAND_SRCS_DIR)/, $(COMMAND_SRCS)) \
$(addprefix $(ERROR_SRCS_DIR)/, $(ERROR_SRCS)) \
./srcs/main.c
OBJS = $(SRCS:%.c=%.o)
all : $(NAME)
$(NAME) : $(OBJS) $(SRCS_LIST)
$(MAKE) -C lib/libft bonus
$(CC) $(CFLAGS) $(INC) $(SRCS_LIST) $(LIBFT_FLAGS) -o $(NAME)
clean :
$(MAKE) -C lib/libft clean
$(RM) $(OBJS)
fclean : clean
$(MAKE) -C lib/libft fclean
$(RM) $(NAME)
re : fclean all
norminette :
norminette $(SRCS_LIST)
.PHONY: all bonus clean fclean re