-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
executable file
·63 lines (51 loc) · 1.9 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
# **************************************************************************** #
# #
# ::: :::::::: #
# Makefile :+: :+: :+: #
# +:+ +:+ +:+ #
# By: gduval <[email protected]> +#+ +:+ +#+ #
# +#+#+#+#+#+ +#+ #
# Created: 2017/07/27 11:25:13 by gduval #+# #+# #
# Updated: 2017/07/27 11:25:16 by gduval ### ########.fr #
# #
# **************************************************************************** #
NAME = lem-in
LIBFT_NAME = libft.a
LIBFT_PATH = ./libft/
LIBFT = $(addprefix $(LIBFT_PATH), $(LIBFT_NAME))
SRC_PATH = ./srcs/
SRC_NAME = main.c \
init_struct.c \
parse.c \
get_ants.c \
create_rooms.c \
get_links.c \
set_index.c \
bring_ants.c \
navigate_throught_rooms.c \
display_move.c \
exit.c
SRC = $(addprefix $(SRC_PATH), $(SRC_NAME))
OBJ = $(SRC_NAME:.c=.o)
HEADER_PATH = ./includes/
HEADER_NAME = lem_in.h
HEADER = $(addprefix $(HEADER_PATH), $(HEADER_NAME))
FLAGS = -Wall -Wextra -Werror -c
CC = gcc
all: $(NAME)
$(NAME) :
@echo "\033[93m----------------------------------\033[0m"
@echo "\033[93m- LEM_IN COMPILATION -\033[0m"
@echo "\033[93m----------------------------------\033[0m"
@make -C libft
@$(CC) $(SRC) $(FLAGS)
@$(CC) $(OBJ) $(LIBFT) -o $(NAME)
@echo "\033[93m- done -\033[0m"
clean:
@make clean -C libft
@rm -f $(OBJ)
fclean: clean
@make fclean -C libft
@rm -f $(NAME)
re: fclean all
.PHONY: all clean fclean re