-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
59 lines (49 loc) · 1.85 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
# **************************************************************************** #
# #
# ::: :::::::: #
# Makefile :+: :+: :+: #
# +:+ +:+ +:+ #
# By: okuznets <okuznets@student.unit.ua> +#+ +:+ +#+ #
# +#+#+#+#+#+ +#+ #
# Created: 2019/06/19 02:29:58 by okuznets #+# #+# #
# Updated: 2019/06/19 03:05:18 by okuznets ### ########.fr #
# #
# **************************************************************************** #
.PHONY: all clean fclean re
CC := gcc
CFLAGS := -O3 -Wall -Wextra
GFX := -L ./minilibx_macos/ -lmlx -framework OpenGL -framework AppKit
LIBFT := libft/
NAME := RTv1
SRC_PATH := src/
OBJ_PATH := .obj/
LIB := $(LIBFT)libft.a
SRC := $(SRC_PATH)rtv.c \
$(SRC_PATH)do_ray_tracing.c \
$(SRC_PATH)dir_utils.c \
$(SRC_PATH)ball_func.c \
$(SRC_PATH)bell_func.c \
$(SRC_PATH)barrel_func.c \
$(SRC_PATH)flat_func.c \
$(SRC_PATH)parse_other.c \
$(SRC_PATH)parse_else.c \
$(SRC_PATH)manip_shine.c \
$(SRC_PATH)calc_shine.c \
$(SRC_PATH)parse_input.c \
$(SRC_PATH)inter_bell.c
OBJS := $(addprefix $(OBJ_PATH), $(SRC:%.c=%.o))
all: $(NAME)
$(NAME): $(LIB) $(OBJ_PATH) $(OBJS)
$(CC) $(CFLAGS) $(OBJS) $(GFX) $(LIB) -o $(NAME)
$(LIB):
make -C $(LIBFT)
$(OBJ_PATH):
mkdir -p $(OBJ_PATH)$(SRC_PATH)
$(OBJ_PATH)%.o: %.c
$(CC) $(CFLAGS) -c $< -o $@
clean:
make clean -C $(LIBFT)
rm -rf $(OBJ_PATH)
fclean: clean
rm -f $(NAME)
re: fclean all