-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMakefile
More file actions
69 lines (55 loc) · 1.21 KB
/
Copy pathMakefile
File metadata and controls
69 lines (55 loc) · 1.21 KB
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
NAME = so_long
NAME_BONUS = so_long_bonus
CC = cc -g
CFLAGS = -Wall -Wextra -Werror
MFLAGS = -lX11 -lXext
RM = rm -rf
LIBFT = libft/libft.a
MLX = ./minilibx-linux/libmlx_Linux.a
SRCS = so_long.c\
utils.c\
utils2.c\
errors.c\
verif.c\
map_ops.c\
imgs_init.c\
sprites.c\
moves.c\
BONUS = bonus/b_main.c\
bonus/b_utils.c\
bonus/b_utils2.c\
bonus/b_errors.c\
bonus/b_verif.c\
bonus/b_map_ops.c\
bonus/b_imgs_init.c\
bonus/b_sprites.c\
bonus/b_moves.c\
bonus/asteroid.c\
bonus/win_info.c\
OBJS = $(SRCS:%.c=%.o)
OBJS_BONUS = $(BONUS:%.c=%.o)
all: $(NAME)
$(LIBFT):
@$(MAKE) -C ./libft
$(MLX):
@$(MAKE) -C ./minilibx-linux
$(NAME): $(OBJS) $(LIBFT) $(MLX)
@$(CC) $(CFLAGS) $(OBJS) $(LIBFT) $(MLX) $(MFLAGS) -o $(NAME)
bonus: $(OBJS_BONUS) $(LIBFT) $(MLX)
@$(CC) $(CFLAGS) $(OBJS_BONUS) $(LIBFT) $(MLX) $(MFLAGS) -o $(NAME_BONUS)
clean:
@$(MAKE) clean -C ./libft
@$(MAKE) clean -C ./minilibx-linux
@$(RM) $(OBJS)
@$(RM) $(NAME)
clean_bonus:
@$(MAKE) clean -C ./libft
@$(MAKE) clean -C ./minilibx-linux
@$(RM) $(OBJS_BONUS)
@$(RM) $(NAME_BONUS)
fclean: clean clean_bonus
@$(MAKE) fclean -C ./libft
@$(MAKE) clean -C ./minilibx-linux
@$(RM) $(NAME)
@$(RM) $(NAME_BONUS)
re: fclean all