-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMakefile
More file actions
40 lines (32 loc) · 1008 Bytes
/
Makefile
File metadata and controls
40 lines (32 loc) · 1008 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
40
NAME = so_long
SOURCES = so_long.c boundaries.c check.c path.c flood.c\
map.c map_utils.c mlx_input_extra.c mlx_input.c utilities.c
REMOVE = rm
CC = cc
CFLAGS = -Wall -Wextra -Werror -g
MLBX = -Lminilibx-linux -lmlx_Linux
X11 = -lX11 -lXext
LIBFT = libft/libft.a
all: $(NAME)
$(NAME):
@echo "Extracting Minilibx..."
@tar -xzf minilibx-linux.tgz
@echo "Compiling Minilibx..."
@cd minilibx-linux/ && make -s
@cd ../
@echo "Compiling Libft..."
@cd libft/ && make -s
@cd ../
@echo "Compiling executable..."
@$(CC) $(CFLAGS) $(SOURCES) $(MLBX) $(X11) -o $(NAME) $(LIBFT)
@echo "Game compiled successfully!"
clean:
@echo "Deleting Minilibx data..."
@test -d "minilibx-linux/" && rm -rf "minilibx-linux/" || echo "No minilibx directory found!"
@echo "Cleaning Libft folder..."
@cd libft/ && make clean -s
@cd ../
fclean: clean
@test -f $(NAME) && $(REMOVE) $(NAME) && echo "Executable deleted successfully!" || echo "Executable already deleted!"
re: fclean all
.PHONY: all clean fclean re