os/macosx/Makefile
author bjarni
Sun, 03 Sep 2006 15:45:48 +0000
changeset 4530 1cb4289dda98
parent 4215 a2ac24745ea7
child 4582 1c4e10ba0303
permissions -rw-r--r--
(svn r6357) -Cleanup: [OSX] corrected some info for the bundle (info window in finder)
2688
067c4362dcb0 (svn r3230) -Feature: [OSX] OSX builds can now change where it searches for dynamic libs and can move libs into the bundle
bjarni
parents:
diff changeset
     1
# $Id: Makefile 3214 2005-11-17 19:43:37Z bjarni $
067c4362dcb0 (svn r3230) -Feature: [OSX] OSX builds can now change where it searches for dynamic libs and can move libs into the bundle
bjarni
parents:
diff changeset
     2
# This makefile is not a standalone makefile, but is called from the general one
067c4362dcb0 (svn r3230) -Feature: [OSX] OSX builds can now change where it searches for dynamic libs and can move libs into the bundle
bjarni
parents:
diff changeset
     3
# it contains targets specific to MacOS X
067c4362dcb0 (svn r3230) -Feature: [OSX] OSX builds can now change where it searches for dynamic libs and can move libs into the bundle
bjarni
parents:
diff changeset
     4
3901
88d50f8030ce (svn r4989) -Fix: make the OSX Makefile stuff to work with the compile-farm
truelight
parents: 3900
diff changeset
     5
ifdef MACOSX_BUILD
3211
a0f00b66cfad (svn r3882) -Codechange: [OSX] changed the way universal and tripple binaries are build
bjarni
parents: 3087
diff changeset
     6
3354
245157a5eafe (svn r4149) -Codechange: [OSX] rewrite of how universal binaries are compiled
bjarni
parents: 3318
diff changeset
     7
DEPS_MAGIC := $(shell mkdir -p $(sort $(dir $(OBJS:%.o=.OSX/%))))
3211
a0f00b66cfad (svn r3882) -Codechange: [OSX] changed the way universal and tripple binaries are build
bjarni
parents: 3087
diff changeset
     8
3354
245157a5eafe (svn r4149) -Codechange: [OSX] rewrite of how universal binaries are compiled
bjarni
parents: 3318
diff changeset
     9
ifdef OTTD_PPC
245157a5eafe (svn r4149) -Codechange: [OSX] rewrite of how universal binaries are compiled
bjarni
parents: 3318
diff changeset
    10
OTTD_PPC    :=.OSX/openttd.ppc
245157a5eafe (svn r4149) -Codechange: [OSX] rewrite of how universal binaries are compiled
bjarni
parents: 3318
diff changeset
    11
OBJS_ppc    := $(OBJS:%.o=.OSX/%.o.ppc)
3901
88d50f8030ce (svn r4989) -Fix: make the OSX Makefile stuff to work with the compile-farm
truelight
parents: 3900
diff changeset
    12
ifndef CC_PPC
88d50f8030ce (svn r4989) -Fix: make the OSX Makefile stuff to work with the compile-farm
truelight
parents: 3900
diff changeset
    13
CC_PPC      := $(CC) -arch ppc
88d50f8030ce (svn r4989) -Fix: make the OSX Makefile stuff to work with the compile-farm
truelight
parents: 3900
diff changeset
    14
endif
88d50f8030ce (svn r4989) -Fix: make the OSX Makefile stuff to work with the compile-farm
truelight
parents: 3900
diff changeset
    15
ifndef CXX_PPC
88d50f8030ce (svn r4989) -Fix: make the OSX Makefile stuff to work with the compile-farm
truelight
parents: 3900
diff changeset
    16
CXX_PPC     := $(CXX) -arch ppc
88d50f8030ce (svn r4989) -Fix: make the OSX Makefile stuff to work with the compile-farm
truelight
parents: 3900
diff changeset
    17
endif
3354
245157a5eafe (svn r4149) -Codechange: [OSX] rewrite of how universal binaries are compiled
bjarni
parents: 3318
diff changeset
    18
endif
245157a5eafe (svn r4149) -Codechange: [OSX] rewrite of how universal binaries are compiled
bjarni
parents: 3318
diff changeset
    19
245157a5eafe (svn r4149) -Codechange: [OSX] rewrite of how universal binaries are compiled
bjarni
parents: 3318
diff changeset
    20
