-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
64 lines (51 loc) · 1.84 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
# **************************************************************************** #
# #
# ::: :::::::: #
# Makefile :+: :+: :+: #
# +:+ +:+ +:+ #
# By: vcombey <[email protected]> +#+ +:+ +#+ #
# +#+#+#+#+#+ +#+ #
# Created: 2016/12/30 19:59:01 by vcombey #+# #+# #
# Updated: 2017/03/08 16:40:41 by vcombey ### ########.fr #
# #
# **************************************************************************** #
NAME = lem-in
SRC = main.c \
lem_in.c \
find_best_ways.c \
get_rooms.c \
get_links.c \
display_solus.c \
free_all_the_shit.c \
utils/add_ways.c \
utils/file_add.c \
utils/file_take.c \
utils/ft_exit_err.c \
utils/int_is_in_lst.c \
utils/room_len.c \
utils/ways_len.c \
utils/ft_atoi_safe.c \
utils/is_in_lst.c \
INCLUDE = -I ./libft/ -I ./ft_printf/ -I ./include
LIBS = -L ./libft/ -lft -L ./ft_printf/ -lftprintf
OBJS = $(addprefix objs/, $(SRC:.c=.o))
CFLAGS += -Wall -g -Wextra -Werror
all: $(NAME)
$(NAME): $(OBJS)
make -C ./libft/
make -C ./ft_printf/
gcc -g $(OBJS) $(LIBS) -o $(NAME)
clean:
make clean -C ./libft/
make clean -C ./ft_printf/
/bin/rm -rf objs
fclean: clean
/bin/rm -f ./libft/libft.a
/bin/rm -f ./ft_printf/libft.a
/bin/rm -f $(NAME)
re: fclean all
objs/%.o : %.c
@/bin/mkdir -p objs
@/bin/mkdir -p objs/utils
gcc -g $(CFLAGS) $(INCLUDE) -c -o $@ $<
.PHONY: all clean fclean re