42_cube3D/Makefile
Etienne Rey-bethbeder 4bd265e213 SIG HEIL
2023-06-13 14:19:45 +02:00

142 lines
5.7 KiB
Makefile

SRCS_GAME := main.c game/game.c game/init.c \
game/manage_keys.c game/raycasting.c game/dda.c game/draw.c game/utils.c
SRCS_MAP := parsing.c parsing_header.c parsing_header2.c parsing_meta.c parsing_body.c map.c parsing_body2.c parsing_header3.c
SRCS_MAP := $(addprefix map/, $(SRCS_MAP))
SRCS := ${SRCS_MAP} \
${SRCS_GAME}
OBJS := ${SRCS:.c=.o}
CC := gcc
LIBS := libftx/libftx.a MLX42/build/libmlx42.a -ldl -lglfw -lm
CFLAGS := -g -Wall -Wextra -Werror -Wno-conversion -Ofast -fsanitize=leak
NAME := cub3D
all: ${NAME}
${NAME}: ${OBJS}
make -C libftx all
${CC} -o ${NAME} ${OBJS} ${LIBS}
clean:
make -C libftx clean
rm -f ${OBJS}
fclean: clean
make -C libftx fclean
rm -f ${NAME}
re: fclean
make all
.PHONY: all clean fclean re coffee bozo
coffee:
@clear
@echo ""
@echo " ("
@echo " ) ("
@echo " ___...(-------)-....___"
@echo ' .-"" ) ( ""-.'
@echo " .-''''|-._ ) _.-|"
@echo ' / .--.| `""---...........---""` |'
@echo " / / | |"
@echo " | | | |"
@echo " \ \ | |"
@echo " '\ '\ | |"
@echo " '\ '| |"
@echo " _/ /\ /"
@echo " (__/ \ /"
@echo ' _..---""` \ /`""---.._'
@echo " .-' \ / '-."
@echo ": '-.__ __.-' :"
@echo ': ) ""---...---"" ( :'
@echo "\'._ '"--...___...--"' _.'"
@echo ' \""--..__ __..--""/'
@echo " '._ """----.....______.....----""" _.'"
@echo ' ""--..,,_____ _____,,..--"""'''
@echo ' """------"""'
@sleep 0.3
@clear
@echo ""
@echo " ("
@echo " ) ("
@echo " ___..(.------)--....___"
@echo ' .-"" ) ( ""-.'
@echo " .-''''|-._ ( ) _.-|"
@echo ' / .--.| `""---...........---""` |'
@echo " / / | |"
@echo " | | | |"
@echo " \ \ | |"
@echo " '\ '\ | |"
@echo " '\ '| |"
@echo " _/ /\ /"
@echo " (__/ \ /"
@echo ' _..---""` \ /`""---.._'
@echo " .-' \ / '-."
@echo ": '-.__ __.-' :"
@echo ': ) ""---...---"" ( :'
@echo "\'._ '"--...___...--"' _.'"
@echo ' \""--..__ __..--""/'
@echo " '._ """----.....______.....----""" _.'"
@echo ' ""--..,,_____ _____,,..--"""'''
@echo ' """------"""'
@sleep 0.3
@clear
@echo ""
@echo " ("
@echo " ) ("
@echo " ___..(.------)--....___"
@echo ' .-"" ) ( ""-.'
@echo " .-''''|-._ ( ) _.-|"
@echo ' / .--.| `""---...........---""` |'
@echo " / / | |"
@echo " | | | |"
@echo " \ \ | |"
@echo " '\ '\ | |"
@echo " '\ '| |"
@echo " _/ /\ /"
@echo " (__/ \ /"
@echo ' _..---""` \ /`""---.._'
@echo " .-' \ / '-."
@echo ": '-.__ __.-' :"
@echo ': ) ""---...---"" ( :'
@echo "\'._ '"--...___...--"' _.'"
@echo ' \""--..__ __..--""/'
@echo " '._ """----.....______.....----""" _.'"
@echo ' ""--..,,_____ _____,,..--"""'''
@echo ' """------"""'
@sleep 0.3
@clear
@echo ""
@echo " ( ) "
@echo " ) ("
@echo " ___)...----)----....___"
@echo ' .-"" ) ( ""-.'
@echo " .-''''|-._ ( ) _.-|"
@echo ' / .--.| `""---...........---""` |'
@echo " / / | |"
@echo " | | | |"
@echo " \ \ | |"
@echo " '\ '\ | |"
@echo " '\ '| |"
@echo " _/ /\ /"
@echo " (__/ \ /"
@echo ' _..---""` \ /`""---.._'
@echo " .-' \ / '-."
@echo ": '-.__ __.-' :"
@echo ': ) ""---...---"" ( :'
@echo "\'._ '"--...___...--"' _.'"
@echo ' \""--..__ __..--""/'
@echo " '._ """----.....______.....----""" _.'"
@echo ' ""--..,,_____ _____,,..--"""'''
@echo ' """------"""'
make coffee
bozo :
@wget -q -O bozo.gif https://i.kym-cdn.com/photos/images/newsfeed/002/322/200/e51.gif
@xdg-open bozo.gif
@sleep 2.26
@pkill eog
@rm bozo.gif