-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathMakefile
72 lines (59 loc) · 2.24 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
SRC = ./mandatory/memory/memory_tracker.c \
./mandatory/src/main.c \
./mandatory/src/get_next_line/get_next_line_utils.c \
./mandatory/src/get_next_line/get_next_line.c \
./mandatory/src/parse/ft_splite.c \
./mandatory/src/parse/parsing.c \
./mandatory/src/parse/file_checker.c \
./mandatory/src/parse/parsing_utiles.c \
./mandatory/src/parse/ft_check_path.c \
./mandatory/src/graphic/start_game.c \
./mandatory/src/graphic/print_moves.c \
./mandatory/src/graphic/movement.c \
./mandatory/src/graphic/key_handel.c \
./mandatory/src/graphic/end_game.c \
./mandatory/src/graphic/render.c \
./mandatory/src/graphic/render_utiles.c
SRC_BONUS = ./bonus/memory/memory_tracker_bonus.c \
./bonus/src/main_bonus.c \
./bonus/src/get_next_line/get_next_line_utils_bonus.c \
./bonus/src/get_next_line/get_next_line_bonus.c \
./bonus/src/parse/ft_splite_bonus.c \
./bonus/src/parse/parsing_bonus.c \
./bonus/src/parse/file_checker_bonus.c \
./bonus/src/parse/parsing_utiles_bonus.c \
./bonus/src/parse/ft_check_path_bonus.c \
./bonus/src/graphic/start_game_bonus.c \
./bonus/src/graphic/print_moves_bonus.c \
./bonus/src/graphic/movement_bonus.c \
./bonus/src/graphic/key_handel_bonus.c \
./bonus/src/graphic/end_game_bonus.c \
./bonus/src/graphic/render_bonus.c \
./bonus/src/graphic/render_utiles_bonus.c \
./bonus/src/graphic/enemy/ft_enemy_ia_bonus.c \
./bonus/src/graphic/enemy/enemy_moves_bonus.c \
./bonus/src/graphic/enemy/ft_map_rebuild_bonus.c \
./bonus/src/graphic/ft_itoa_bonus.c \
./bonus/src/graphic/display_moves_bonus.c
OBJ = $(SRC:.c=.o)
OBJ_BONUS = $(SRC_BONUS:.c=.o)
INCLUD_BNS = ./bonus/include/so_long_bonus.h ./bonus/include/get_next_line.h
INCLUD = ./mandatory/include/so_long.h ./mandatory/include/get_next_line.h
NAME = so_long
NAME_BONUS = so_long_bonus
CC = cc
CFLAGS = -Wall -Wextra -Werror
LDFLAGS = -lXext -lX11 -lm -lz
all: $(NAME)
%.o: %.c $(INCLUD_BNS) $(INCLUD)
$(CC) $(CFLAGS) -c $< -o $@
$(NAME): $(OBJ)
$(CC) $(OBJ) $(CFLAGS) $(LDFLAGS) ./mlx/libmlx_Linux.a -o $(NAME)
bonus: $(NAME_BONUS)
$(NAME_BONUS): $(OBJ_BONUS)
$(CC) $(OBJ_BONUS) $(CFLAGS) $(LDFLAGS) ./mlx/libmlx_Linux.a -o $(NAME_BONUS)
clean:
rm -f $(OBJ) $(OBJ_BONUS)
fclean: clean
rm -f $(NAME) $(NAME_BONUS)
re: fclean all