forked from jainavas/cub3d
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMakefile
More file actions
64 lines (49 loc) · 4.24 KB
/
Makefile
File metadata and controls
64 lines (49 loc) · 4.24 KB
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
LIB = ar rcs
RM = rm -f
CC = cc
CCFLAGS = -Wall -Wextra -Werror -g3 -fsanitize=address
SRC_DIR = src
LIB_DIR = minilibx-linux
SRC = core/main.c core/cleanup.c graphics/raycasting.c \
graphics/render.c graphics/texture.c input/movement.c \
map/generator.c map/parser.c map/parser2.c map/validator.c map/parser_utils.c \
utils/image_utils.c utils/math_utils.c
OBJ = $(SRC:.c=.o)
INCLUDE = cub3d.h
NAME = cub3d
MLXA = minilibx-linux/libmlx_Linux.a
LIBFTA = libft_ext/libft.a
GREEN = \033[0;32m
RESET = \033[0m
all: $(NAME)
@echo "$(GREEN)\n\n──────────────────────────────────────────────────────────────────────────────"
@echo "─██████████████─██████──██████─██████████████───██████████████─████████████───"
@echo "─██░░░░░░░░░░██─██░░██──██░░██─██░░░░░░░░░░██───██░░░░░░░░░░██─██░░░░░░░░████─"
@echo "─██░░██████████─██░░██──██░░██─██░░██████░░██───██████████░░██─██░░████░░░░██─"
@echo "─██░░██─────────██░░██──██░░██─██░░██──██░░██───────────██░░██─██░░██──██░░██─"
@echo "─██░░██─────────██░░██──██░░██─██░░██████░░████─██████████░░██─██░░██──██░░██─"
@echo "─██░░██─────────██░░██──██░░██─██░░░░░░░░░░░░██─██░░░░░░░░░░██─██░░██──██░░██─"
@echo "─██░░██─────────██░░██──██░░██─██░░████████░░██─██████████░░██─██░░██──██░░██─"
@echo "─██░░██─────────██░░██──██░░██─██░░██────██░░██─────────██░░██─██░░██──██░░██─"
@echo "─██░░██████████─██░░██████░░██─██░░████████░░██─██████████░░██─██░░████░░░░██─"
@echo "─██░░░░░░░░░░██─██░░░░░░░░░░██─██░░░░░░░░░░░░██─██░░░░░░░░░░██─██░░░░░░░░████─"
@echo "─██████████████─██████████████─████████████████─██████████████─████████████───"
@echo "──────────────────────────────────────────────────────────────────────────────"
@echo "$(RESET)\n*** Move with WASD, turn left and right with arrows ***"
@echo "$(GREEN)\nEnjoy the game!"
%.o: %.c
$(CC) $(CCFLAGS) -I/libft_ext/libft.h -I/usr/include -Iminilibx-linux -O3 -c $< -o $@
$(NAME): $(OBJ)
@cd libft_ext && make
@cd minilibx-linux && make
@$(CC) $(CCFLAGS) $(OBJ) -I ../cub3d.h -I /libft_ext/libft.h $(MLXA) $(PRINTFA) $(LIBFTA) -Iminilibx-linux -lXext -lX11 -lm -lz -o $(NAME)
clean:
$(RM) $(OBJ)
@cd minilibx-linux && make
@cd libft_ext && make clean
fclean: clean
$(RM) $(NAME)
@cd minilibx-linux && make
@cd libft_ext && make fclean
re: fclean all
.PHONY: all clean fclean re