-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
45 lines (33 loc) · 1.21 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
NAME = minishell
HEADER = includes/
LIBFT = libft/
FLAGS = -Wall -Wextra -Werror
LFLAGS = -L libft -lft
RFLAGS = -lreadline -I ./homebrew/Cellar/readline/8.1.1/include -L ./homebrew/Cellar/readline/8.1.1/lib
FOLDER = srcs
SRCS_LIST = minishell.c minishell2.c lex_utils.c parsing.c parsing2.c parsing3.c command.c debug.c signals.c\
utils.c utils2.c redirections.c red_utils.c utils3.c utils5.c utils6.c utils7.c utils4.c state.c state2.c \
state3.c command1.c command2.c command3.c parsing4.c executor.c pipe.c\
HOMEBREW = homebrew/opt/readline/lib
SRCS = $(addprefix ${FOLDER}/, ${SRCS_LIST})
all: $(HOMEBREW) $(LIB) $(NAME)
$(NAME):
@make -s -C $(LIBFT)
@gcc -o $(NAME) $(FLAGS) $(SRCS) $(LFLAGS) $(RFLAGS) -I $(HEADER) -lreadline -g
@echo "\033[1m$(NAME)\033[0m""\033[32m Compiled\033[0m"
$(HOMEBREW):
mkdir homebrew && curl -L https://github.com/Homebrew/brew/tarball/master | tar xz --strip 1 -C homebrew
./homebrew/bin/brew install readline
clean:
@make clean -C $(LIBFT)
@/bin/rm -f *.o
@echo "Objects ""\033[34m Cleaned\033[0m"
fclean: clean
@make fclean -C $(LIBFT)
@/bin/rm -f $(NAME)
@echo "Project ""\033[31m Cleaned\033[0m"
re: fclean all
git:
git add .
git commit -m "ft_tree"
git push