-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathMakefile
63 lines (51 loc) · 1.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
# **************************************************************************** #
# #
# ::: :::::::: #
# Makefile :+: :+: :+: #
# +:+ +:+ +:+ #
# By: kblack <marvin@42.fr> +#+ +:+ +#+ #
# +#+#+#+#+#+ +#+ #
# Created: 2019/02/02 11:59:37 by kblack #+# #+# #
# Updated: 2019/03/13 14:06:36 by kblack ### ########.fr #
# #
# **************************************************************************** #
NAME = minishell
CC = gcc
CFLAGS = -Wall -Wextra -Werror
SRC = cd_command.c \
echo_command.c \
env_command.c \
exit_command.c \
free_list.c \
main.c \
mini_execute.c \
mini_loop.c \
setenv_command.c \
unsetenv_command.c \
utilities.c \
utilities_cont.c
INC_FT = -I includes/libft
LINK_FT = -L includes/libft -lft
FT = $(INC_FT) $(LINK_FT)
INC_PT = -I includes/ft_printf
LINK_PT = -L includes/ft_printf -lftprintf
PT = $(INC_PT) $(LINK_PT)
OFL = $(SRC:.c=.o)
all: $(NAME)
$(NAME): $(OFL)
make -C includes/libft
make -C includes/ft_printf
$(CC) -o $@ $(CFLAGS) $(FT) $(PT) $(OFL) -I .
$(OFL): $(SRC)
@$(CC) $(CFLAGS) $(INC_FT) $(INC_PT) -I . -c $(SRC)
clean:
rm -rf $(OFL)
make -C includes/libft clean
make -C includes/ft_printf clean
fclean: clean
rm -rf $(NAME)
make -C includes/libft fclean
make -C includes/ft_printf fclean
re: fclean all
make -C includes/libft re
make -C includes/ft_printf re