Archived
1
0
This repository has been archived on 2024-10-25. You can view files and clone it, but cannot push or open issues or pull requests.
so_long/Makefile

69 lines
1.9 KiB
Makefile
Raw Normal View History

2024-01-06 17:15:02 +01:00
# **************************************************************************** #
# #
# ::: :::::::: #
# Makefile :+: :+: :+: #
# +:+ +:+ +:+ #
# By: adjoly <adjoly@student.42.fr> +#+ +:+ +#+ #
# +#+#+#+#+#+ +#+ #
# Created: 2023/11/01 11:03:22 by adjoly #+# #+# #
2024-01-26 17:56:40 +01:00
# Updated: 2024/01/26 16:16:13 by adjoly ### ########.fr #
2024-01-06 17:15:02 +01:00
# #
# **************************************************************************** #
NAME = so_long
CC = cc
2024-01-09 16:12:58 +01:00
SRCS = main.c \
get_map.c \
2024-01-19 15:41:43 +01:00
print_map.c \
2024-01-26 17:56:40 +01:00
map_error/ft_check_file.c \
map_error/ft_check_map_content.c \
map_error/ft_check_map_error.c \
map_error/ft_check_map_state.c \
map_error/ft_check_map_utils.c \
move_character/ft_move_character.c \
move_character/ft_move_down.c \
move_character/ft_move_up.c \
move_character/ft_move_left.c \
move_character/ft_move_right.c
2024-01-06 17:15:02 +01:00
OBJS = $(SRCS:.c=.o)
2024-01-07 22:45:08 +01:00
FLAGS = -Werror -Wall -Wextra -g
2024-01-06 17:15:02 +01:00
2024-01-09 16:12:58 +01:00
HEADERS = so_long.h
2024-01-06 17:15:02 +01:00
2024-01-09 16:12:58 +01:00
LIB = MacroLibX/libmlx.so \
libft/libft.a \
2024-01-13 19:04:22 +01:00
get_next_line/get_next_line.a \
printf/libftprintf.a
2024-01-06 17:15:02 +01:00
MLX_FLAGS = -lSDL2
$(NAME): $(OBJS)
make -C libft
make -C get_next_line
2024-01-13 19:04:22 +01:00
make -C printf
2024-01-09 16:12:58 +01:00
$(CC) $(FLAGS) $(MLX_FLAGS) $(OBJS) $(LIB) -o $(NAME)
2024-01-06 17:15:02 +01:00
%.o: %.c
2024-01-09 16:12:58 +01:00
$(CC) $(FLAGS) -I $(HEADERS) $< -c -o $@
2024-01-06 17:15:02 +01:00
all: $(NAME)
clean:
2024-01-08 13:33:55 +01:00
make -C libft clean
2024-01-09 16:12:58 +01:00
make -C get_next_line clean
2024-01-13 19:13:17 +01:00
make -C printf clean
2024-01-06 17:15:02 +01:00
rm -f $(OBJS)
fclean: clean
2024-01-08 13:33:55 +01:00
make -C libft fclean
2024-01-09 16:12:58 +01:00
make -C get_next_line fclean
2024-01-13 19:13:17 +01:00
make -C printf fclean
2024-01-06 17:15:02 +01:00
rm -f $(NAME)
re: fclean all
.PHONY: clean all re fclean