-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
84 lines (64 loc) · 2.81 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
76
77
78
79
80
81
82
83
84
# **************************************************************************** #
# #
# ::: :::::::: #
# Makefile :+: :+: :+: #
# +:+ +:+ +:+ #
# By: gbaud <[email protected]> +#+ +:+ +#+ #
# +#+#+#+#+#+ +#+ #
# Created: 2020/03/04 12:37:16 by fbuthod- #+# #+# #
# Updated: 2020/09/19 11:33:06 by gbaud ### ########.fr #
# #
# **************************************************************************** #
# **************************************************************************** #
# VARIABLES #
# **************************************************************************** #
CC=clang
CFLAGS=-Wall -Wextra -Werror -g3 -fsanitize=address -I ./includes/
NAME=minishell
SRCS = ./src/main.c \
./src/env/ft_env_manager_utils.c \
./src/env/ft_env_manager.c \
./src/env/ft_replace_env.c \
./src/execution/ft_exec_part_one.c \
./src/execution/ft_exec_part_two.c \
./src/execution/ft_exec.c \
./src/execution/ft_commands_manager.c \
./src/execution/ft_file_descriptor_manager.c \
./src/parser/ft_get_command_list.c \
./src/parser/ft_split_quotes.c \
./src/parser/ft_split_quotes_basics.c \
./src/parser/ft_free_error.c \
./src/parser/ft_checker.c \
./src/parser/ft_lexer.c \
./src/builtins/ft_env.c \
./src/builtins/ft_unset.c \
./src/builtins/ft_export_utils.c \
./src/builtins/ft_export.c \
./src/builtins/ft_pwd.c \
./src/builtins/ft_exit.c \
./src/builtins/ft_echo.c \
./src/builtins/ft_cd.c \
./src/utils/ft_signals.c
LIBFT = ./libft/libft.a
HEADER = includes/minishell.h
OBJS = $(SRCS:.c=.o)
RM = rm -f
# **************************************************************************** #
# RULES #
# **************************************************************************** #
%.c%.o:
$(CC) $(CFLAGS) -c $< -o $@
all: $(NAME)
$(OBJS): $(INC)
lib:
$(MAKE) -C libft
$(NAME): $(OBJS) $(HEADER) lib
$(CC) $(CFLAGS) $(OBJS) $(LIBFT) -o $(NAME)
clean:
$(RM) $(OBJS)
cd libft && make clean
fclean: clean
$(RM) $(NAME)
cd libft && make fclean
re: fclean all
.PHONY: all bonus clean fclean re lib