-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
69 lines (50 loc) · 1.38 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
SRCS = mandatory/so_long.c \
mandatory/so_long_utils.c \
mandatory/so_long_utils2.c \
mandatory/so_long_events.c \
mandatory/so_long_visuals.c \
mandatory/so_long_mapcheck.c \
get_next_line/get_next_line.c \
get_next_line/get_next_line_utils.c \
B_SRCS = bonus/so_long_bonus.c \
bonus/so_long_utils_bonus.c \
bonus/so_long_utils2_bonus.c \
bonus/so_long_events_bonus.c \
bonus/so_long_enemies_bonus.c \
bonus/so_long_visuals_bonus.c \
bonus/so_long_visuals2_bonus.c \
bonus/so_long_mapcheck_bonus.c \
get_next_line/get_next_line.c \
get_next_line/get_next_line_utils.c \
OBJS = $(SRCS:.c=.o)
B_OBJS = $(B_SRCS:.c=.o)
HEADS = ./includes/
NAME = so_long
B_NAME = so_long_bonus
LNAME = libft/libft.a
MLBNAME = mlx/libmlx.a
GCC = gcc
FLAGS = -Wall -Werror -Wextra -Imlx
RM = rm -f
%.o: %.c
$(GCC) $(FLAGS) -c $< -o $@
$(NAME): $(OBJS)
$(MAKE) -C libft all
$(MAKE) -C mlx all
$(GCC) $(FLAGS) $(OBJS) $(LNAME) $(MLBNAME) -lz -framework OpenGL -framework AppKit -o $(NAME)
$(B_NAME): $(B_OBJS)
$(MAKE) -C libft all
$(MAKE) -C mlx all
$(GCC) $(FLAGS) $(B_OBJS) $(LNAME) $(MLBNAME) -lz -framework OpenGL -framework AppKit -o $(B_NAME)
all: $(NAME)
bonus: $(B_NAME)
clean:
$(MAKE) -C libft clean
$(MAKE) -C mlx clean
$(RM) $(OBJS) $(B_OBJS)
fclean: clean
$(RM) $(LNAME)
$(RM) $(NAME)
$(RM) $(B_NAME)
$(RM) $(MLBNAME)
re: fclean all