-
Notifications
You must be signed in to change notification settings - Fork 1
/
Makefile
72 lines (56 loc) · 1.98 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
# **************************************************************************** #
# #
# ::: :::::::: #
# Makefile :+: :+: :+: #
# +:+ +:+ +:+ #
# By: tcherret <marvin@42.fr> +#+ +:+ +#+ #
# +#+#+#+#+#+ +#+ #
# Created: 2019/02/07 12:35:44 by tcherret #+# #+# #
# Updated: 2019/03/16 10:20:17 by tcherret ### ########.fr #
# #
# **************************************************************************** #
NAME = lem_in
NAMELIB = ./libft/libftprintf.a
CC = @gcc
CFLAGS =-Wall -Wextra -Werror -g
SRCS = srcs/lem_in.c\
srcs/parsing0.c\
srcs/parsing1.c\
srcs/parsing_checker.c\
srcs/ft_realloc_room.c\
srcs/get_option.c\
srcs/bfs.c\
srcs/queue_function.c\
srcs/ant_function.c\
srcs/free_functions.c\
srcs/moving_display.c\
srcs/path_functions.c\
srcs/display_functions.c\
srcs/aux_functions.c\
INCS = lem_in.h
LIBDIR = ./libft/
INCDIR = ./includes/
OBJ = $(addprefix objs/, $(notdir $(SRCS:.c=.o)))
all : $(NAME)
$(NAME) : $(OBJ)
@echo "\033[33mCompiling...\033[0m"
@make -C $(LIBDIR)
@$(CC) $(CFLAGS) -o $(NAME) $(OBJ) $(NAMELIB)
@echo "\033[32m$(NAME) compiled ✔ ✔ ✔ ✔\033[0m"
objs/%.o : srcs/%.c
@mkdir -p $(@D)
@$(CC) -c $(CFLAGS) $< -I./includes -o $@
clean :
@rm -rf $(OBJ) objs
@make -C $(LIBDIR) clean
@echo "\033[31mObjects deleted ✕\033[0m"
fclean : clean
@rm -f $(NAME)
@make -C $(LIBDIR) fclean
@echo "\033[31m$(NAME) deleted ✕\033[0m"
re : fclean all
git: fclean
git add *
git commit -m "$(m)"
git push
.PHONY : all clean fclean re