-
Notifications
You must be signed in to change notification settings - Fork 1
/
Makefile
75 lines (63 loc) · 1.74 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
GREEN = \033[0;92;1m
YELLOW = \033[0;33;1m
PINK = \033[0;95;1m
BLUE = \033[0;94;1m
DEF_COLOR = \033[0;37m
NAME = minishell
CC = cc
CFLAGS = -Wall -Wextra -Werror -g
SRCS = src/prompt.c \
src/lexer/scanner.c \
src/lexer/scanner_utils.c \
src/lexer/lexer.c \
src/lexer/lexer_error.c \
src/lexer/lexer_utils.c \
src/lexer/lexer_utils_list.c \
src/expand/expander.c \
src/expand/expander_utils.c \
src/parser/parser.c \
src/parser/parser_utils.c \
src/parser/parser_utils_list.c \
src/execution/executor.c \
src/execution/executor_utils.c \
src/execution/set_env.c \
src/execution/cd.c \
src/execution/errors.c \
src/execution/exits.c \
src/execution/execute_pipeline.c \
src/builtin/export.c \
src/builtin/export_utils.c \
src/builtin/echo.c \
src/builtin/heredoc.c \
src/builtin/unset.c \
src/builtin/export_sort.c \
src/signals/signals.c \
src/traverse.c \
src/minishell.c \
src/minishell_utils.c \
src/minishell_utils_2.c \
LIBFT_DIR = ./libft
FT_ALLOC = ./destructor/ft_alloc.a
LIBFT = ./libft/libft.a
DESTRUCTOR_DIR = ./destructor
all: $(FT_ALLOC) $(LIBFT) $(NAME)
$(FT_ALLOC):
@$(MAKE) -sC $(DESTRUCTOR_DIR)
$(LIBFT):
@$(MAKE) bonus -sC $(LIBFT_DIR)
$(NAME): $(SRCS)
@$(CC) $(CFLAGS) $(SRCS) $(LIBFT) $(FT_ALLOC) -lreadline -o $@
@echo "$(PINK)꒰ᐢ. .ᐢ꒱$(DEF_COLOR) minishell compiled successfully!"
clean:
@$(MAKE) clean -sC $(LIBFT_DIR)
fclean: clean
@$(MAKE) fclean -sC $(LIBFT_DIR)
@$(MAKE) fclean -sC $(DESTRUCTOR_DIR)
@rm -rf $(NAME)
@echo "$(YELLOW)✧・゚:* ꒰ᐢ. .ᐢ꒱ :゚・✧$(DEF_COLOR) minishell cleaned!"
re: fclean all
git:
@git add .
@git commit -m "$m"
@git push
.PHONY: all clean fclean re