-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathMakefile
64 lines (48 loc) · 1.78 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
# **************************************************************************** #
# #
# ::: :::::::: #
# Makefile :+: :+: :+: #
# +:+ +:+ +:+ #
# By: mabaffo <[email protected]> +#+ +:+ +#+ #
# +#+#+#+#+#+ +#+ #
# Created: 2022/12/07 18:05:37 by mabaffo #+# #+# #
# Updated: 2022/12/07 18:05:52 by mabaffo ### ########.fr #
# #
# **************************************************************************** #
NAME = fractol
SRCS_DIR = ./sources/
AR = ar
ARFLAGS = rcs
SRCS_F = main.c \
init_mlx.c \
ft_put_image_to_window.c \
ft_draw_pixels.c \
hooks.c \
ft_set.c \
ft_init_fract.c \
ft_destroy_fractol.c \
ft_mandelbrot.c \
ft_julia.c \
ft_burning_ship.c \
usage_and_errors.c
SRCS = $(addprefix $(SRCS_DIR), $(SRCS_F))
OBJS = $(SRCS:.c=.o)
CC = gcc
CC_FLAGS = -Wall -Wextra -Werror -g -O3
RM = rm -f
LIBFT = libft/libft.a
.c.o:
$(CC) $(C_FLAGS) -c $< -o $(<:.c=.o) -I includes/
$(NAME): $(OBJS)
make -sC minilibx-linux
make -sC libft
$(CC) $(CC_FLAGS) $(OBJS) $(LIBFT) -o $(NAME) -L minilibx-linux -lmlx -lXext -lX11 -lm -pthread
all: $(NAME)
clean:
make -sC ./minilibx-linux clean
make -sC ./libft clean
$(RM) $(OBJS)
fclean: clean
$(RM) $(NAME) $(LIBFT)
re: fclean all
.PHONY: all clean fclean re