-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
46 lines (40 loc) · 1.63 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
# **************************************************************************** #
# #
# ::: :::::::: #
# Makefile :+: :+: :+: #
# +:+ +:+ +:+ #
# By: kdaou <marvin@42.fr> +#+ +:+ +#+ #
# +#+#+#+#+#+ +#+ #
# Created: 2019/04/18 17:26:52 by kdaou #+# #+# #
# Updated: 2019/07/20 11:45:19 by kdaou ### ########.fr #
# #
# **************************************************************************** #
NAME = fractol
FLAG = -Wall -Wextra -Werror
FRCT = ft_fractol.c\
ft_fractol_color.c\
ft_fractol_color2.c\
ft_fractol_itteration.c\
ft_fractol_itteration2.c\
ft_fractol_management.c\
ft_key_event.c\
ft_mouse_event.c\
main.c
LIBFT = libft/libft.a
SRCS = $(addprefix fractol_srcs/,$(FRCT))
OBJS = $(SRCS:.c=.o)
INC = -I includes/ -I /usr/local/Include
INC_SRCS = includes/libft.h includes/ft_mlx.h includes/fractol.h includes/mathlibft.h
all: $(NAME)
$(NAME): $(OBJS)
@make -C libft
@gcc $(OBJS) $(LIBFT) -o $(NAME) -L /usr/local/lib -lmlx -framework OpenGL -framework AppKit $
$(OBJS): %.o : %.c $(INC_SRCS)
gcc -o $@ -c $< $(FLAG) $(INC)
clean:
@make -C libft/ clean
@rm -f $(OBJS)
fclean: clean
@make -C libft/ fclean
@rm -f $(NAME)
re: fclean all