-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
47 lines (39 loc) · 1.09 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
NAME = so_long
CC = gcc
LIB_PATH = lib/
SRC = main.c
MAP_SRC = ./map/check_map.c \
./map/generate_map.c \
./map/pac_gomme.c
ENGINE_SRC = ./engine/vector.c \
./engine/images.c \
./engine/time.c \
./engine/keyboard.c
WIN_SRC = ./window/window.c \
./window/ui.c
ENTITY_SRC = ./entities/entity.c \
./entities/ia.c \
./entities/player.c
LIBFT_PATH = $(LIB_PATH)libft
LIBFT_NAME = libft.a
MLX_PATH = $(LIB_PATH)minilibx-linux
MLX_NAME = mlx_Linux
GNL_PATH = $(LIB_PATH)get_next_line/
GNL_SRC = $(GNL_PATH)get_next_line.c \
$(GNL_PATH)get_next_line_utils.c
all: $(LIBFT_NAME) $(MLX_NAME) $(NAME)
$(NAME):
$(CC) -g -I$(LIB_PATH)minilibx-linux/ $(SRC) $(WIN_SRC) $(MAP_SRC) $(ENTITY_SRC) $(ENGINE_SRC) $(GNL_SRC) -L$(LIB_PATH)minilibx-linux -l$(MLX_NAME) -L/usr/lib -lXext -lX11 -lm $(LIBFT_PATH)/$(LIBFT_NAME) -o $(NAME) #-Wextra -Wall -Werror
$(LIBFT_NAME):
make -C $(LIBFT_PATH)
$(MLX_NAME):
make -C $(MLX_PATH)
clean:
make clean -C $(LIBFT_PATH)
make clean -C $(MLX_PATH)
fclean: clean
make fclean -C $(LIBFT_PATH)
rm -rf $(NAME)
re: fclean all
run: all
./$(NAME)