-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMakefile
More file actions
45 lines (36 loc) · 831 Bytes
/
Makefile
File metadata and controls
45 lines (36 loc) · 831 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
41
42
43
44
45
NAME = so_long
MLXLIB = mlx/libmlx.a
LIBFT = libft/libft.a
FT_PRINTF = ft_printf/libftprintf.a
CFLAGS = -Wall -Wextra -Werror
MLXFLAGS = mlx/libmlx.a -lXext -lX11
SRC = src/main.c \
src/check_map.c \
src/draw_map.c \
src/read_map.c \
src/moves.c \
src/utils.c \
src/floodfill.c \
get_next_line/get_next_line.c \
get_next_line/get_next_line_utils.c
OBJ = $(SRC:.c=.o)
all: $(NAME)
$(NAME): $(OBJ) $(MLXLIB) $(LIBFT) $(FT_PRINTF)
cc $(CFLAGS) $(OBJ) $(MLXFLAGS) $(LIBFT) $(FT_PRINTF) -o $(NAME)
$(MLXLIB):
make -C ./mlx
$(LIBFT):
make -C ./libft
$(FT_PRINTF):
make -C ./ft_printf
clean:
rm -rf $(OBJ)
make -C ./mlx clean
make -C ./libft clean
make -C ./ft_printf clean
fclean: clean
rm -rf $(NAME)
make -C ./libft fclean
make -C ./ft_printf fclean
re: fclean all
.PHONY: all clean fclean re