-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
48 lines (39 loc) · 1.03 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
NAME := cub3D
CC := cc
CFLAGS := -Iinclude -Wall -Wextra -Werror -Ofast
HEADERS := include/cub3d.h
LIBFT := libs/libft.a
MLX := libs/libmlx.a
LIBS := -lglfw -L/Volumes/L/.brew/opt/glfw/lib
# LIBS := -ldl -lglfw -pthread -lm -lglfw
# LIBS := -lglfw -L/Users/ybenlafk/.brew/opt/glfw/lib/
SRCS := srcs/main.c \
srcs/parsing/parse.c \
srcs/engine/raycast.c \
srcs/engine/raycast_calc.c \
srcs/engine/player.c \
srcs/engine/skybox.c \
srcs/utils/is_map.c \
srcs/utils/get_map_size.c \
srcs/utils/ft_realloc.c \
srcs/utils/gnl/get_next_line_utils.c \
srcs/utils/free_all.c \
srcs/utils/ft_strcmp.c \
srcs/utils/gnl/get_next_line.c \
srcs/utils/get_step.c \
srcs/utils/get_rgba.c \
srcs/engine/minimap.c \
srcs/utils/mlx_draw_line.c \
srcs/utils/get_dem.c \
OBJS := $(SRCS:.c=.o)
%.o: %.c include/cub3d.h
$(CC) $(CFLAGS) -c $< -o $@
all: $(NAME)
$(NAME): $(OBJS)
$(CC) $(CFLAGS) $(OBJS) $(MLX) ${LIBFT} -o $(NAME) $(LIBS)
clean:
rm -f $(OBJS)
fclean: clean
rm -f $(NAME)
re: fclean all
.PHONY: all clean fclean re