ifdef OTTD_i386
245157a5eafe (svn r4149) -Codechange: [OSX] rewrite of how universal binaries are compiled
bjarni
parents: 3318
diff changeset
    21
OTTD_i386   :=.OSX/openttd.i386
245157a5eafe (svn r4149) -Codechange: [OSX] rewrite of how universal binaries are compiled
bjarni
parents: 3318
diff changeset
    22
OBJS_i386   := $(OBJS:%.o=.OSX/%.o.i386)
3901
88d50f8030ce (svn r4989) -Fix: make the OSX Makefile stuff to work with the compile-farm
truelight
parents: 3900
diff changeset
    23
ifndef CC_I386
88d50f8030ce (svn r4989) -Fix: make the OSX Makefile stuff to work with the compile-farm
truelight
parents: 3900
diff changeset
    24
CC_I386     := $(CC) -arch i386
88d50f8030ce (svn r4989) -Fix: make the OSX Makefile stuff to work with the compile-farm
truelight
parents: 3900
diff changeset
    25
endif
88d50f8030ce (svn r4989) -Fix: make the OSX Makefile stuff to work with the compile-farm
truelight
parents: 3900
diff changeset
    26
ifndef CXX_I386
88d50f8030ce (svn r4989) -Fix: make the OSX Makefile stuff to work with the compile-farm
truelight
parents: 3900
diff changeset
    27
CXX_I386    := $(CXX) -arch i386
88d50f8030ce (svn r4989) -Fix: make the OSX Makefile stuff to work with the compile-farm
truelight
parents: 3900
diff changeset
    28
endif
3354
245157a5eafe (svn r4149) -Codechange: [OSX] rewrite of how universal binaries are compiled
bjarni
parents: 3318
diff changeset
    29
endif
245157a5eafe (svn r4149) -Codechange: [OSX] rewrite of how universal binaries are compiled
bjarni
parents: 3318
diff changeset
    30
245157a5eafe (svn r4149) -Codechange: [OSX] rewrite of how universal binaries are compiled
bjarni
parents: 3318
diff changeset
    31
ifdef OTTD_PPC970
245157a5eafe (svn r4149) -Codechange: [OSX] rewrite of how universal binaries are compiled
bjarni
parents: 3318
diff changeset
    32
OTTD_PPC970 :=.OSX/openttd.ppc970
245157a5eafe (svn r4149) -Codechange: [OSX] rewrite of how universal binaries are compiled
bjarni
parents: 3318
diff changeset
    33
OBJS_ppc970 := $(OBJS:%.o=.OSX/%.o.ppc970)
3901
88d50f8030ce (svn r4989) -Fix: make the OSX Makefile stuff to work with the compile-farm
truelight
parents: 3900
diff changeset
    34
ifndef CC_PPC970
88d50f8030ce (svn r4989) -Fix: make the OSX Makefile stuff to work with the compile-farm
truelight
parents: 3900
diff changeset
    35
CC_PPC970   := $(CC) -arch ppc970
88d50f8030ce (svn r4989) -Fix: make the OSX Makefile stuff to work with the compile-farm
truelight
parents: 3900
diff changeset
    36
endif
88d50f8030ce (svn r4989) -Fix: make the OSX Makefile stuff to work with the compile-farm
truelight
parents: 3900
diff changeset
    37
ifndef CXX_PPC970
88d50f8030ce (svn r4989) -Fix: make the OSX Makefile stuff to work with the compile-farm
truelight
parents: 3900
diff changeset
    38
CXX_PPC970  := $(CXX) -arch ppc970
88d50f8030ce (svn r4989) -Fix: make the OSX Makefile stuff to work with the compile-farm
truelight
parents: 3900
diff changeset
    39
endif
88d50f8030ce (svn r4989) -Fix: make the OSX Makefile stuff to work with the compile-farm
truelight
parents: 3900
diff changeset
    40
endif
88d50f8030ce (svn r4989) -Fix: make the OSX Makefile stuff to work with the compile-farm
truelight
parents: 3900
diff changeset
    41
88d50f8030ce (svn r4989) -Fix: make the OSX Makefile stuff to work with the compile-farm
truelight
parents: 3900
diff changeset
    42
ifndef LIPO
88d50f8030ce (svn r4989) -Fix: make the OSX Makefile stuff to work with the compile-farm
truelight
parents: 3900
diff changeset
    43
