-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
66 lines (56 loc) · 2.28 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
# **************************************************************************** #
# #
# ::: :::::::: #
# Makefile :+: :+: :+: #
# +:+ +:+ +:+ #
# By: rabougue <[email protected]> +#+ +:+ +#+ #
# +#+#+#+#+#+ +#+ #
# Created: 2015/12/10 19:16:51 by rabougue #+# #+# #
# Updated: 2017/05/12 03:40:35 by rabougue ### ########.fr #
# #
# **************************************************************************** #
####################################_COLOR_#####################################
GREEN = \033[38;5;10m
GREY = \033[38;5;60m
RED = \033[38;5;9m
END = \033[0m
##################################_COMPILATION_#################################
NAME = ft_script
CC = gcc
FLAG = -Wall -Wextra -Werror
LFT = ./libft/libft.a
SRCS = ./source/main.c\
./source/sys.c\
./source/sys2.c\
./source/parsing_arg.c\
./source/tools.c\
./source/terminal.c\
./source/select.c\
OBJS = $(SRCS:.c=.o)
INCLUDE = -I ./include \
-I ./libft
###########################_RELINK_MODIFY_.h####################################
RELINK = ./include/script.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 ft_script deleted\n"
@rm -f $(NAME) $(OBJS)
@make -s fclean -C ./libft/
norme:
norminette | grep Error
re: fclean all