-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
66 lines (50 loc) · 1.37 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
SRCS = srcs/main.c \
srcs/redirect.c \
srcs/exec_cmd/exec_cmd.c \
srcs/exec_cmd/make_fork.c \
srcs/builtins/get_basic_commands.c \
srcs/builtins/get_unset.c \
srcs/builtins/print_exp.c \
srcs/parse/parse.c \
srcs/parse/parse_tokens.c \
srcs/parse/parse_quotes.c \
srcs/parse/parse_dollar.c \
srcs/utils/string_methods.c \
srcs/utils/clear.c \
srcs/utils/data_methods.c \
srcs/utils/array_methods.c \
srcs/utils/utils.c \
srcs/utils/utils_2.c \
srcs/utils/utils_3.c \
srcs/termc/term_caps.c \
srcs/termc/select_cap.c \
srcs/termc/create_history.c \
srcs/termc/signal.c \
LIBFT = libft/libft.a
TCAP_FLAGS = -ltermcap
HDRS = libft
NAME = minishell
CC = gcc
RM = rm -f
CFLAGS =
$(NAME): $(LIBFT) $(HDRS) $(SRCS) mshell.h
@cp $(LIBFT) .
$(CC) $(CFLAGS) $(SRCS) $(TCAP_FLAGS) -I./libft -I. libft.a -o $(NAME)
@echo "\033[36mminishell is compiled successfully\n\033[0m"
$(LIBFT):
@$(MAKE) -C ./libft
@echo "\033[36mlibft is compiled successfully\n\033[0m"
all: $(NAME)
clean:
$(RM) $(NAME)
leaks:
$(CC) $(SRCS) -g $(TCAP_FLAGS) -I./libft libft.a -o $(NAME) -fsanitize=address -fno-omit-frame-pointer -ggdb
fclean: clean
make fclean -C libft/
$(RM) $(NAME) libft.a
echo > bash.txt
@echo "\033[36mDone!\n\033[0m"
re: fclean all
norm:
norminette
.PHONY: all clean fclean re norm