-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMakefile
More file actions
executable file
·72 lines (62 loc) · 1.47 KB
/
Makefile
File metadata and controls
executable file
·72 lines (62 loc) · 1.47 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
CX = cc
CXFLAGS = -Wall -Werror -Wextra -I includes -I/opt/homebrew/opt/readline/include -g3 -std=c99
LDFLAGS = -L/opt/homebrew/opt/readline/lib -lreadline
SRCS = main.c \
env/envp.c \
env/utils.c \
cmds/cd.c \
cmds/echo.c \
cmds/env.c \
cmds/export.c \
cmds/pwd.c \
cmds/unset.c \
cmds/exit.c \
cmds/builtin_utils.c \
cmds/builtin_cmds.c \
executor/cmd_searcher.c \
executor/executor.c \
executor/executor2.c \
executor/executor_utils.c \
executor/executor_utils2.c \
executor/executor_utils3.c \
executor/fd_utils.c \
executor/executor_utils4.c \
executor/executor_utils5.c \
executor/executor_utils6.c \
executor/execution_error.c \
executor/ft_heredoc.c \
executor/file_checker.c \
executor/relative_paths.c \
cmds_paths_utils.c \
line_reader.c \
free.c \
history_utils.c \
parser/tokenizer.c \
parser/parser.c \
parser/checker.c \
parser/cmd_info.c \
parser/utils.c \
parser/redir.c \
parser/env.c \
free2.c
OBJDIR = objs
OBJS = $(addprefix $(OBJDIR)/, $(SRCS:.c=.o))
NAME = minishell
LIBFT_DIR = libft
LIBFT = $(LIBFT_DIR)/libft.a
all: $(LIBFT) $(NAME)
$(NAME): $(OBJS)
$(CX) $(OBJS) -L $(LIBFT_DIR) -lft $(LDFLAGS) -o $(NAME)
$(LIBFT):
make -C $(LIBFT_DIR)
$(OBJDIR)/%.o: %.c
@mkdir -p $(dir $@)
$(CX) $(CXFLAGS) -c $< -o $@
clean:
rm -rf $(OBJDIR)
make clean -C $(LIBFT_DIR)
fclean: clean
rm -f $(NAME)
make fclean -C $(LIBFT_DIR)
re: fclean all
.PHONY: all clean fclean re