-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMakefile
More file actions
64 lines (52 loc) · 1.19 KB
/
Makefile
File metadata and controls
64 lines (52 loc) · 1.19 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
NAME = minishell
SRC = main.c \
signal.c \
env_queue.c \
env_list.c \
token_queue.c \
token_list.c \
check_syntax.c \
parse_tokens.c \
parser_quote.c \
parser_expand.c \
utils.c \
init_parser_state.c \
update_parser_state.c \
handle_builtin.c \
handle_execution.c \
execution.c \
handle_redirect.c \
heredoc.c \
handle_pipe.c \
get_next_argv.c \
list_to_envp.c \
get_pathname.c \
get_env.c \
list_free.c \
echo.c \
cd.c \
pwd.c \
export.c \
unset.c \
env.c \
exit.c \
global.c \
OBJ = $(SRC:.c=.o)
CFLAGS = -Wall -Wextra -Werror -g
CC = gcc
$(NAME) : $(OBJ) minishell.h
make -C libft
#$(CC) $(CFLAGS) $(OBJ) -L/Users/$(USER)/.brew/Cellar/readline/8.2.1/lib -lreadline -Llibft -lft -o $(NAME)
$(CC) $(CFLAGS) $(OBJ) -L/usr/local/opt/readline/lib -lreadline -Llibft -lft -o $(NAME)
%.o : %.c
#$(CC) $(CFLAGS) -c $< -I/Users/$(USER)/.brew/Cellar/readline/8.2.1/include -o $@
$(CC) $(CFLAGS) -c $< -I/usr/local/opt/readline/include -o $@
all : $(NAME)
clean :
$(RM) $(OBJ)
fclean : clean
$(RM) $(NAME)
re : fclean all
r : all
@./minishell
.PHONY : all clean fclean re