-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
107 lines (97 loc) · 2.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
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
# **************************************************************************** #
# #
# ::: :::::::: #
# Makefile :+: :+: :+: #
# +:+ +:+ +:+ #
# By: earnaud <[email protected]> +#+ +:+ +#+ #
# +#+#+#+#+#+ +#+ #
# Created: 2021/01/06 14:15:36 by earnaud #+# #+# #
# Updated: 2021/05/30 23:31:26 by earnaud ### ########.fr #
# #
# **************************************************************************** #
SRCS_DIR = srcs
FILES = args_tree.c \
cmd.c \
env.c \
exec.c \
main.c \
prompt.c \
put.c \
router.c \
pars_files.c \
pars_command.c \
parsing_len.c \
parsing_states.c \
skip.c \
split_args.c \
update_env.c \
update_history.c \
update_shell.c \
free.c \
cmd_util.c \
cmd_util2.c \
pars_command2.c \
$(addprefix builtin/, \
cd.c \
echo.c \
env.c \
exit.c \
export.c \
pwd.c \
unset.c) \
$(addprefix termcaps/, \
ctrl.c \
escape_code.c \
put.c \
read.c) \
$(addprefix utils/, \
ft_arrlen.c \
ft_atoi.c \
ft_bzero.c \
ft_calloc.c \
ft_isalpha.c \
ft_isdigit.c \
ft_lstadd_back.c \
ft_lstadd_front.c \
ft_lstlast.c \
ft_lstsize.c \
ft_memcpy.c \
ft_memmove.c \
ft_memset.c \
ft_putchar.c \
ft_split.c \
ft_static_itoa.c \
ft_strarrdup.c \
ft_strarrstr.c \
ft_strccmp.c \
ft_strcdup.c \
ft_strchr.c \
ft_strcidup.c \
ft_strcmp.c \
ft_strcpy.c \
ft_strdup.c \
ft_strinstr.c \
ft_strjoin.c \
ft_strlcpy.c \
ft_strlen.c \
ft_strndup.c \
ft_strnstr.c \
ft_substr.c)
SRCS = $(addprefix $(SRCS_DIR)/, $(FILES))
OBJS = $(SRCS:.c=.o)
NAME = minishell
CC = clang
CFLAGS = -Wall -Wextra -Werror
LIBS = -ltermcap
INCLUDES = -Iincludes
%.o: %.c
$(CC) $(CFLAGS) $(INCLUDES) -c $< -o $@
all: $(NAME)
$(NAME): $(OBJS)
$(CC) $(CFLAGS) $(OBJS) $(INCLUDES) -o $(NAME) $(LIBS)
clean:
$(RM) $(OBJS)
fclean: clean
$(RM) $(NAME)
re: fclean all
.PHONY: all clean fclean re