-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathMakefile
More file actions
79 lines (68 loc) · 2.15 KB
/
Makefile
File metadata and controls
79 lines (68 loc) · 2.15 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
# **************************************************************************** #
# #
# ::: :::::::: #
# Makefile :+: :+: :+: #
# +:+ +:+ +:+ #
# By: hlehmann <hlehmann@student.42wolfsburg.de +#+ +:+ +#+ #
# +#+#+#+#+#+ +#+ #
# Created: 2022/04/11 15:00:58 by hlehmann #+# #+# #
# Updated: 2022/04/11 15:01:00 by hlehmann ### ########.fr #
# #
# **************************************************************************** #
NAME = minishell
CC = gcc
FLAGS = -Wall -Werror -Wextra
RM = rm -f
LFT = ./lft
SR = ./src/
BI = $(SR)built-ins/
CMI = $(SR)cmd_interpret/
LU = $(CMI)launch/
CL = $(CMI)clean/
PR = $(CMI)parse/ms_
SRC = $(SR)main.c \
$(BI)cd.c \
$(BI)echo.c \
$(BI)env.c \
$(BI)exit.c \
$(BI)export.c \
$(BI)pwd.c \
$(BI)signals.c \
$(BI)unset.c \
$(PR)arg_split.c \
$(PR)cmd.c \
$(PR)parse.c \
$(PR)pipe_split.c \
$(PR)rmv_quotes.c \
$(PR)whitespace.c \
$(PR)fd.c \
$(CMI)ms_extract_cmd.c \
$(CMI)ms_launch_cmd.c \
$(LU)ms_exec_builtins.c \
$(LU)ms_pipe.c \
$(CMI)vars.c \
$(CL)ms_free_seq.c \
$(CL)ms_close_fd.c \
OBJ = $(SRC:.c=.o)
all: $(NAME)
$(NAME): $(SRC)
make bonus -C $(LFT)
$(CC) $(FLAGS) $(SRC) $(LFT)/libft.a -o $(NAME) -I $(HOME)/goinfre/.brew/opt/readline/include/ -L $(HOME)/goinfre/.brew/opt/readline/lib/ -l readline
clean:
make clean -C $(LFT)
$(RM) $(OBJ)
fclean: clean
make fclean -C $(LFT)
$(RM) $(NAME)
bonus:
touch ~/.bashrc
cp ~/.bashrc ~/.pbashrc
echo PS1='"''\e[95mM\e[35mi\e[31mn\e[91mi\e[93ms\e[0;32mh\e[34me\e[0;94ml\e[0;96ml \e[1;41;97mB\e[4;0;31monus \e[0;0m§ ''"' > ~/.bashrc
gcc $(SR)bonus.c -o minishell
./minishell
rm minishell
rm ~/.bashrc
cp ~/.pbashrc ~/.bashrc
rm ~/.pbashrc
re: fclean all
.PHONY: all clean fclean re