LIPO := lipo
3354
245157a5eafe (svn r4149) -Codechange: [OSX] rewrite of how universal binaries are compiled
bjarni
parents: 3318
diff changeset
    44
endif
3907
ca5e75a55545 (svn r4997) -Fix: [OSX] reverted the OSX part of rev 4994 as it caused dyld (lib) crashes
bjarni
parents: 3906
diff changeset
    45
ifndef STRIP
ca5e75a55545 (svn r4997) -Fix: [OSX] reverted the OSX part of rev 4994 as it caused dyld (lib) crashes
bjarni
parents: 3906
diff changeset
    46
STRIP := strip
ca5e75a55545 (svn r4997) -Fix: [OSX] reverted the OSX part of rev 4994 as it caused dyld (lib) crashes
bjarni
parents: 3906
diff changeset
    47
endif
3354
245157a5eafe (svn r4149) -Codechange: [OSX] rewrite of how universal binaries are compiled
bjarni
parents: 3318
diff changeset
    48
245157a5eafe (svn r4149) -Codechange: [OSX] rewrite of how universal binaries are compiled
bjarni
parents: 3318
diff changeset
    49
# targets to link OpenTTD
245157a5eafe (svn r4149) -Codechange: [OSX] rewrite of how universal binaries are compiled
bjarni
parents: 3318
diff changeset
    50
$(TTD): $(OTTD_PPC) $(OTTD_i386) $(OTTD_PPC970)
245157a5eafe (svn r4149) -Codechange: [OSX] rewrite of how universal binaries are compiled
bjarni
parents: 3318
diff changeset
    51
	@echo '===> Linking $@ into a single file'
3901
88d50f8030ce (svn r4989) -Fix: make the OSX Makefile stuff to work with the compile-farm
truelight
parents: 3900
diff changeset
    52
	$(Q)$(LIPO) -create -output $@ $(OTTD_PPC) $(OTTD_i386) $(OTTD_PPC970)
3354
245157a5eafe (svn r4149) -Codechange: [OSX] rewrite of how universal binaries are compiled
bjarni
parents: 3318
diff changeset
    53
245157a5eafe (svn r4149) -Codechange: [OSX] rewrite of how universal binaries are compiled
bjarni
parents: 3318
diff changeset
    54
$(OTTD_PPC): $(MAKE_CONFIG) $(OBJS_ppc)
245157a5eafe (svn r4149) -Codechange: [OSX] rewrite of how universal binaries are compiled
bjarni
parents: 3318
diff changeset
    55
	@echo '[PowerPC] Linking $(TTD)'
3902
f867fe8ec825 (svn r4990) -Fix: use CXX to link MacOSX OpenTTD, not CC
truelight
parents: 3901
diff changeset
    56
	$(Q)$(CXX_PPC) $(LDFLAGS) $(TTDLDFLAGS) $(OBJS_ppc) $(LIBS) $(LDFLAGS_PPC) -o $@
3354
245157a5eafe (svn r4149) -Codechange: [OSX] rewrite of how universal binaries are compiled
bjarni
parents: 3318
diff changeset
    57
245157a5eafe (svn r4149) -Codechange: [OSX] rewrite of how universal binaries are compiled
bjarni
parents: 3318
diff changeset
    58
$(OTTD_i386): $(MAKE_CONFIG) $(OBJS_i386)
245157a5eafe (svn r4149) -Codechange: [OSX] rewrite of how universal binaries are compiled
bjarni
parents: 3318
diff changeset
    59
	@echo '[i386] Linking $(TTD)'
3902
f867fe8ec825 (svn r4990) -Fix: use CXX to link MacOSX OpenTTD, not CC
truelight
parents: 3901
diff changeset
    60
	$(Q)$(CXX_I386) $(LDFLAGS) $(TTDLDFLAGS) $(OBJS_i386) $(LIBS) $(LDFLAGS_i386) -o $@
3354
245157a5eafe (svn r4149) -Codechange: [OSX] rewrite of how universal binaries are compiled
bjarni
parents: 3318
diff changeset
    61
245157a5eafe (svn r4149) -Codechange: [OSX] rewrite of how universal binaries are compiled
bjarni
parents: 3318
diff changeset
    62
$(OTTD_PPC970): $(MAKE_CONFIG) $(OBJS_ppc970)
245157a5eafe (svn r4149) -Codechange: [OSX] rewrite of how universal binaries are compiled
bjarni
parents: 3318
diff changeset
    63
	@echo '[PowerPC G5] Linking $(TTD)'
