-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMakefile
More file actions
executable file
·61 lines (48 loc) · 1.69 KB
/
Makefile
File metadata and controls
executable file
·61 lines (48 loc) · 1.69 KB
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
# **************************************************************************** #
# #
# ::: :::::::: #
# Makefile :+: :+: :+: #
# +:+ +:+ +:+ #
# By: lararamirez <lararamirez@student.42.fr> +#+ +:+ +#+ #
# +#+#+#+#+#+ +#+ #
# Created: 2017/09/25 16:11:33 by lararamirez #+# #+# #
# Updated: 2018/02/12 10:00:40 by lararamirez ### ########.fr #
# #
# **************************************************************************** #
NAME = lem-in
LIBFT = ./libft/libft.a
INCLUDES = ./lem_in_dir/includes/lem_in.h
SRC_DIR = ./lem_in_dir/sources/
OBJ_DIR = ./lem_in_dir/objects/
_OBJ = main.o \
get_rooms.o \
get_tunnels.o \
compute_instructions.o \
find_paths.o \
paths_util.o \
error.o \
initialize.o \
display.o \
check.o \
tools.o
OBJ = $(patsubst %, $(OBJ_DIR)%, $(_OBJ))
CFLAGS = -Wall -Wextra -Werror -g -O0 -O3
VPATH = sources:includes
$(OBJ_DIR)%.o : $(SRC_DIR)%.c
@cc $(CFLAGS) -c -Iincludes -o $@ $<
all: make_libft $(NAME)
$(NAME) : $(OBJ) $(LIBFT)
@gcc $(CFLAGS) $(OBJ) $(LIBFT) -o $(NAME)
$(OBJ) : $(INCLUDES) | $(OBJ_DIR)
$(OBJ_DIR) :
@mkdir $(OBJ_DIR)
make_libft:
@make -C ./libft
clean:
@rm -rf $(OBJ_DIR)
@make -C ./libft clean
fclean: clean
@rm -f $(NAME)
@make -C ./libft fclean
re: fclean all
.PHONY: clean fclean re