Repository navigation
Expand file tree
/
Copy pathMakefile
More file actions
67 lines (55 loc) · 1.91 KB
/
Copy pathMakefile
File metadata and controls
67 lines (55 loc) · 1.91 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
NAME = minishell
CC = gcc
CFLAGS = -Wall -Wextra -Werror -Iinclude -I/Users/mozahnou/.brew/opt/readline/include
LDFLAGS = -L/Users/mozahnou/.brew/opt/readline/lib -lreadline
SRCDIR = src
LIBFT_DIR = $(SRCDIR)/utils/libft
LIBFT = $(LIBFT_DIR)/libft.a
SOURCES = $(SRCDIR)/exec/executor.c \
$(SRCDIR)/exec/executor_single.c \
$(SRCDIR)/exec/executor_external.c \
$(SRCDIR)/exec/executor_pipe.c \
$(SRCDIR)/exec/redirection.c \
$(SRCDIR)/exec/signal.c \
$(SRCDIR)/exec/main.c \
$(SRCDIR)/exec/builtins.c \
$(SRCDIR)/exec/builtins_basic.c \
$(SRCDIR)/exec/builtins_export.c \
$(SRCDIR)/exec/builtins_exit.c \
$(SRCDIR)/exec/builtins_exit_utils.c \
$(SRCDIR)/exec/builtin_echo.c \
$(SRCDIR)/exec/builtin_cd.c \
$(SRCDIR)/exec/builtin_cd_utils.c \
$(SRCDIR)/parsing/heredoc.c \
$(SRCDIR)/parsing/heredoc_2.c \
$(SRCDIR)/parsing/path.c \
$(SRCDIR)/parsing/path_utils.c \
$(SRCDIR)/parsing/expand.c \
$(SRCDIR)/parsing/expand_2.c \
$(SRCDIR)/parsing/quotes.c \
$(SRCDIR)/parsing/free.c \
$(SRCDIR)/parsing/parse.c \
$(SRCDIR)/parsing/parse_utils.c \
$(SRCDIR)/parsing/parse_cmd.c \
$(SRCDIR)/parsing/env_basic.c \
$(SRCDIR)/parsing/env_unset.c \
$(SRCDIR)/parsing/lexer.c \
$(SRCDIR)/parsing/token_utils.c \
$(SRCDIR)/utils/error_handling.c \
$(SRCDIR)/utils/error_handeling_2.c \
OBJECTS = $(SOURCES:.c=.o)
all: $(NAME)
$(LIBFT):
make -C $(LIBFT_DIR)
$(NAME): $(LIBFT) $(OBJECTS) include/minishell.h
$(CC) $(OBJECTS) $(LIBFT) -o $(NAME) $(LDFLAGS)
%.o: %.c
$(CC) $(CFLAGS) -c $< -o $@
clean:
rm -f $(OBJECTS)
make -C $(LIBFT_DIR) clean
fclean: clean
rm -f $(NAME)
make -C $(LIBFT_DIR) fclean
re: fclean all
.PHONY: all clean fclean re