-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
50 lines (34 loc) · 911 Bytes
/
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
NAME = fractol
SRCS_DIR = ./sources/
INCLUDES = ./includes/
AR = ar
ARFLAGS = rcs
SRCS_F = ft_main.c \
ft_usage_and_error_messages.c \
ft_init_mlx.c \
ft_create_image.c \
ft_hooks.c \
ft_fractal_julia.c \
ft_fractal_mandelbrot.c \
ft_fractal_burning_ship.c \
ft_destroy_fractol.c \
ft_libft_strncmp.c \
ft_libft_atof.c
SRCS = $(addprefix $(SRCS_DIR), $(SRCS_F))
OBJS = $(SRCS:.c=.o)
CC = gcc
CC_FLAGS = -Wall -Wextra -Werror -g -O3
RM = rm -f
.c.o:
$(CC) $(C_FLAGS) -c $< -o $(<:.c=.o) -I ./includes -I ./minilibx-linux
$(NAME): $(OBJS)
make -sC ./minilibx-linux all
$(CC) $(CC_FLAGS) $(OBJS) -o $(NAME) -L ./minilibx-linux -lmlx -lXext -lX11 -lm
all: $(NAME)
clean:
make -sC ./minilibx-linux clean
$(RM) $(OBJS)
fclean: clean
$(RM) $(NAME)
re: fclean all
.PHONY: all clean fclean re