-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
45 lines (34 loc) · 1.73 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
# **************************************************************************** #
# #
# ::: :::::::: #
# Makefile :+: :+: :+: #
# +:+ +:+ +:+ #
# By: mmoumni <mmoumni@student.42.fr> +#+ +:+ +#+ #
# +#+#+#+#+#+ +#+ #
# Created: 2021/12/27 11:12:05 by mmoumni #+# #+# #
# Updated: 2022/01/03 08:11:09 by mmoumni ### ########.fr #
# #
# **************************************************************************** #
SRC = bresnham.c get_next_line_utils.c setting.c create_matrix.c ft_atoi.c isometric.c stack.c \
data_init.c ft_atoi_hex.c draw_map.c ft_split.c key_handle.c fdf.c get_next_line.c read_map.c
OBJ = $(SRC:.c=.o)
SRC_BONUS = bresnham.c fdf_bonus.c get_next_line_utils.c setting.c create_matrix.c ft_atoi.c isometric.c stack.c \
data_init.c ft_atoi_hex.c key_handel_bonus.c draw_map.c ft_split.c get_next_line.c read_map.c
OBJ_BONUS = $(SRC_BONUS:.c=.o)
CC_FLAGS = -Wall -Wextra -Werror
CC = cc
MLX_FLAGS = -lmlx -framework OpenGL -framework AppKit
MATH_FLAGS = -lm
NAME = fdf
all: $(NAME)
$(NAME): $(OBJ)
$(CC) $(CC_FLAGS) $(MATH_FLAGS) $(MLX_FLAGS) $(OBJ) -o $@
%.o: %.c
$(CC) $(CC_FLAGS) -c $<
bonus: $(OBJ_BONUS)
$(CC) $(CC_FLAGS) $(MATH_FLAGS) $(MLX_FLAGS) $(OBJ_BONUS) -o $(NAME)
clean:
rm -rf $(OBJ) $(OBJ_BONUS)
fclean: clean
rm -rf $(NAME)
re: fclean all