-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathMakefile
65 lines (55 loc) · 1.54 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
NAME = minishell
CC = cc
CFLAGS = -Wall -Werror -Wextra -g
LIBS = -L ./$(LIBFT) -lft -lreadline
RM = rm -rf
LIBFT = libft
SRC_DIR = src
INC_DIR = include
B_INS = builtins
PARSER = parser
SUBS = shell_subsystems
XCTOR = executor
VAL = --leak-check=full \
--show-leak-kinds=all \
--track-origins=yes \
--verbose \
--log-file=valgrind_log.txt \
--suppressions=readline.supp
SRC = minishell.c \
$(SRC_DIR)/$(B_INS)/builtin_utils.c \
$(SRC_DIR)/$(B_INS)/heredoc.c \
$(SRC_DIR)/$(B_INS)/io_control.c \
$(SRC_DIR)/$(B_INS)/navigation.c \
$(SRC_DIR)/$(B_INS)/variable_env.c \
$(SRC_DIR)/$(XCTOR)/builtin_executor.c \
$(SRC_DIR)/$(XCTOR)/command_executor.c \
$(SRC_DIR)/$(XCTOR)/command_parser.c \
$(SRC_DIR)/$(XCTOR)/executor_utils.c \
$(SRC_DIR)/$(XCTOR)/file_executor.c \
$(SRC_DIR)/$(XCTOR)/process_management.c \
$(SRC_DIR)/$(PARSER)/command_parsing.c \
$(SRC_DIR)/$(PARSER)/expansion_aux.c \
$(SRC_DIR)/$(PARSER)/parser.c \
$(SRC_DIR)/$(PARSER)/parsing_utils.c \
$(SRC_DIR)/$(PARSER)/string_aux.c \
$(SRC_DIR)/$(PARSER)/string_handling.c \
$(SRC_DIR)/$(PARSER)/syntax_parsing.c \
$(SRC_DIR)/$(PARSER)/tokenization.c \
$(SRC_DIR)/free_memory.c \
$(SRC_DIR)/general.c \
$(SRC_DIR)/signals.c \
OBJ = $(SRC:.c=.o)
all: $(NAME)
$(NAME): $(OBJ)
@make -C $(LIBFT)
@$(CC) $(CFLAGS) $(SRC) -o $@ $(LIBS)
clean:
make clean -C $(LIBFT)
@$(RM) $(OBJ)
fclean: clean
@make fclean -C $(LIBFT)
@$(RM) $(NAME)
re: fclean all
valgrind $(VAL) ./$(NAME)
.PHONY: all clean fclean re