-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathMakefile
43 lines (34 loc) · 1.44 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
# **************************************************************************** #
# #
# ::: :::::::: #
# Makefile :+: :+: :+: #
# +:+ +:+ +:+ #
# By: dphyliss <admin@21-school.ru> +#+ +:+ +#+ #
# +#+#+#+#+#+ +#+ #
# Created: 2020/01/09 12:34:53 by dphyliss #+# #+# #
# Updated: 2020/01/09 12:34:55 by dphyliss ### ########.fr #
# #
# **************************************************************************** #
.PHONY: all clean fclean re
SRC = draw.c keyboard.c init_cl.c mouse.c fractal.c
OBJ = $(SRC:.c=.o)
NAME = fractal
LIB = libft/libft.a
MLX = ./mlx/libmlx.a
HEADER = ./includes/fractal.h
all: $(LIB) $(NAME)
$(LIB):
make -C ./libft
$(MLX):
make -C ./mlx
$(NAME): $(MLX) $(OBJ) includes/fractal.h
gcc -Wall -Wextra -Werror -o $(NAME) -I $(HEADER) $(LIB) $(MLX) -lmlx -framework OpenGL -framework AppKit -framework OpenCL $(OBJ)
%.o: sources/%.c $(HEADER)
gcc -c $<
clean:
make clean -C ./libft
rm -rf $(OBJ)
fclean: clean
make fclean -C ./libft
rm -rf $(NAME)
re: fclean all