-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
75 lines (64 loc) · 2.64 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
70
71
72
73
74
75
# **************************************************************************** #
# #
# ::: :::::::: #
# Makefile :+: :+: :+: #
# +:+ +:+ +:+ #
# By: rabougue <marvin@42.fr> +#+ +:+ +#+ #
# +#+#+#+#+#+ +#+ #
# Created: 2015/12/10 19:16:51 by rabougue #+# #+# #
# Updated: 2017/01/18 21:47:46 by rabougue ### ########.fr #
# #
# **************************************************************************** #
####################################_COLOR_#####################################
GREEN = \033[38;5;10m
GREY = \033[38;5;60m
RED = \033[38;5;9m
END = \033[0m
##################################_COMPILATION_#################################
NAME = lem-in
CC = gcc
FLAG = #-Wall -Wextra -Werror
LFT = ./libft/libft.a
SRC = ./source
SRCS = $(SRC)/main.c \
$(SRC)/map.c \
$(SRC)/parsing.c \
$(SRC)/parsing_2.c \
$(SRC)/parsing_ants.c \
$(SRC)/parsing_room.c \
$(SRC)/parsing_room_2.c \
$(SRC)/parsing_command.c \
$(SRC)/parsing_comment.c \
$(SRC)/parsing_link.c \
$(SRC)/error.c \
$(SRC)/algo.c \
$(SRC)/algo_2.c \
$(SRC)/print_ants.c \
$(SRC)/tools.c \
INCLUDE = -I ./include/ -I ./libft/includes/
OBJS = $(SRCS:.c=.o)
###########################_RELINK_MODIFY_.h####################################
RELINK_H = ./include/common.h
################################################################################
###################################Compilation##################################
all: $(NAME)
$(NAME): $(OBJS)
@make -s -C ./libft/
@$(CC) $(LFT) $(OBJS) -o $(NAME)
@printf "\n✅ Compilation done.\n"
%.o : %.c $(RELINK_H) ./Makefile
@$(CC) -c $(FLAG) $< $(INCLUDE) -o $@
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 rabougue.filler deleted\n"
@rm -f $(NAME) $(CHECKER) $(OBJS) $(OBJS_CHECKER)
@make -s fclean -C ./libft/
re: fclean all
norme:
norminette ./include/common.h ./libft/*.c ./libft/includes/*.h ./source/*.c \
./libft/ft_fprintf/includes/ft_fprintf.h ./libft/ft_fprintf/sources/*.c