3902
f867fe8ec825 (svn r4990) -Fix: use CXX to link MacOSX OpenTTD, not CC
truelight
parents: 3901
diff changeset
    64
	$(Q)$(CXX_PPC970) $(LDFLAGS) $(TTDLDFLAGS) $(OBJS_ppc970) $(LIBS) $(LDFLAGS_PPC) $(G5_FLAGS) -o $@
3354
245157a5eafe (svn r4149) -Codechange: [OSX] rewrite of how universal binaries are compiled
bjarni
parents: 3318
diff changeset
    65
245157a5eafe (svn r4149) -Codechange: [OSX] rewrite of how universal binaries are compiled
bjarni
parents: 3318
diff changeset
    66
# targets to compile each c, m and cpp file
245157a5eafe (svn r4149) -Codechange: [OSX] rewrite of how universal binaries are compiled
bjarni
parents: 3318
diff changeset
    67
.OSX/%.o.ppc: %.c      .deps/%.d
245157a5eafe (svn r4149) -Codechange: [OSX] rewrite of how universal binaries are compiled
bjarni
parents: 3318
diff changeset
    68
	@echo '[PowerPC] Compiling $<'
3901
88d50f8030ce (svn r4989) -Fix: make the OSX Makefile stuff to work with the compile-farm
truelight
parents: 3900
diff changeset
    69
	$(Q)$(CC_PPC) $(CFLAGS) $(CFLAGS_PPC) $(CDEFS) -c -o $@ $<
3354
245157a5eafe (svn r4149) -Codechange: [OSX] rewrite of how universal binaries are compiled
bjarni
parents: 3318
diff changeset
    70
245157a5eafe (svn r4149) -Codechange: [OSX] rewrite of how universal binaries are compiled
bjarni
parents: 3318
diff changeset
    71
.OSX/%.o.ppc: %.cpp    .deps/%.d
245157a5eafe (svn r4149) -Codechange: [OSX] rewrite of how universal binaries are compiled
bjarni
parents: 3318
diff changeset
    72
	@echo '[PowerPC] Compiling $<'
3901
88d50f8030ce (svn r4989) -Fix: make the OSX Makefile stuff to work with the compile-farm
truelight
parents: 3900
diff changeset
    73
	$(Q)$(CXX_PPC) $(CFLAGS) $(CFLAGS_PPC) $(CDEFS) -c -o $@ $<
3354
245157a5eafe (svn r4149) -Codechange: [OSX] rewrite of how universal binaries are compiled
bjarni
parents: 3318
diff changeset
    74
245157a5eafe (svn r4149) -Codechange: [OSX] rewrite of how universal binaries are compiled
bjarni
parents: 3318
diff changeset
    75
.OSX/%.o.ppc: %.m      .deps/%.d
245157a5eafe (svn r4149) -Codechange: [OSX] rewrite of how universal binaries are compiled
bjarni
parents: 3318
diff changeset
    76
	@echo '[PowerPC] Compiling $<'
3901
88d50f8030ce (svn r4989) -Fix: make the OSX Makefile stuff to work with the compile-farm
truelight
parents: 3900
diff changeset
    77
	$(Q)$(CC_PPC) $(CFLAGS) $(CFLAGS_PPC) $(CDEFS) -c -o $@ $<
3354
245157a5eafe (svn r4149) -Codechange: [OSX] rewrite of how universal binaries are compiled
bjarni
parents: 3318
diff changeset
    78
245157a5eafe (svn r4149) -Codechange: [OSX] rewrite of how universal binaries are compiled
bjarni
parents: 3318
diff changeset
    79
.OSX/%.o.i386: %.c     .deps/%.d
245157a5eafe (svn r4149) -Codechange: [OSX] rewrite of how universal binaries are compiled
bjarni
parents: 3318
diff changeset
    80
	@echo '[i386] Compiling $<'
3901
88d50f8030ce (svn r4989) -Fix: make the OSX Makefile stuff to work with the compile-farm
truelight
parents: 3900
diff changeset
    81
	$(Q)$(CC_I386) $(CFLAGS) $(CFLAGS_i386) $(CDEFS) -c -o $@ $<
3354
245157a5eafe (svn r4149) -Codechange: [OSX] rewrite of how universal binaries are compiled
bjarni
parents: 3318
diff changeset
    82
245157a5eafe (svn r4149) -Codechange: [OSX] rewrite of how universal binaries are compiled
bjarni
parents: 3318
diff changeset
    83
