-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathMakefile
51 lines (49 loc) · 1.77 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
# **************************************************************************** #
# #
# ::: :::::::: #
# Makefile :+: :+: :+: #
# +:+ +:+ +:+ #
# By: vlenard <[email protected]> +#+ +:+ +#+ #
# +#+#+#+#+#+ +#+ #
# Created: 2022/10/15 15:04:49 by vlenard #+# #+# #
# Updated: 2023/01/16 14:32:40 by vlenard ### ########.fr #
# #
# **************************************************************************** #
CC = cc
CFLAGS = -Wall -Werror -Wextra
LIBFT = libft/libft.a
MLX = MLX42/build/libmlx42.a -I include -lglfw -L "/opt/homebrew/Cellar/glfw/3.4/lib"
SRC = main.c init.c draw.c colors.c hooks.c fractals.c
OBJS = $(SRC:.c=.o)
NAME = fractol
all: build $(NAME)
$(NAME): relibft $(LIBFT) $(OBJS)
$(CC) $(OBJS) $(LIBFT) $(MLX) -o $(NAME)
$(LIBFT):
cd libft && make && make clean
relibft:
cd libft && make re && make clean
n:
norminette $(SRC) fractal.h
1: all
./fractol Julia 0.28 0.008
2: all
./fractol Julia -0.4 0.6
3: all
./fractol Julia 0.45 0.1428
4: all
./fractol Julia -0.79 -0.15
5: all
./fractol Julia -0.162 1.04
6: all
./fractol Julia -1.476 0
clean :
rm -f $(OBJS)
fclean : clean
rm -f ./$(NAME)
re : fclean
$(MAKE)
build:
@git submodule update --init
@cd MLX42 && cmake $(if $(DEBUG),-DDEBUG=1, ) -B build && cmake --build build -j4
.PHONY: all, n, clean, fclean, re, $(LIBFT), $(NAME)