-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
58 lines (46 loc) · 1.87 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
# folders
MLX = mlx/
FRCTL = fractals/
UTLS = utils/
SRC = fractol.c \
$(FRCTL)mandlbrotset.c \
$(FRCTL)juliaset.c \
$(FRCTL)burningship.c \
$(FRCTL)bonus_of_bonus_part.c \
$(FRCTL)tricon.c \
$(FRCTL)sinfractal.c \
$(FRCTL)multimandlbrot3.c \
$(UTLS)ft_atof.c \
$(UTLS)fractol_useful_utils.c \
$(MLX)events.c \
$(MLX)colors.c \
$(MLX)event_utils.c
OBJ = $(SRC:.c=.o)
NAME = fractol
CC = cc
CFLAGS = -Wall -Wextra -Werror -Ofast
RM = rm -f
COLOR = \033[0;36m
END = \033[0m
all: $(NAME)
@echo ""
@echo "\033[0;33mCompiling... $(END)"
@echo ""
@echo "$(COLOR)███████╗██████╗ █████╗ ██████╗████████╗ ██████╗ ██╗ $(END)"
@echo "$(COLOR)██╔════╝██╔══██╗██╔══██╗██╔════╝╚══██╔══╝██╔═══██╗██║ $(END)"
@echo "$(COLOR)█████╗ ██████╔╝███████║██║ ██║ ██║ ██║██║ $(END)"
@echo "$(COLOR)██╔══╝ ██╔══██╗██╔══██║██║ ██║ ██║ ██║██║ $(END)"
@echo "$(COLOR)██║ ██║ ██║██║ ██║╚██████╗ ██║ ╚██████╔╝███████╗$(END)"
@echo "$(COLOR)╚═╝ ╚═╝ ╚═╝╚═╝ ╚═╝ ╚═════╝ ╚═╝ ╚═════╝ ╚══════╝$(END)"
@echo "\033[0;33m==========================================================$(END)"
@echo ""
$(NAME): $(OBJ)
@$(CC) $(CFLAGS) $(OBJ) -lmlx -framework OpenGL -framework AppKit -o $(NAME)
%.o: %.c fractol.h
@$(CC) $(CFLAGS) -c $< -o $@
clean:
$(RM) $(OBJ)
fclean: clean
$(RM) $(NAME)
re: fclean all
.PHONY: re fclean clean all