.OSX/%.o.i386: %.cpp   .deps/%.d
245157a5eafe (svn r4149) -Codechange: [OSX] rewrite of how universal binaries are compiled
bjarni
parents: 3318
diff changeset
    84
	@echo '[i386] Compiling $<'
3901
88d50f8030ce (svn r4989) -Fix: make the OSX Makefile stuff to work with the compile-farm
truelight
parents: 3900
diff changeset
    85
	$(Q)$(CXX_I386) $(CFLAGS) $(CFLAGS_i386) $(CDEFS) -c -o $@ $<
3354
245157a5eafe (svn r4149) -Codechange: [OSX] rewrite of how universal binaries are compiled
bjarni
parents: 3318
diff changeset
    86
245157a5eafe (svn r4149) -Codechange: [OSX] rewrite of how universal binaries are compiled
bjarni
parents: 3318
diff changeset
    87
.OSX/%.o.i386: %.m     .deps/%.d
245157a5eafe (svn r4149) -Codechange: [OSX] rewrite of how universal binaries are compiled
bjarni
parents: 3318
diff changeset
    88
	@echo '[i386] Compiling $<'
3901
88d50f8030ce (svn r4989) -Fix: make the OSX Makefile stuff to work with the compile-farm
truelight
parents: 3900
diff changeset
    89
	$(Q)$(CC_I386) $(CFLAGS) $(CFLAGS_i386) $(CDEFS) -c -o $@ $<
3354
245157a5eafe (svn r4149) -Codechange: [OSX] rewrite of how universal binaries are compiled
bjarni
parents: 3318
diff changeset
    90
245157a5eafe (svn r4149) -Codechange: [OSX] rewrite of how universal binaries are compiled
bjarni
parents: 3318
diff changeset
    91
.OSX/%.o.ppc970: %.c   .deps/%.d
245157a5eafe (svn r4149) -Codechange: [OSX] rewrite of how universal binaries are compiled
bjarni
parents: 3318
diff changeset
    92
	@echo '[PowerPC G5] Compiling $<'
3901
88d50f8030ce (svn r4989) -Fix: make the OSX Makefile stuff to work with the compile-farm
truelight
parents: 3900
diff changeset
    93
	$(Q)$(CC_PPC970) $(CFLAGS) $(CFLAGS_PPC) $(G5_FLAGS) $(CDEFS) -c -o $@ $<
3354
245157a5eafe (svn r4149) -Codechange: [OSX] rewrite of how universal binaries are compiled
bjarni
parents: 3318
diff changeset
    94
245157a5eafe (svn r4149) -Codechange: [OSX] rewrite of how universal binaries are compiled
bjarni
parents: 3318
diff changeset
    95
.OSX/%.o.ppc970: %.cpp .deps/%.d
245157a5eafe (svn r4149) -Codechange: [OSX] rewrite of how universal binaries are compiled
bjarni
parents: 3318
diff changeset
    96
	@echo '[PowerPC G5] Compiling $<'
3901
88d50f8030ce (svn r4989) -Fix: make the OSX Makefile stuff to work with the compile-farm
truelight
parents: 3900
diff changeset
    97
	$(Q)$(CXX_PPC970) $(CFLAGS) $(CFLAGS_PPC) $(G5_FLAGS) $(CDEFS) -c -o $@ $<
3354
245157a5eafe (svn r4149) -Codechange: [OSX] rewrite of how universal binaries are compiled
bjarni
parents: 3318
diff changeset
    98
245157a5eafe (svn r4149) -Codechange: [OSX] rewrite of how universal binaries are compiled
bjarni
parents: 3318
diff changeset
    99
.OSX/%.o.ppc970: %.m   .deps/%.d
245157a5eafe (svn r4149) -Codechange: [OSX] rewrite of how universal binaries are compiled
bjarni
parents: 3318
diff changeset
   100
	@echo '[PowerPC G5] Compiling $<'
3901
88d50f8030ce (svn r4989) -Fix: make the OSX Makefile stuff to work with the compile-farm
truelight
parents: 3900
diff changeset
   101
	$(Q)$(CC_PPC970) $(CFLAGS) $(CFLAGS_PPC) $(G5_FLAGS) $(CDEFS) -c -o $@ $<
3354
245157a5eafe (svn r4149) -Codechange: [OSX] rewrite of how universal binaries are compiled
bjarni
parents: 3318
diff changeset
   102
