-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathMakefile
53 lines (37 loc) · 1.61 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
# **************************************************************************** #
# #
# ::: :::::::: #
# Makefile :+: :+: :+: #
# +:+ +:+ +:+ #
# By: dholiday <[email protected]> +#+ +:+ +#+ #
# +#+#+#+#+#+ +#+ #
# Created: 2019/08/13 14:06:41 by dholiday #+# #+# #
# Updated: 2019/09/05 14:08:49 by dholiday ### ########.fr #
# #
# **************************************************************************** #
FDF = fdf
LIBFTPATH = ./libft
LIBFT = $(LIBFTPATH)/libft.a
MLXPATH = ./minilibx_macos
MLX = $(MLXPATH)/libmlx.a
FLAGS = -I $(MLXPATH) -L $(MLXPATH) -lmlx -framework OpenGL -framework AppKit -Wall -Werror -Wextra
SRC = main.c algorithm.c read_file.c point_to_paint.c action.c change_map.c rotate.c put_text.c mouse.c
OBJ = $(SRC:%.c=%.o)
NAME = $(MLX) $(LIBFT) $(FDF)
all: $(NAME)
$(LIBFT) :
make -C $(LIBFTPATH)
$(OBJ) : ./fdf.h
$(MLX) :
make -C $(MLXPATH)
$(FDF) : $(MLX) $(OBJ) $(LIBFT)
gcc $(FLAGS) -I. -I$(LIBFTPATH) -Iinc $(LIBFT) $(OBJ) -o $(FDF)
clean:
make clean -C $(LIBFTPATH)
make clean -C $(MLXPATH)
rm -f $(OBJ)
fclean: clean
make fclean -C $(LIBFTPATH)
rm -f $(NAME)
re: fclean all
.PHONY: all clean fclean re