-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
executable file
·102 lines (76 loc) · 2.34 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
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
# **************************************************************************** #
# #
# ::: :::::::: #
# Makefile :+: :+: :+: #
# +:+ +:+ +:+ #
# By: pcluchet <[email protected]> +#+ +:+ +#+ #
# +#+#+#+#+#+ +#+ #
# Created: 2016/11/07 10:47:39 by pcluchet #+# #+# #
# Updated: 2018/09/12 17:49:13 by pcluchet ### ########.fr #
# #
# **************************************************************************** #
NAME = mod1
SRC_DIR = ./
CC = gcc
EXTRAFLAGS = -Ofast -Wall -Wextra -Werror #-fsanitize=address
CFLAGS = -I$(LIBFT_DIR)includes/ -I$(H_DIR) -I$(MLX_DIR) $(EXTRAFLAGS)
MLX_FLAGS = -framework OpenGL -framework AppKit
UTILS = mlx_utils.c \
line_utils.c \
color_utils.c \
parse_utils.c \
point_utils.c \
FILE = file_helper.c \
gen_map.c
POINTS = set_dots.c \
gen_point.c \
connect_dots.c \
draw_dot.c \
connect_water_dots.c
SCENARIOS = raining.c \
rising_water.c \
wave.c
WATER = spread_water.c \
gen_watermap.c \
ft_triangle.c \
spread_inside.c \
more_water.c \
watermap.c \
gen_current_elev_map.c
SRC = main.c \
line.c \
hook.c \
setters.c \
coef_inside.c \
coef_between.c \
bigmap.c
C_FILES = $(addprefix utils/, $(UTILS)) \
$(addprefix file/, $(FILE)) \
$(addprefix scenarios/, $(SCENARIOS)) \
$(addprefix points/, $(POINTS)) \
$(addprefix water/, $(WATER)) \
$(addprefix src/, $(SRC)) \
LIBFT_DIR = ./libft/
MLX_DIR = ./minilibx_macos/
O_FILES = $(C_WITH_PATH:.c=.o)
H_DIR = ./includes/
LINKS = -L $(MLX_DIR) -lmlx -L $(LIBFT_DIR) -lftprintf
C_WITH_PATH = $(addprefix $(SRC_DIR),$(C_FILES))
all : $(NAME)
$(NAME) : libs $(O_FILES)
$(CC) -o $(NAME) $(O_FILES) $(CFLAGS) $(MLX_FLAGS) $(LINKS)
clean :
rm -f $(O_FILES)
make -C $(LIBFT_DIR) clean
make -C $(MLX_DIR) clean
fclean : clean
rm -f $(NAME)
rm -f $(LIBFT_DIR)libftprintf.a
rm -f $(MLX_DIR)libmlx.a
re :
$(MAKE) fclean
$(MAKE) all
libs:
make -C $(LIBFT_DIR)
make -C $(MLX_DIR)
.PHONY: all re clean fclean libs