2713
9c42385e4f41 (svn r3258) -Feature: [OSX] added support for universal binaries
bjarni
parents: 2712
diff changeset
   103
endif
9c42385e4f41 (svn r3258) -Feature: [OSX] added support for universal binaries
bjarni
parents: 2712
diff changeset
   104
3907
ca5e75a55545 (svn r4997) -Fix: [OSX] reverted the OSX part of rev 4994 as it caused dyld (lib) crashes
bjarni
parents: 3906
diff changeset
   105
# manual strip, as the -s option fails
ca5e75a55545 (svn r4997) -Fix: [OSX] reverted the OSX part of rev 4994 as it caused dyld (lib) crashes
bjarni
parents: 3906
diff changeset
   106
$(OSX_STRIP): $(TTD)
ca5e75a55545 (svn r4997) -Fix: [OSX] reverted the OSX part of rev 4994 as it caused dyld (lib) crashes
bjarni
parents: 3906
diff changeset
   107
	$(Q)$(STRIP) openttd
ca5e75a55545 (svn r4997) -Fix: [OSX] reverted the OSX part of rev 4994 as it caused dyld (lib) crashes
bjarni
parents: 3906
diff changeset
   108
3303
9e18c441e9b2 (svn r4060) -Codechange: [OSX] made the release target (in os/macosx/Makefile) easier to use since it gives the release disk image the right name automatically
bjarni
parents: 3212
diff changeset
   109
ifdef JAGUAR
9e18c441e9b2 (svn r4060) -Codechange: [OSX] made the release target (in os/macosx/Makefile) easier to use since it gives the release disk image the right name automatically
bjarni
parents: 3212
diff changeset
   110
JAGUAR_POSTFIX := -jaguar
9e18c441e9b2 (svn r4060) -Codechange: [OSX] made the release target (in os/macosx/Makefile) easier to use since it gives the release disk image the right name automatically
bjarni
parents: 3212
diff changeset
   111
endif
9e18c441e9b2 (svn r4060) -Codechange: [OSX] made the release target (in os/macosx/Makefile) easier to use since it gives the release disk image the right name automatically
bjarni
parents: 3212
diff changeset
   112
2688
067c4362dcb0 (svn r3230) -Feature: [OSX] OSX builds can now change where it searches for dynamic libs and can move libs into the bundle
bjarni
parents:
diff changeset
   113
# build the bundle. OSX wants to keep apps in bundles, so we will give it one
067c4362dcb0 (svn r3230) -Feature: [OSX] OSX builds can now change where it searches for dynamic libs and can move libs into the bundle
bjarni
parents:
diff changeset
   114
# 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
2713
9c42385e4f41 (svn r3258) -Feature: [OSX] added support for universal binaries
bjarni
parents: 2712
diff changeset
   115
3907
ca5e75a55545 (svn r4997) -Fix: [OSX] reverted the OSX part of rev 4994 as it caused dyld (lib) crashes
bjarni
parents: 3906
diff changeset
   116
BUILD_OSX_BUNDLE: $(TTD) $(OSX_STRIP)
2722
d2ab10ffc5e7 (svn r3267) -Codechange: [OSX] universal binary makefile code cleanup
bjarni
parents: 2717
diff changeset
   117
	@echo '===> Building application bundle'
2688
067c4362dcb0 (svn r3230) -Feature: [OSX] OSX builds can now change where it searches for dynamic libs and can move libs into the bundle
bjarni
parents:
diff changeset
   118
	$(Q)rm -fr "$(OSXAPP)"
067c4362dcb0 (svn r3230) -Feature: [OSX] OSX builds can now change where it searches for dynamic libs and can move libs into the bundle
bjarni
parents:
diff changeset
   119
	$(Q)mkdir -p "$(OSXAPP)"/Contents/MacOS
067c4362dcb0 (svn r3230) -Feature: [OSX] OSX builds can now change where it searches for dynamic libs and can move libs into the bundle
bjarni
parents:
diff changeset
   120
	$(Q)mkdir -p "$(OSXAPP)"/Contents/Resources
067c4362dcb0 (svn r3230) -Feature: [OSX] OSX builds can now change where it searches for dynamic libs and can move libs into the bundle
bjarni
parents:
diff changeset
   121
	$(Q)mkdir -p "$(OSXAPP)"/Contents/Data
