2023-01-20 08:41:52 -05:00
|
|
|
# **************************************************************************** #
|
|
|
|
# #
|
|
|
|
# ::: :::::::: #
|
|
|
|
# Makefile :+: :+: :+: #
|
|
|
|
# +:+ +:+ +:+ #
|
|
|
|
# By: cchauvet <cchauvet@student.42angouleme.fr +#+ +:+ +#+ #
|
|
|
|
# +#+#+#+#+#+ +#+ #
|
|
|
|
# Created: 2023/01/20 14:41:36 by cchauvet #+# #+# #
|
|
|
|
# Updated: 2023/01/20 14:41:42 by cchauvet ### ########.fr #
|
|
|
|
# #
|
|
|
|
# **************************************************************************** #
|
|
|
|
|
2023-01-16 12:38:47 -05:00
|
|
|
SRCS = mandatory/asset.c mandatory/draw.c mandatory/key.c mandatory/main.c mandatory/map.c mandatory/parsing2.c mandatory/parsing.c mandatory/xpm.c
|
|
|
|
|
|
|
|
BSRCS = bonus/asset.c bonus/draw.c bonus/key.c bonus/main.c bonus/map.c bonus/parsing2.c bonus/parsing.c bonus/xpm.c
|
2022-12-22 11:41:31 -05:00
|
|
|
|
2023-01-08 12:03:40 -05:00
|
|
|
OBJS = ${SRCS:.c=.o}
|
2022-12-22 11:41:31 -05:00
|
|
|
|
2023-01-16 12:38:47 -05:00
|
|
|
BOBJS = ${BSRCS:.c=.o}
|
|
|
|
|
2022-12-22 11:41:31 -05:00
|
|
|
NAME = so_long
|
|
|
|
|
|
|
|
LIBS = libftx/libftx.a minilibx-linux/libmlx.a
|
|
|
|
|
2023-01-04 14:07:13 -05:00
|
|
|
CC = clang
|
2022-12-22 11:41:31 -05:00
|
|
|
|
2023-01-20 08:41:52 -05:00
|
|
|
FLAG = -Wall -Wextra -Werror
|
2022-12-22 11:41:31 -05:00
|
|
|
|
|
|
|
%.o: %.c
|
|
|
|
${CC} ${FLAG} -c $< -o $@
|
|
|
|
|
|
|
|
all: ${NAME}
|
|
|
|
|
2023-01-16 12:38:47 -05:00
|
|
|
bonus: ${BOBJS}
|
|
|
|
make -C libftx
|
|
|
|
make -C minilibx-linux
|
|
|
|
${CC} ${BOBJS} -o ${NAME} ${LIBS} -lXext -lX11
|
|
|
|
|
2023-01-08 12:03:40 -05:00
|
|
|
${NAME}: ${OBJS}
|
2022-12-22 11:41:31 -05:00
|
|
|
make -C libftx
|
|
|
|
make -C minilibx-linux
|
2023-01-08 12:03:40 -05:00
|
|
|
${CC} ${OBJS} -o ${NAME} ${LIBS} -lXext -lX11
|
2022-12-22 11:41:31 -05:00
|
|
|
|
|
|
|
clean:
|
2023-01-16 12:38:47 -05:00
|
|
|
rm -f ${OBJS} ${BOBJS}
|
2023-01-16 12:39:55 -05:00
|
|
|
rm -f textures/*
|
2022-12-22 11:41:31 -05:00
|
|
|
make -C libftx clean
|
|
|
|
make -C minilibx-linux clean
|
|
|
|
|
|
|
|
fclean: clean
|
|
|
|
rm -f ${NAME}
|
|
|
|
make -C libftx fclean
|
|
|
|
make -C minilibx-linux clean
|
|
|
|
|
2023-01-09 14:41:06 -05:00
|
|
|
re: fclean
|
|
|
|
make all
|
2022-12-22 11:41:31 -05:00
|
|
|
|
2023-01-16 12:38:47 -05:00
|
|
|
.PHONY: all clean fclean re bonus
|