+# Targets for convenience sake, not "real" targets
+.PHONY: clean
+
+all: checkenv message obj $(TARGET)$(EXESUFFIX)
+ @echo
+ @echo -e "\033[01;33m***\033[00;32m Looks like it compiled OK... Give it a whirl!\033[00m"
+ @echo
+
+# Check the compilation environment, barf if not appropriate
+
+checkenv: msg-check-env check-sdl check-zlib check-cdio check-gl ;
+
+#check-sdl: msg-ck-sdl $(if $(strip ),,msg-no-sdl stop-on-error)
+check-sdl: msg-ck-sdl $(if $(shell which sdl-config),,msg-no-sdl stop-on-error)
+ @echo -e "\033[01;37mOK\033[00m"
+
+msg-ck-sdl:
+ @echo -en " \033[00;32mSDL... \033[00m"
+
+msg-no-sdl:
+ @echo -e "\033[01;37mNOT FOUND\033[00m"
+ @echo
+ @echo -e "\033[01;33mIt seems that you don't have the SDL development libraries installed. If you"
+ @echo -e "have installed them, make sure that the sdl-config file is somewhere in your"
+ @echo -e "path and is executable.\033[00m"
+ @echo
+
+check-zlib: msg-ck-zlib $(if $(shell pkg-config --silence-errors --libs zlib),,msg-no-zlib stop-on-error)
+ @echo -e "\033[01;37mOK\033[00m"
+
+msg-ck-zlib:
+ @echo -en " \033[00;32mZLIB... \033[00m"
+
+msg-no-zlib:
+ @echo -e "\033[01;37mNOT FOUND\033[00m"
+ @echo
+ @echo -e "\033[01;33mIt seems that you don't have ZLIB installed. If you have installed it, make"
+ @echo -e "sure that the pkg-config file is somewhere in your path and is executable.\033[00m"
+ @echo
+
+#NOTE that this check shouldn't be fatal, we can bounce back from it by excluding CD support
+check-cdio: msg-ck-cdio $(if $(CDIOLIB),msg-cdio,msg-no-cdio) ;
+
+msg-ck-cdio:
+ @echo -en " \033[00;32mLIBCDIO... \033[00m"
+
+msg-cdio:
+ @echo -e "\033[01;37mOK\033[00m"
+
+msg-no-cdio:
+ @echo -e "\033[01;37mNOT FOUND\033[00m"
+ @echo
+ @echo -e "\033[01;33mIt seems that you don't have LIBCDIO installed. Since this is not fatal,"
+ @echo -e "Virtual Jaguar will be built WITHOUT CD support.\033[00m"
+ @echo
+
+check-gl: msg-ck-gl
+ @echo -e "*** GL CHECK NOT IMPLEMENTED ***"
+
+msg-ck-gl:
+ @echo -en " \033[00;32mOpenGL... \033[00m"
+
+stop-on-error: ; $(error COMPILATION ENVIRONMENT)
+
+msg-check-env:
+ @echo
+ @echo -e "\033[01;33m***\033[00;32m Checking compilation environment: \033[00m"
+ @echo
+
+message:
+ @echo
+ @echo -e "\033[01;33m***\033[00;32m Building Virtual Jaguar for $(MSG)...\033[00m"
+ @echo