067c4362dcb0 (svn r3230) -Feature: [OSX] OSX builds can now change where it searches for dynamic libs and can move libs into the bundle
bjarni
parents:
diff changeset
   122
	$(Q)mkdir -p "$(OSXAPP)"/Contents/Lang
067c4362dcb0 (svn r3230) -Feature: [OSX] OSX builds can now change where it searches for dynamic libs and can move libs into the bundle
bjarni
parents:
diff changeset
   123
	$(Q)echo "APPL????" > "$(OSXAPP)"/Contents/PkgInfo
067c4362dcb0 (svn r3230) -Feature: [OSX] OSX builds can now change where it searches for dynamic libs and can move libs into the bundle
bjarni
parents:
diff changeset
   124
	$(Q)cp os/macosx/openttd.icns "$(OSXAPP)"/Contents/Resources/openttd.icns
067c4362dcb0 (svn r3230) -Feature: [OSX] OSX builds can now change where it searches for dynamic libs and can move libs into the bundle
bjarni
parents:
diff changeset
   125
	$(Q)os/macosx/plistgen.sh "$(OSXAPP)" "$(REV)"
4215
a2ac24745ea7 (svn r5759) -Fix: [OSX] fixed issue where the bundle was not build if the data dir contained subdirs (now copies the subdirs as well)
bjarni
parents: 4104
diff changeset
   126
	$(Q)cp -R data/* "$(OSXAPP)"/Contents/Data/
2736
3d6487cbbb69 (svn r3281) -Feature: [OSX] added native cocoa sound and video drivers (egladil)
bjarni
parents: 2731
diff changeset
   127
	$(Q)cp os/macosx/splash.png "$(OSXAPP)"/Contents/Data/
2688
067c4362dcb0 (svn r3230) -Feature: [OSX] OSX builds can now change where it searches for dynamic libs and can move libs into the bundle
bjarni
parents:
diff changeset
   128
	$(Q)cp lang/*.lng "$(OSXAPP)"/Contents/Lang/
067c4362dcb0 (svn r3230) -Feature: [OSX] OSX builds can now change where it searches for dynamic libs and can move libs into the bundle
bjarni
parents:
diff changeset
   129
	$(Q)cp $(TTD) "$(OSXAPP)"/Contents/MacOS/$(TTD)
067c4362dcb0 (svn r3230) -Feature: [OSX] OSX builds can now change where it searches for dynamic libs and can move libs into the bundle
bjarni
parents:
diff changeset
   130
067c4362dcb0 (svn r3230) -Feature: [OSX] OSX builds can now change where it searches for dynamic libs and can move libs into the bundle
bjarni
parents:
diff changeset
   131
# make the release disk image. Should only be used with releases and is a good and fast way to make sure to remember all the needed files
067c4362dcb0 (svn r3230) -Feature: [OSX] OSX builds can now change where it searches for dynamic libs and can move libs into the bundle
bjarni
parents:
diff changeset
   132
release: all
3303
9e18c441e9b2 (svn r4060) -Codechange: [OSX] made the release target (in os/macosx/Makefile) easier to use since it gives the release disk image the right name automatically
bjarni
parents: 3212
diff changeset
   133
	@echo '===> Building release disk image'
9e18c441e9b2 (svn r4060) -Codechange: [OSX] made the release target (in os/macosx/Makefile) easier to use since it gives the release disk image the right name automatically
bjarni
parents: 3212
diff changeset
   134
	$(Q)mkdir -p "OpenTTD $(REV)"
9e18c441e9b2 (svn r4060) -Codechange: [OSX] made the release target (in os/macosx/Makefile) easier to use since it gives the release disk image the right name automatically
bjarni
parents: 3212
diff changeset
   135
	$(Q)mkdir -p "OpenTTD $(REV)/docs"
9e18c441e9b2 (svn r4060) -Codechange: [OSX] made the release target (in os/macosx/Makefile) easier to use since it gives the release disk image the right name automatically
bjarni
parents: 3212
diff changeset
   136
	$(Q)mkdir -p "OpenTTD $(REV)/scenario"
9e18c441e9b2 (svn r4060) -Codechange: [OSX] made the release target (in os/macosx/Makefile) easier to use since it gives the release disk image the right name automatically
bjarni
parents: 3212
diff changeset
   137
	$(Q)cp -R $(OSXAPP) "OpenTTD $(REV)/"
9e18c441e9b2 (svn r4060) -Codechange: [OSX] made the release target (in os/macosx/Makefile) easier to use since it gives the release disk image the right name automatically
bjarni
parents: 3212
diff changeset
   138
	$(Q)cp docs/OSX_install_instructions.txt "OpenTTD $(REV)/How to install (please read).txt"
3318
15ec70e8e6cb (svn r4084) -Documentation: [OSX] changed OSX specific docs
bjarni
parents: 3304
diff changeset
   139
	$(Q)cp docs/OSX_why_multiple_applications.txt "OpenTTD $(REV)/why a special Jaguar download.txt"
3303
9e18c441e9b2 (svn r4060) -Codechange: [OSX] made the release target (in os/macosx/Makefile) easier to use since it gives the release disk image the right name automatically
bjarni
parents: 3212
diff changeset
   140
	$(Q)cp readme.txt "OpenTTD $(REV)/docs/"
9e18c441e9b2 (svn r4060) -Codechange: [OSX] made the release target (in os/macosx/Makefile) easier to use since it gives the release disk image the right name automatically
bjarni
parents: 3212
diff changeset
   141
	$(Q)cp docs/console.txt "OpenTTD $(REV)/docs/"
9e18c441e9b2 (svn r4060) -Codechange: [OSX] made the release target (in os/macosx/Makefile) easier to use since it gives the release disk image the right name automatically
bjarni
parents: 3212
diff changeset
   142
	$(Q)cp COPYING "OpenTTD $(REV)/docs/"
9e18c441e9b2 (svn r4060) -Codechange: [OSX] made the release target (in os/macosx/Makefile) easier to use since it gives the release disk image the right name automatically
bjarni
parents: 3212
diff changeset
   143
	$(Q)cp changelog.txt "OpenTTD $(REV)/docs/"
9e18c441e9b2 (svn r4060) -Codechange: [OSX] made the release target (in os/macosx/Makefile) easier to use since it gives the release disk image the right name automatically
bjarni
parents: 3212
diff changeset
   144
	$(Q)cp os/macosx/*.webloc "OpenTTD $(REV)"
9e18c441e9b2 (svn r4060) -Codechange: [OSX] made the release target (in os/macosx/Makefile) easier to use since it gives the release disk image the right name automatically
bjarni
parents: 3212
diff changeset
   145
	$(Q)cp known-bugs.txt "OpenTTD $(REV)/known-bugs.txt"
4215
a2ac24745ea7 (svn r5759) -Fix: [OSX] fixed issue where the bundle was not build if the data dir contained subdirs (now copies the subdirs as well)
bjarni
parents: 4104
diff changeset
   146
	$(Q)cp -R scenario/* "OpenTTD $(REV)/scenario/"
3304
4b396d9a06d1 (svn r4061) -Codechange: [OSX] removed some long dead flags for universal binary building and removed an absolute path for hdiutil (I don't thin anybody will have it at a non-default place, but still)
bjarni
parents: 3303
diff changeset
   147
	$(Q)hdiutil create -ov -format UDZO -srcfolder "OpenTTD $(REV)" openttd-"$(REV)"-osx"$(JAGUAR_POSTFIX)".dmg
3303
9e18c441e9b2 (svn r4060) -Codechange: [OSX] made the release target (in os/macosx/Makefile) easier to use since it gives the release disk image the right name automatically
bjarni
parents: 3212
diff changeset
   148
	$(Q)rm -fr "OpenTTD $(REV)"
2688
067c4362dcb0 (svn r3230) -Feature: [OSX] OSX builds can now change where it searches for dynamic libs and can move libs into the bundle
bjarni
parents:
diff changeset
   149
3907
ca5e75a55545 (svn r4997) -Fix: [OSX] reverted the OSX part of rev 4994 as it caused dyld (lib) crashes
bjarni
parents: 3906
diff changeset
   150
$(OSX): $(TTD) $(OSX_STRIP) BUILD_OSX_BUNDLE
2688
067c4362dcb0 (svn r3230) -Feature: [OSX] OSX builds can now change where it searches for dynamic libs and can move libs into the bundle
bjarni
parents:
diff changeset
   151
4104
f74fa737ef71 (svn r5438) -Code cleanup [OSX] removed UNIVERSAL_BINARY as a phony target since the target is long gone. Also corrected BUILD_OSX_BUNDLE as phony target
bjarni
parents: 3907
diff changeset
   152
.PHONY: release BUILD_OSX_BUNDLE