-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMakefile
More file actions
52 lines (38 loc) · 879 Bytes
/
Copy pathMakefile
File metadata and controls
52 lines (38 loc) · 879 Bytes
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
NAME = minishell
LIB = -lft -L./libft
SRCS_DIR = ./srcs/
FLAGS = -Wall -Wextra -Werror
SRCS = shell \
cd_builtin \
echo_builtin \
exec_commands \
get_input \
set_unset_env \
clean \
environment \
execution \
misk \
HEADER = -I./include \
-I./libft \
OBJ = $(addprefix obj/, $(addsuffix .o, $(SRCS)))
all: $(NAME)
obj/%.o: srcs/%.c
@gcc -c $< $(HEADER) -o $@
$(NAME): obj $(OBJ)
@tput setaf 7; tput bold; echo "Compiling LIB"
@make -C libft
@tput setaf 7; tput bold; echo "Compiling minishell"
@gcc $(OBJ) $(HEADER) -o $(NAME) $(LIB)
@tput setaf 2; tput bold; echo "DONE minishell"
obj:
@mkdir obj
clean:
@make -C libft clean
@rm -rf obj
@tput setaf 6; tput bold; echo "DONE Clean!"
fclean: clean
@make -C libft fclean
@rm -f $(NAME)
@tput setaf 6; tput bold; echo "DONE Fclean!"
re: fclean all
.PHONY: all clean fclean re