-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMakefile
More file actions
39 lines (32 loc) · 677 Bytes
/
Copy pathMakefile
File metadata and controls
39 lines (32 loc) · 677 Bytes
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
NAME = fractol
SRC = main.c \
parser.c \
draw.c \
utils.c \
fractols.c \
colour.c \
hooks.c \
actions.c \
menu.c
SRC_DIR = src
OBJ_DIR = $(SRC_DIR)/obj
INCL = -I$(SRC_DIR)/incl
C_FLAGS = -Wall -Wextra -Werror -Ofast #-g
OBJ = $(SRC:%.c=$(OBJ_DIR)/%.o)
all: $(NAME)
bonus: all
$(NAME): $(OBJ)
$(MAKE) -C libft
$(MAKE) -C mlx
$(CC) -o $@ $^ $(C_FLAGS) -Lmlx -Llibft -lmlx -lft \
-framework OpenGL -framework AppKit
$(OBJ_DIR)/%.o:$(SRC_DIR)/%.c
@mkdir -p $(@D)
$(CC) $< $(C_FLAGS) $(INCL) -Imlx -Ilibft -c -o $@
clean:
rm -rf $(OBJ_DIR)
fclean: clean
$(MAKE) fclean -C libft
$(MAKE) clean -C mlx
rm -f $(NAME)
re: clean all