-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
73 lines (52 loc) · 1.94 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
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
# **************************************************************************** #
# #
# :::::::: #
# Makefile :+: :+: #
# +:+ #
# By: jesmith <[email protected]> +#+ #
# +#+ #
# Created: 2020/01/08 11:03:39 by jesmith #+# #+# #
# Updated: 2020/02/02 10:17:59 by jessicasmit ######## odam.nl #
# #
# **************************************************************************** #
NAME = fractol
FLAGS = -Wall -Wextra -Werror -o
MLX = minilibx_macos/
MLXFLAGS = -lmlx -framework OpenGL -framework AppKit
LIBFT = libft/
SRCS = ./srcs/
SRCS_FILES = main utilities mlx_setup key_events fractol_key_events \
draw_fractol get_color mouse_events user_interface \
fractol_writer hsv_color
FRACTOL_DIR = ./srcs/fractols/
FRACTOL_FILES = julia burningship mandelbrot mandelbar
CFILES = $(SRCS_FILES:%=$(SRCS)%.c) $(FRACTOL_FILES:%=$(FRACTOL_DIR)%.c)
OFILES = $(CFILES:%.c=%.o)
HEADERS = includes/fractol.h includes/thread.h
ADD_FILES = Makefile author
all: $(NAME)
%.o: %.c
@gcc -c $(FLAGS) $@ $<
$(NAME) : $(OFILES)
@make re -C $(LIBFT)
@gcc -I $(MLX) -L $(MLX) $(MLXFLAGS) -I $(LIBFT) -L $(LIBFT) -lft \
$(CFILES) $(FLAGS) $(NAME)
clean :
@make clean -C $(LIBFT)
@rm -f $(OFILES)
@rm -f *#
@rm -f *~
@rm -f *.DS_Store
@rm -Rf .vscode
fclean :
@make fclean -C $(LIBFT)
@rm -f $(NAME)
re : fclean all
add : fclean
@git add $(MLX) $(LIBFT) $(CFILES) $(HEADERS) $(ADD_FILES)
@git status
push :
ifdef MSG
@git commit -m MSG
@git push -u
endif