[Scummvm-cvs-logs] SF.net SVN: scummvm:[39537] scummvm/trunk

vinterstum at users.sourceforge.net vinterstum at users.sourceforge.net
Thu Mar 19 21:49:22 CET 2009


Revision: 39537
          http://scummvm.svn.sourceforge.net/scummvm/?rev=39537&view=rev
Author:   vinterstum
Date:     2009-03-19 20:49:22 +0000 (Thu, 19 Mar 2009)

Log Message:
-----------
Added support for specifying which prefix directory to link in static libs for (for mac os x and iphone bundles), and use a build-specific strip command

Modified Paths:
--------------
    scummvm/trunk/configure
    scummvm/trunk/ports.mk

Modified: scummvm/trunk/configure
===================================================================
--- scummvm/trunk/configure	2009-03-19 20:40:05 UTC (rev 39536)
+++ scummvm/trunk/configure	2009-03-19 20:49:22 UTC (rev 39537)
@@ -123,10 +123,12 @@
 # more defaults
 _backend=sdl
 _ranlib=ranlib
+_strip=strip
 _ar="ar cru"
 _windres=windres
 _win32path="C:/scummvm"
 _aos4path="Games:ScummVM"
+_staticlibpath=/sw
 _sdlconfig=sdl-config
 _sdlpath="$PATH"
 _nasmpath="$PATH"
@@ -783,6 +785,9 @@
 		arg=`echo $ac_option | cut -d '=' -f 2`
 		_nasmpath="$arg:$arg/bin"
 		;;
+        --with-staticlib-prefix=*)
+                _staticlibpath=`echo $ac_option | cut -d '=' -f 2`
+                ;;
 	--host=*)
 		_host=`echo $ac_option | cut -d '=' -f 2`
 		;;
@@ -1181,6 +1186,7 @@
 			;;
 		*darwin*)
 			_ranlib=$_host-ranlib
+			_strip=$_host-strip
 			;;
 		gp2x)
 			echo "Cross-compiling to $_host, forcing endianness, alignment and type sizes"
@@ -1641,6 +1647,7 @@
 else
 	_def_zlib='#undef USE_ZLIB'
 fi
+add_to_config_mk_if_yes "$_zlib" 'USE_ZLIB = 1'
 echo "$_zlib"
 
 #
@@ -1979,10 +1986,12 @@
 CXXFLAGS := $CXXFLAGS
 LIBS += $LIBS
 RANLIB := $_ranlib
+STRIP := $_strip
 AR := $_ar
 WINDRES := $_windres
 WIN32PATH=$_win32path
 AOS4PATH=$_aos4path
+STATICLIBPATH=$_staticlibpath
 
 BACKEND := $_backend
 MODULES += $MODULES

