-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
55 lines (39 loc) · 1.62 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
# **************************************************************************** #
# #
# ::: :::::::: #
# Makefile :+: :+: :+: #
# +:+ +:+ +:+ #
# By: ahmaymou <ahmaymou@student.42.fr> +#+ +:+ +#+ #
# +#+#+#+#+#+ +#+ #
# Created: 2023/01/09 14:24:42 by ahmaymou #+# #+# #
# Updated: 2023/02/27 18:17:07 by ahmaymou ### ########.fr #
# #
# **************************************************************************** #
NAME = FRACTOL
SRCS_OBJ = $(shell ls | grep .c | grep -v main | grep -v fract | grep -v screenshots)
SRC = main.c
FLAGS = -Wall -Werror -Wextra
CC = cc
LIBS = libft/libft.a printf/libftprintf.a
EXEC = fractol
INC_EXC = -I /usr/local/include
FRAMEWORK = -L /usr/local/lib/ -lmlx -framework OpenGl -framework AppKit
OBJ = $(SRCS_OBJ:.c=.o)
all : $(NAME)
%.o: %.c fract_ol.h
$(CC) $(FLAGS) -Imlx -c $< -o $@
$(NAME) : libft_printf prog
libft_printf :
@make -C libft
@make -C printf
prog : $(OBJ) fract_ol.h
$(CC) $(INC_EXC) $(FLAGS) $(SRC) -Imlx $(FRAMEWORK) $(OBJ) $(LIBS) -o $(EXEC)
@rm -rf $(LIBS)
clean :
@make clean -C libft
@make clean -C printf
@rm -rf $(OBJ)
fclean : clean
rm -rf $(LIBS) $(EXEC)
re : fclean all
.PHONY : all clean fclean re