-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathMakefile
65 lines (49 loc) · 1.94 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
# **************************************************************************** #
# #
# ::: :::::::: #
# Makefile :+: :+: :+: #
# +:+ +:+ +:+ #
# By: armendes <[email protected]> +#+ +:+ +#+ #
# +#+#+#+#+#+ +#+ #
# Created: 2022/01/26 20:21:54 by armendes #+# #+# #
# Updated: 2022/02/02 17:14:37 by armendes ### ########.fr #
# #
# **************************************************************************** #
SRCS = srcs/error.c \
srcs/init_struct1.c \
srcs/init_struct2.c \
srcs/loops.c \
srcs/map1.c \
srcs/map2.c \
srcs/render_all.c \
srcs/render_collectibles.c \
srcs/render_exit.c \
srcs/render_map.c \
srcs/render_player.c \
srcs/render_utils.c \
srcs/so_long.c
LIB_DIR = libs/libft libs/gnl libs/minilibx_linux
LIB_FLAGS = -L libs/libft -L libs/gnl -L libs/minilibx_linux
LIB_NAME = libs/libft/libft.a libs/gnl/gnl.a libs/minilibx_linux/libmlx_Linux.a
MLX_FLAGS = -lm -lmlx_Linux -lXext -lX11
OBJS = ${SRCS:.c=.o}
CC = gcc
CFLAGS = -Wall -Wextra -Werror -g -I includes -I libs/libft -I libs/gnl -I libs/minilibx_linux
NAME = so_long
RM = rm -rf
all: ${NAME}
${NAME}: ${OBJS}
make -C libs/libft
make -C libs/gnl
make -C libs/minilibx_linux
${CC} ${CFLAGS} ${LIB_FLAGS} ${OBJS} -o ${NAME} -lft ${MLX_FLAGS} ${LIB_NAME}
clean:
make clean -C libs/libft
make clean -C libs/gnl
make clean -C libs/minilibx_linux
${RM} ${OBJS}
fclean: clean
${RM} ${LIB_NAME}
${RM} ${NAME}
re: fclean all
.PHONY: all clean fclean re