-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
60 lines (50 loc) · 1.12 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
NAME = minishell
LIB = includes/libft/libft.a
CFLAGS = -Wall -Werror -Wextra
# CFLAGS = -Wall -Werror -Wextra -g3
CC = cc
VPATH = ./srcs/:./srcs/builtin:./srcs/exec:./srcs/signals:./srcs/parsing:./srcs/env:./srcs/utils: \
./srcs/parsing/heredoc
LIBFT_PATH = ./includes/libft
INC = -Iincludes/
SRC_FILES = main \
check_input\
env \
signals \
check_input_utils \
utils \
tokenizer \
token_utils \
env_utils \
clean \
token_utils2 \
parsing \
expand \
expand_utils \
exec \
exec_utils \
exec_free \
heredoc \
builtin_ch builtin_utils\
cd echo env_cmd exit export export_utils \
pwd unset \
signals_child \
exec_utils2 \
signals_heredoc \
no_env \
OBJ = $(addsuffix .o, $(SRC_FILES))
all: $(LIB) $(NAME)
%.o: %.c
$(CC) $(CFLAGS) $(INC) -I/usr/include -Isrcs/builtin -c $< -o $@
$(NAME): $(OBJ)
$(CC) $(INC) $(OBJ) $(LIB) -o $(NAME) -lreadline
$(LIB):
@make -s -C $(LIBFT_PATH)
clean:
@make -s $@ -C $(LIBFT_PATH)
rm -f ${OBJ}
fclean: clean
@make -s $@ -C $(LIBFT_PATH)
rm -f ${NAME}
re: fclean all
.PHONY: all clean fclean re