-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
44 lines (33 loc) · 879 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
GREEN = \033[1;32m
WHITE = \033[0;m
SRC = ft_error_handlers.c \
ft_fractol.c \
ft_fractol_utils.c \
ft_mandelbrot.c \
ft_julia.c \
ft_burning_ship.c \
ft_burning_bird.c \
OBJ= $(SRC:.c=.o)
OBJ := $(addprefix obj/,${OBJ})
CC = gcc
FL_MLX = -ldl -lmlx -Lmlx -lm -lXext -lX11 -Imlx mlx/libmlx.a -g
CFLAGS = -Wall -Wextra -Werror -I includes
## -lmlx -lbass
NAME = fractol
all: $(NAME)
fractol : $(OBJ)
@make -C libft
@make bonus -C libft
$(CC) ${CFLAGS} ${OBJ} -o $(NAME) $(FL_MLX) libft/libft.a
obj/%.o:src/%.c
@mkdir -p obj
$(CC) -o $@ -c $< $(CFLAGS)
clean:
@rm -f $(OBJ) core
@make -C libft clean
@printf "\n[$(GREEN)cleaned$(WHITE)] .o FILES and libft \n"
fclean: clean
@rm -f $(NAME) libft/libft.a
@printf "\n[$(GREEN)cleaned$(WHITE)] $(NAME) libft.a \n"
re: fclean all
.PHONY: all clean fclean re