Modified: scummvm/trunk/ports.mk
===================================================================
--- scummvm/trunk/ports.mk	2009-03-19 20:40:05 UTC (rev 39536)
+++ scummvm/trunk/ports.mk	2009-03-19 20:49:22 UTC (rev 39537)
@@ -55,7 +55,7 @@
 	chmod 644 $(bundle_name)/Contents/Resources/*
 	cp scummvm-static $(bundle_name)/Contents/MacOS/scummvm
 	chmod 755 $(bundle_name)/Contents/MacOS/scummvm
-	strip $(bundle_name)/Contents/MacOS/scummvm
+	$(STRIP) $(bundle_name)/Contents/MacOS/scummvm
 
 iphonebundle: $(srcdir)/dists/iphone/Info.plist
 	mkdir -p $(bundle_name)
@@ -67,41 +67,39 @@
 	cp $(srcdir)/dists/iphone/icon.png $(bundle_name)/icon.png
 	cp $(srcdir)/dists/iphone/Default.png $(bundle_name)/Default.png
 
-# location of additional libs for OS X usually /sw/ for fink or
-# /opt/local/ for darwinports
-OSXOPT=/sw
-
 # Location of static libs for the iPhone
-ifeq ($(BACKEND), iphone)
-OSXOPT=/usr/local/arm-apple-darwin
-else
+ifneq ($(BACKEND), iphone)
 # Static libaries, used for the scummvm-static and iphone targets
-OSX_STATIC_LIBS := `$(OSXOPT)/bin/sdl-config --static-libs`
+OSX_STATIC_LIBS := `$(STATICLIBPATH)/bin/sdl-config --static-libs`
 endif
 
 ifdef USE_VORBIS
 OSX_STATIC_LIBS += \
-		$(OSXOPT)/lib/libvorbisfile.a \
-		$(OSXOPT)/lib/libvorbis.a \
-		$(OSXOPT)/lib/libogg.a
+		$(STATICLIBPATH)/lib/libvorbisfile.a \
+		$(STATICLIBPATH)/lib/libvorbis.a \
+		$(STATICLIBPATH)/lib/libogg.a
 endif
 
 ifdef USE_TREMOR
-OSX_STATIC_LIBS += $(OSXOPT)/lib/libvorbisidec.a
+OSX_STATIC_LIBS += $(STATICLIBPATH)/lib/libvorbisidec.a
 endif
 
 ifdef USE_FLAC
-OSX_STATIC_LIBS += $(OSXOPT)/lib/libFLAC.a
+OSX_STATIC_LIBS += $(STATICLIBPATH)/lib/libFLAC.a
 endif
 
 ifdef USE_MAD
-OSX_STATIC_LIBS += $(OSXOPT)/lib/libmad.a
+OSX_STATIC_LIBS += $(STATICLIBPATH)/lib/libmad.a
 endif
 
 ifdef USE_MPEG2
-OSX_STATIC_LIBS += $(OSXOPT)/lib/libmpeg2.a
+OSX_STATIC_LIBS += $(STATICLIBPATH)/lib/libmpeg2.a
 endif
 
+ifdef USE_ZLIB
+OSX_STATIC_LIBS += $(STATICLIBPATH)/lib/libz.a
+endif
+
 # Special target to create a static linked binary for Mac OS X.
 # We use -force_cpusubtype_ALL to ensure the binary runs on every
 # PowerPC machine.
@@ -111,7 +109,6 @@
 		$(OSX_STATIC_LIBS) \
 		-lSystemStubs \
 		-lz
-#		$(OSXOPT)/lib/libz.a
 
 # Special target to create a static linked binary for the iPhone
 iphone: $(OBJS)
@@ -124,8 +121,9 @@
 
 # Special target to create a snapshot disk image for Mac OS X
 # TODO: Replace AUTHORS by Credits.rtf
-osxsnap: bundle credits
+osxsnap: bundle
 	mkdir ScummVM-snapshot
+	$(srcdir)/tools/credits.pl --text > $(srcdir)/AUTHORS
 	cp $(srcdir)/AUTHORS ./ScummVM-snapshot/Authors
 	cp $(srcdir)/COPYING ./ScummVM-snapshot/License
 	cp $(srcdir)/COPYRIGHT ./ScummVM-snapshot/Copyright\ Holders
@@ -153,7 +151,7 @@
 # Special target to create a win32 snapshot binary
 win32dist: $(EXECUTABLE)
 	mkdir -p $(WIN32PATH)
-	strip $(EXECUTABLE) -o $(WIN32PATH)/$(EXECUTABLE)
+	$(STRIP) $(EXECUTABLE) -o $(WIN32PATH)/$(EXECUTABLE)
 	cp $(srcdir)/dists/pred.dic $(WIN32PATH)
 	cp $(DIST_FILES_THEMES) $(WIN32PATH)
 	cp $(DIST_FILES_ENGINEDATA) $(WIN32PATH)
@@ -174,7 +172,7 @@
 # Special target to create an AmigaOS snapshot installation
 aos4dist: $(EXECUTABLE)
 	mkdir -p $(AOS4PATH)
-	strip $(EXECUTABLE) -o $(AOS4PATH)/$(EXECUTABLE)_SVN
+	$(STRIP) $(EXECUTABLE) -o $(AOS4PATH)/$(EXECUTABLE)_SVN
 	cp icons/scummvm.info $(AOS4PATH)/$(EXECUTABLE)_SVN.info
 	cp $(DIST_FILES_THEMES) $(AOS4PATH)/themes/
 	cp $(DIST_FILES_ENGINEDATA) $(AOS4PATH)/extras/


This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.




More information about the Scummvm-git-logs mailing list