-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
51 lines (41 loc) · 1.88 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
49
50
51
# **************************************************************************** #
# #
# ::: :::::::: #
# Makefile :+: :+: :+: #
# +:+ +:+ +:+ #
# By: aaslan <[email protected] +#+ +:+ +#+ #
# +#+#+#+#+#+ +#+ #
# Created: 2023/01/28 08:57:37 by aaslan #+# #+# #
# Updated: 2023/02/13 19:00:07 by aaslan ### ########.fr #
# #
# **************************************************************************** #
NAME := so_long
CC := gcc
CFLAGS := -Wall -Wextra -Werror
LFLAGS := -Lmlx_linux -lmlx_Linux -L/usr/lib -Imlx_linux -lXext -lX11 -lm -lz
MLX := mlx_linux/libmlx.a
SRC := $(wildcard src/*.c)
UTILS := $(wildcard src/utilities/*.c)
VALIDATORS := $(wildcard src/map_validators/*.c)
ANIMATIONS := $(wildcard src/animations/*.c)
HANDLERS := $(wildcard src/handlers/*.c)
HELPERS := $(wildcard src/mlx_helpers/*.c)
CLEANERS := $(wildcard src/cleaners/*.c)
OBJS := $(SRC:%.c=%.o) $(UTILS:%.c=%.o) $(VALIDATORS:%.c=%.o) $(ANIMATIONS:%.c=%.o) $(HANDLERS:%.c=%.o) $(HELPERS:%.c=%.o) $(CLEANERS:%.c=%.o)
all: $(NAME)
$(NAME): $(MLX) $(OBJS)
@$(CC) $(OBJS) $(CFLAGS) $(LFLAGS) $(MLX) -o $(NAME)
$(MLX):
@make -C mlx_linux
@clear
clean:
@rm -rf $(OBJS)
@clear
fclean: clean
@rm -rf $(NAME)
@make clean -C mlx_linux
@clear
re: fclean all
norm:
@norminette src/so_long.h src/*.c src/utilities/*.c src/map_validators/*.c src/animations/*.c src/handlers/*.c src/mlx_helpers/*.c src/cleaners/*.c
.PHONY: all clean fclean re