-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
69 lines (59 loc) · 2.34 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
61
62
63
64
65
66
67
68
69
# **************************************************************************** #
# #
# ::: :::::::: #
# Makefile :+: :+: :+: #
# +:+ +:+ +:+ #
# By: rabougue <[email protected]> +#+ +:+ +#+ #
# +#+#+#+#+#+ +#+ #
# Created: 2015/12/10 19:16:51 by rabougue #+# #+# #
# Updated: 2017/04/10 03:47:29 by rabougue ### ########.fr #
# #
# **************************************************************************** #
####################################_COLOR_#####################################
GREEN = \033[38;5;10m
GREY = \033[38;5;60m
RED = \033[38;5;9m
END = \033[0m
##################################_COMPILATION_#################################
NAME = minishell
CC = gcc
FLAG = -Weverything
#FLAG = -Wall -Wextra -Werror
LFT = ./libft/libft.a
SRCS = ./source/main.c\
./source/built_in.c\
./source/built_in_cd.c\
./source/env.c\
./source/lst.c\
./source/lst_2.c\
./source/tools.c\
./source/execute.c\
./source/unsetenv.c\
OBJS = $(SRCS:.c=.o)
INCLUDE = -I ./include \
-I ./libft
###########################_RELINK_MODIFY_.h####################################
RELINK = ./include/minishell.h
################################################################################
all: $(NAME)
$(NAME): $(OBJS)
@make -s -C ./libft/
@$(CC) $(FLAG) -o $(NAME) $(OBJS) $(LFT)
@printf "✅ Compilation done.\n"
%.o : %.c $(RELINK) ./Makefile
@printf " ✅ \r"
@printf "✅ $(notdir $<)\r"
@$(CC) -c $(FLAG) $< -o $@ $(INCLUDE)
clean:
@printf " \r"
@printf "✅ all .o deleted\n"
@rm -f $(OBJS)
@make -s clean -C ./libft/
fclean:
@printf " \r"
@printf "✅ libft.a, all .o and minishell deleted\n"
@rm -f $(NAME) $(OBJS)
@make -s fclean -C ./libft/
norme:
norminette | grep Error
re: fclean all