-
Notifications
You must be signed in to change notification settings - Fork 1
/
Makefile
71 lines (52 loc) · 1.89 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
# **************************************************************************** #
# #
# ::: :::::::: #
# Makefile :+: :+: :+: #
# +:+ +:+ +:+ #
# By: mcerchi <[email protected]> +#+ +:+ +#+ #
# +#+#+#+#+#+ +#+ #
# Created: 2022/03/15 11:33:10 by mcerchi #+# #+# #
# Updated: 2022/03/25 15:29:58 by mcerchi ### ########.fr #
# #
# **************************************************************************** #
NAME = fractol
SRC = fractol.c commands.c initialize.c calculus.c colours.c print.c
OBJ = $(SRC:.c=.o)
MLX = ./libmlx.dylib
MATH_LIB = ./math_lib/math_lib.a
LIBFT = ./libft/libft.a
CC = gcc
RM = rm -rf
CFLAGS = -Wall -Werror -Wextra
$(NAME) : $(OBJ)
make -C ./math_lib
make -C ./mlx
make -C ./libft
@mv mlx/libmlx.dylib .
$(CC) $(CFLAGS) -o $(NAME) $(OBJ) $(MLX) $(MATH_LIB) $(LIBFT)
@clear
@echo "Compilation successful!"
all : $(NAME)
clean :
$(RM) $(OBJ)
clean.all : clean
make clean -C ./libft
make clean -C ./math_lib
make clean -C ./mlx
fclean : clean
$(RM) $(OBJ)
$(RM) $(NAME)
$(RM) libmlx.dylib
fclean.all : fclean
make fclean -C ./libft
make fclean -C ./math_lib
make clean -C ./mlx
re : fclean $(NAME)
re.all : fclean.all all
debug : $(OBJ)
make -C ./math_lib
make -C ./mlx
make -C ./libft
@mv mlx/libmlx.dylib .
$(CC) $(CFLAGS) -g -o $(NAME) $(OBJ) $(MLX) $(MATH_LIB) $(LIBFT)
.PHONY : all clean fclean re