-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMakefile
More file actions
50 lines (42 loc) · 2.48 KB
/
Makefile
File metadata and controls
50 lines (42 loc) · 2.48 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
# **************************************************************************** #
# #
# ::: :::::::: #
# Makefile :+: :+: :+: #
# +:+ +:+ +:+ #
# By: sdell-er <sdell-er@student.42.fr> +#+ +:+ +#+ #
# +#+#+#+#+#+ +#+ #
# Created: 2024/01/16 19:17:18 by sdell-er #+# #+# #
# Updated: 2024/08/11 15:17:44 by sdell-er ### ########.fr #
# #
# **************************************************************************** #
NAME = minishell
MY_LIB = ./my_lib
SRC = main.c \
General/env_utils.c General/handle_signals.c \
Parsing/add_node.c Parsing/balanced.c Parsing/control_chars.c \
Parsing/expand_calculate.c Parsing/expand_utils.c Parsing/expand_wrapper.c Parsing/heredoc_and_quotes.c Parsing/history.c \
Parsing/shell_loop.c Parsing/more_pipes_and_quotes.c Parsing/remove_empty.c Parsing/remove_spaces.c \
Parsing/expand_common.c Parsing/expand_handlers.c Parsing/expand_main.c \
Parsing/syntax_error.c Parsing/tokenize.c \
Executer/executer.c Executer/clean.c Executer/executer_utils.c Executer/ft_heredocs.c Executer/execute_command.c \
Builtins/exit_builtin.c Builtins/echo_builtin.c Builtins/pwd_builtin.c Builtins/env_builtin.c \
Builtins/unset_builtin.c Builtins/export_builtin.c Builtins/cd_builtin.c
FLAGS = -g -Wall -Wextra -Werror -lreadline
CC = cc
all: $(NAME)
$(NAME): $(SRC)
@make -C $(MY_LIB) 2>&1 | grep -v 'Leaving directory' | grep -v 'Entering directory'
@$(CC) $(SRC) -o $(NAME) -L$(MY_LIB) -lmy_lib $(FLAGS)
@echo "\e[0;93m[$(NAME)] compiled!\e[0m"
clean:
@make clean -C $(MY_LIB) 2>&1 | grep -v 'Entering directory' | grep -v 'Leaving directory'
fclean:
@make fclean -C $(MY_LIB) 2>&1 | grep -v 'Entering directory' | grep -v 'Leaving directory'
@rm -f $(NAME)
@rm -f .history
@echo "\e[0;91m[$(NAME)] deleted!\e[0m"
val: all
clear
valgrind --suppressions=readline.supp --leak-check=full --show-leak-kinds=all --track-origins=yes --tool=memcheck --keep-debuginfo=yes --track-fds=yes --trace-children=yes ./minishell
re: fclean all
.PHONY: all clean fclean re