-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathMakefile
63 lines (53 loc) · 1.87 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
# **************************************************************************** #
# #
# ::: :::::::: #
# Makefile :+: :+: :+: #
# +:+ +:+ +:+ #
# By: mmounsif <mmounsif@student.42.fr> +#+ +:+ +#+ #
# +#+#+#+#+#+ +#+ #
# Created: 2025/02/01 10:21:17 by mmounsif #+# #+# #
# Updated: 2025/02/14 19:02:46 by mmounsif ### ########.fr #
# #
# **************************************************************************** #
NAME = so_long
CC = cc
CFLAGS = -Wall -Wextra -Werror
MLX_FLAGS = -L/usr/local/lib -lmlx -framework OpenGL -framework AppKit
SRC = main.c \
src/mini_libft/ft_strlen.c \
src/mini_libft/ft_strjoin.c \
src/mini_libft/ft_strchr.c \
src/mini_libft/ft_strdup.c \
src/mini_libft/ft_substr.c \
src/mini_libft/ft_calloc.c \
src/mini_libft/ft_bzero.c \
src/mini_libft/ft_putchar.c \
src/mini_libft/ft_puthex.c \
src/mini_libft/ft_putnbr.c \
src/mini_libft/ft_putptr.c \
src/mini_libft/ft_putstr.c \
src/mini_libft/ft_putunbr.c \
src/ft_printf.c \
src/get_next_line.c \
src/get_map.c \
src/free_map.c \
src/map_line_count.c \
src/check_map.c \
src/collectibles_count.c \
src/get_start.c \
src/flood_check.c \
src/display_background.c \
src/display_map.c \
src/exit_game.c
OBJ = $(SRC:.c=.o)
all: $(NAME)
$(NAME): $(OBJ)
$(CC) $(OBJ) $(MLX_FLAGS) -o $(NAME)
%.o: %.c so_long.h
$(CC) $(CFLAGS) -c $< -o $@
clean:
rm -rf $(OBJ)
fclean: clean
rm -rf $(NAME)
re: fclean all
.PHONY: all clean fclean re