-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMakefile
More file actions
86 lines (67 loc) · 1.48 KB
/
Makefile
File metadata and controls
86 lines (67 loc) · 1.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
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
CC = gcc
INCLDIR = incl
OBJDIR = obj
SRCDIR = src
LIBFTDIR = libft
CFLAGS = -Wall -Wextra -Werror -I ${INCLDIR} #-g -fsanitize=address
RM = rm -f
NAME = minishell
LDFLAGS = -L $(shell brew --prefix readline)/lib -lreadline
CPPFLAGS = -I $(shell brew --prefix readline)/include
LIB_PATH = ${LIBFTDIR}/libft.a
FILES_MAIN = parser.c \
parser_quote.c \
parser_word.c \
synt_error.c \
token_list_moves.c \
token_separation.c \
token_split.c \
token_utility.c \
main.c \
init.c \
symtab_add.c \
symtab_operations.c \
symtab_remove.c \
exec_get.c \
exec_child.c \
exec_parent.c \
executor.c \
exec_errors.c \
heredoc.c \
heredoc_child.c \
heredoc_utils.c \
heredoc_var_exp.c \
exec_token_processing.c \
builtin_cd.c \
builtin_echo.c \
builtin_env.c \
builtin_pwd.c \
builtin_export.c \
builtin_export_var.c \
builtin_export_lst.c \
builtin_unset.c \
builtin_exit.c \
builtin_utils.c \
var_exp.c \
var_exp_word.c \
var_exp_utility.c \
main_support.c
OBJ = ${FILES_MAIN:%.c=${OBJDIR}/%.o}
SRC = ${FILES_MAIN:%.c=${SRCDIR}/%.c}
all : ${NAME}
${NAME} : ${LIB_PATH} ${OBJ}
${CC} ${CFLAGS} ${OBJ} ${LIB_PATH} ${LDFLAGS} ${CPPFLAGS} -o ${NAME}
${OBJDIR}/%.o : ${SRCDIR}/%.c
${CC} ${CFLAGS} ${CPPFLAGS} -c $^ -o $@
${OBJ} : | ${OBJDIR}
${OBJDIR} :
mkdir $@
${LIB_PATH} :
make -C ${LIBFTDIR}
re : fclean all
clean :
${RM} -R ${OBJDIR}
make fclean -C ${LIBFTDIR}
fclean : clean
${RM} ${NAME}
.PHONY: all clean fclean re