summaryrefslogtreecommitdiff
path: root/os/macosx
diff options
context:
space:
mode:
authorKUDr <kudr@openttd.org>2006-05-27 16:12:16 +0000
committerKUDr <kudr@openttd.org>2006-05-27 16:12:16 +0000
commit5e73dce0e71791b87e5b096a890578eefcc26639 (patch)
treee4580db6e03032a997fce1392929b7190dc3b03d /os/macosx
parent3d01010440440cfbffd1e5d3b0cf1f23f0503a76 (diff)
downloadopenttd-5e73dce0e71791b87e5b096a890578eefcc26639.tar.xz
(svn r4987) Feature: Merged YAPF into trunk. Thanks to devs for continuous support and users for testing.
Diffstat (limited to 'os/macosx')
-rw-r--r--os/macosx/Makefile32
-rw-r--r--os/macosx/Makefile.setup3
2 files changed, 21 insertions, 14 deletions
diff --git a/os/macosx/Makefile b/os/macosx/Makefile
index a8c276362..07cb8af19 100644
--- a/os/macosx/Makefile
+++ b/os/macosx/Makefile
@@ -28,55 +28,59 @@ $(TTD): $(OTTD_PPC) $(OTTD_i386) $(OTTD_PPC970)
$(OTTD_PPC): $(MAKE_CONFIG) $(OBJS_ppc)
@echo '[PowerPC] Linking $(TTD)'
- $(Q)$(CC) $(LDFLAGS) $(TTDLDFLAGS) $(OBJS_ppc) $(LIBS) $(LDFLAGS_PPC) -arch ppc -o $@
+ $(Q)$(CXX) $(LDFLAGS) $(TTDLDFLAGS) $(OBJS_ppc) $(LIBS) $(LDFLAGS_PPC) -arch ppc -o $@
$(OTTD_i386): $(MAKE_CONFIG) $(OBJS_i386)
@echo '[i386] Linking $(TTD)'
- $(Q)$(CC) $(LDFLAGS) $(TTDLDFLAGS) $(OBJS_i386) $(LIBS) $(LDFLAGS_i386) -arch i386 -o $@
+ $(Q)$(CXX) $(LDFLAGS) $(TTDLDFLAGS) $(OBJS_i386) $(LIBS) $(LDFLAGS_i386) -arch i386 -o $@
$(OTTD_PPC970): $(MAKE_CONFIG) $(OBJS_ppc970)
@echo '[PowerPC G5] Linking $(TTD)'
- $(Q)$(CC) $(LDFLAGS) $(TTDLDFLAGS) $(OBJS_ppc970) $(LIBS) $(LDFLAGS_PPC) $(G5_FLAGS) -arch ppc970 -o $@
+ $(Q)$(CXX) $(LDFLAGS) $(TTDLDFLAGS) $(OBJS_ppc970) $(LIBS) $(LDFLAGS_PPC) $(G5_FLAGS) -arch ppc970 -o $@
# targets to compile each c, m and cpp file
.OSX/%.o.ppc: %.c .deps/%.d
@echo '[PowerPC] Compiling $<'
- $(Q)$(CC) $(CFLAGS) $(CFLAGS_PPC) $(CDEFS) -arch ppc -c -o $@ $<
+ $(Q)$(CC) $(CC_CFLAGS) $(CFLAGS) $(CFLAGS_PPC) $(CDEFS) -arch ppc -c -o $@ $<
.OSX/%.o.ppc: %.cpp .deps/%.d
@echo '[PowerPC] Compiling $<'
- $(Q)$(CPP) $(CFLAGS) $(CFLAGS_PPC) $(CDEFS) -arch ppc -c -o $@ $<
+ $(Q)$(CXX) $(CFLAGS) $(CFLAGS_PPC) $(CDEFS) -arch ppc -c -o $@ $<
.OSX/%.o.ppc: %.m .deps/%.d
@echo '[PowerPC] Compiling $<'
- $(Q)$(CC) $(CFLAGS) $(CFLAGS_PPC) $(CDEFS) -arch ppc -c -o $@ $<
+ $(Q)$(CC) $(CC_CFLAGS) $(CFLAGS) $(CFLAGS_PPC) $(CDEFS) -arch ppc -c -o $@ $<
.OSX/%.o.i386: %.c .deps/%.d
@echo '[i386] Compiling $<'
- $(Q)$(CC) $(CFLAGS) $(CFLAGS_i386) $(CDEFS) -arch i386 -c -o $@ $<
+ $(Q)$(CC) $(CC_CFLAGS) $(CFLAGS) $(CFLAGS_i386) $(CDEFS) -arch i386 -c -o $@ $<
.OSX/%.o.i386: %.cpp .deps/%.d
@echo '[i386] Compiling $<'
- $(Q)$(CPP) $(CFLAGS) $(CFLAGS_i386) $(CDEFS) -arch i386 -c -o $@ $<
+ $(Q)$(CXX) $(CFLAGS) $(CFLAGS_i386) $(CDEFS) -arch i386 -c -o $@ $<
.OSX/%.o.i386: %.m .deps/%.d
@echo '[i386] Compiling $<'
- $(Q)$(CC) $(CFLAGS) $(CFLAGS_i386) $(CDEFS) -arch i386 -c -o $@ $<
+ $(Q)$(CC) $(CC_CFLAGS) $(CFLAGS) $(CFLAGS_i386) $(CDEFS) -arch i386 -c -o $@ $<
.OSX/%.o.ppc970: %.c .deps/%.d
@echo '[PowerPC G5] Compiling $<'
- $(Q)$(CC) $(CFLAGS) $(CFLAGS_PPC) $(G5_FLAGS) $(CDEFS) -arch ppc970 -c -o $@ $<
+ $(Q)$(CC) $(CC_CFLAGS) $(CFLAGS) $(CFLAGS_PPC) $(G5_FLAGS) $(CDEFS) -arch ppc970 -c -o $@ $<
.OSX/%.o.ppc970: %.cpp .deps/%.d
@echo '[PowerPC G5] Compiling $<'
- $(Q)$(CPP) $(CFLAGS) $(CFLAGS_PPC) $(G5_FLAGS) $(CDEFS) -arch ppc970 -c -o $@ $<
+ $(Q)$(CXX) $(CFLAGS) $(CFLAGS_PPC) $(G5_FLAGS) $(CDEFS) -arch ppc970 -c -o $@ $<
.OSX/%.o.ppc970: %.m .deps/%.d
@echo '[PowerPC G5] Compiling $<'
- $(Q)$(CC) $(CFLAGS) $(CFLAGS_PPC) $(G5_FLAGS) $(CDEFS) -arch ppc970 -c -o $@ $<
+ $(Q)$(CC) $(CC_CFLAGS) $(CFLAGS) $(CFLAGS_PPC) $(G5_FLAGS) $(CDEFS) -arch ppc970 -c -o $@ $<
endif
+# manual strip, as the -s option fails
+$(OSX_STRIP): $(TTD)
+ $(Q)strip openttd
+
ifdef JAGUAR
JAGUAR_POSTFIX := -jaguar
endif
@@ -84,7 +88,7 @@ endif
# 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
@@ -119,6 +123,6 @@ release: all
$(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)
diff --git a/os/macosx/Makefile.setup b/os/macosx/Makefile.setup
index 252eb8b60..49da58e33 100644
--- a/os/macosx/Makefile.setup
+++ b/os/macosx/Makefile.setup
@@ -48,6 +48,9 @@ ifndef i386_OSX_TARGET
i386_OSX_TARGET:=10.4u
endif
+# 4-byte bools to make YAPF happy
+CFLAGS_PPC += -DFOUR_BYTE_BOOL
+
ifndef G5_FLAGS
G5_FLAGS := -mtune=970 -mcpu=970 -mpowerpc-gpopt
endif