-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
69 lines (52 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
64
65
66
67
68
69
# **************************************************************************** #
# #
# ::: :::::::: #
# Makefile :+: :+: :+: #
# +:+ +:+ +:+ #
# By: olahmami <[email protected]> +#+ +:+ +#+ #
# +#+#+#+#+#+ +#+ #
# Created: 2022/12/17 02:11:24 by olahmami #+# #+# #
# Updated: 2023/01/14 23:37:52 by olahmami ### ########.fr #
# #
# **************************************************************************** #
CC = cc
NAME = so_long
CFLAGS = -Wall -Wextra -Werror
SRCS = maps/map_checker/utils.c \
maps/map_checker/name_map.c \
maps/map_checker/composed_map.c \
maps/map_checker/onechar_map.c \
maps/map_checker/rect_map.c \
maps/map_checker/walls_map.c \
maps/map_checker/path_map.c \
maps/map_checker/check_all.c \
maps/game/read_map.c \
maps/game/show_map.c \
maps/game/move_map.c \
maps/game/button.c \
so_long.c
LIBS = libft.a
BONUS = so_long_bonus
INCLUDES = $(LIBS:%=maps/Libft/libft.a)
MLX_macos = -lmlx -framework OpenGL -framework AppKit
OBJ = ${SRCS:.c=.o}
all: $(LIBS) $(NAME)
$(NAME): $(OBJ)
$(CC) -I includes $(CFLAGS) $(OBJ) $(INCLUDES) $(MLX_macos) -o $(NAME)
libs: $(LIBS)
$(LIBS):
@make -C maps/Libft
bonus: $(BONUS)
$(BONUS):
@make -C Bonus
clean:
@rm -f ${OBJ}
@make -C maps/Libft clean
@make -C Bonus clean
fclean: clean
@rm -rf $(NAME)
@rm -rf $(INCLUDES)
@make -C maps/Libft fclean
@make -C Bonus fclean
re: fclean all
.PHONY: all