-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathMakefile
66 lines (49 loc) · 1.81 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
# **************************************************************************** #
# #
# ::: :::::::: #
# Makefile :+: :+: :+: #
# +:+ +:+ +:+ #
# By: jbadaire <[email protected]> +#+ +:+ +#+ #
# +#+#+#+#+#+ +#+ #
# Created: 2023/01/17 17:54:42 by jbadaire #+# #+# #
# Updated: 2023/01/17 17:54:46 by jbadaire ### ########lyon.fr #
# #
# **************************************************************************** #
NAME = so_long.out
MAKE_LIBFT = make -C libft
MLX = minilibx-linux/libmlx_Linux.a
MAKE_MLX = make -C minilibx-linux
MLX_FLAGS = -L./minilibx-linux -l:libmlx.a -L/usr/lib -Imlx_linux -lXext -lX11 -lm -lz
SRCS = main.c \
collectible_utils.c \
frees.c \
maps_utils.c \
player.c \
rectangle_check.c \
utils.c \
graphics_utils.c \
location_utils.c \
textures_utils.c \
errors_utils.c \
LIBFT_FLAGS = -L./libft -l:libft.a
OBJ_DIRECTORY = ./.obj/
CC = cc
FLAGS = -c -Wall -Wextra -Werror -g
INCLUDES = ./headers/so_long.h
OBJS = $(addprefix $(OBJ_DIRECTORY), $(SRCS:.c=.o))
$(NAME): $(OBJ_DIRECTORY) $(OBJS)
$(MAKE_MLX)
$(MAKE_LIBFT)
$(CC) $(OBJS) $(LIBFT_FLAGS) $(MLX_FLAGS) -o $(NAME)
$(OBJ_DIRECTORY)%.o: %.c
mkdir -p minilibx-linux
$(CC) $(FLAGS) $< -o $@
$(OBJ_DIRECTORY):
mkdir -p $(OBJ_DIRECTORY)
all : $(NAME)
clean :
$(RM) $(NAME)
rm -rf $(OBJ_DIRECTORY)
fclean : clean
rm -rf $(NAME)
re : fclean all