changeset 3907:321bf8ea2222 draft

(svn r4997) -Fix: [OSX] reverted the OSX part of rev 4994 as it caused dyld (lib) crashes now OSX strips after linking again
author bjarni <bjarni@openttd.org>
date Sat, 27 May 2006 23:16:37 +0000
parents 198cabb2cef6
children 7bab95c86404
files Makefile os/macosx/Makefile
diffstat 2 files changed, 15 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/Makefile
+++ b/Makefile
@@ -349,10 +349,16 @@
 ifndef MORPHOS
 ifndef IRIX
 # automatical strip breaks under morphos
+ifdef OSX
+# it appears that OSX can't handle automated stripping when mixing C and C++
+# we will do it manually in the target OSX_STRIP
+OSX_STRIP:=OSX_STRIP
+else
 LDFLAGS += -s
 endif
 endif
 endif
+endif
 
 ifdef OSX
 # these compilerflags makes the app run as fast as possible without making the app unstable. It works on G3 or newer
--- a/os/macosx/Makefile
+++ b/os/macosx/Makefile
@@ -42,6 +42,9 @@
 ifndef LIPO
 LIPO := lipo
 endif
+ifndef STRIP
+STRIP := strip
+endif
 
 # targets to link OpenTTD
 $(TTD): $(OTTD_PPC) $(OTTD_i386) $(OTTD_PPC970)
@@ -99,6 +102,10 @@
 
 endif
 
+# manual strip, as the -s option fails
+$(OSX_STRIP): $(TTD)
+	$(Q)$(STRIP) openttd
+
 ifdef JAGUAR
 JAGUAR_POSTFIX := -jaguar
 endif
@@ -106,7 +113,7 @@
 # build the bundle. OSX wants to keep apps in bundles, so we will give it one
 # the good thing about bundles is that you can keep extra files in them, so we keep lng files and a data dir in it
 
-BUILD_OSX_BUNDLE: $(TTD)
+BUILD_OSX_BUNDLE: $(TTD) $(OSX_STRIP)
 	@echo '===> Building application bundle'
 	$(Q)rm -fr "$(OSXAPP)"
 	$(Q)mkdir -p "$(OSXAPP)"/Contents/MacOS
@@ -141,6 +148,6 @@
 	$(Q)hdiutil create -ov -format UDZO -srcfolder "OpenTTD $(REV)" openttd-"$(REV)"-osx"$(JAGUAR_POSTFIX)".dmg
 	$(Q)rm -fr "OpenTTD $(REV)"
 
-$(OSX): $(TTD) BUILD_OSX_BUNDLE
+$(OSX): $(TTD) $(OSX_STRIP) BUILD_OSX_BUNDLE
 
 .PHONY: release $(BUILD_OSX_BUNDLE) $(UNIVERSAL_BINARY)