]> Shamusworld >> Repos - virtualjaguar/blobdiff - Makefile
Makefile fix to compile properly on Mac OSX.
[virtualjaguar] / Makefile
index d408ad1e7179a6e08a2c9fce13de1d264dbbc0b0..54dcca69753fa07381cdada03cd1f57d0c2d4408 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -2,14 +2,31 @@
 #
 # by James Hammons
 # (C) 2011 Underground Software
+#
+# Note that we control the version information here--uncomment only one set of
+# echo's from the "prepare" recipe. :-)
+#
 
 FIND = find
 
+# Gah
+OSTYPE := $(shell uname -a)
+
+# Should catch both 'darwin' and 'darwin7.0'
+ifeq "$(findstring Darwin,$(OSTYPE))" "Darwin"
+QMAKE_EXTRA := -spec macx-g++
+endif
+
+
 all: prepare virtualjaguar
        @echo -e "\033[01;33m***\033[00;32m Success!\033[00m"
 
 prepare:
        @echo -e "\033[01;33m***\033[00;32m Preparing to compile Virtual Jaguar...\033[00m"
+#      @echo "#define VJ_RELEASE_VERSION \"v2.0.0\"" > src/version.h
+#      @echo "#define VJ_RELEASE_SUBVERSION \"Final\"" >> src/version.h
+       @echo "#define VJ_RELEASE_VERSION \"SVN `svn info | grep -i revision`\"" > src/version.h
+       @echo "#define VJ_RELEASE_SUBVERSION \"2.0.0 Prerelease\"" >> src/version.h
 
 virtualjaguar: sources libs makefile-qt
        @echo -e "\033[01;33m***\033[00;32m Making Virtual Jaguar...\033[00m"
@@ -17,10 +34,10 @@ virtualjaguar: sources libs makefile-qt
 
 makefile-qt: virtualjaguar.pro
        @echo -e "\033[01;33m***\033[00;32m Creating Qt makefile...\033[00m"
-       qmake virtualjaguar.pro -o makefile-qt
+       qmake $(QMAKE_EXTRA) virtualjaguar.pro -o makefile-qt
 
 libs: obj/libmusashi.a
-       @echo -e "\033[01;33m***\033[00;32m Make libs here (if any)...\033[00m"
+       @echo -e "\033[01;33m***\033[00;32m Libraries successfully made.\033[00m"
 
 obj/libmusashi.a:
        @echo -e "\033[01;33m***\033[00;32m Making Musashi...\033[00m"
@@ -30,7 +47,6 @@ sources: src/*.h src/*.cpp src/*.c
 
 clean:
        @echo -ne "\033[01;33m***\033[00;32m Cleaning out the garbage...\033[00m"
-#      @-$(MAKE) -f makefile-qt clean
        @-rm -rf ./obj
        @-rm makefile-qt
        @-rm virtualjaguar