os/macosx/Makefile
author bjarni
Fri, 29 Dec 2006 21:46:21 +0000
changeset 5674 ae82af6ccd26
parent 5586 aa39ed5e2247
permissions -rw-r--r--
(svn r7626) -Fix r7600: [OSX] building release dmg files no longer includes console.txt, since we don't have that file anymore (this made dmg building fail)
-Cleanup: [OSX] removed the link files since they aren't needed and broken anyway
2688
ef9861cdd745 (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 $
ef9861cdd745 (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
ef9861cdd745 (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
ef9861cdd745 (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
5f173c71d053 (svn r4989) -Fix: make the OSX Makefile stuff to work with the compile-farm
truelight
parents: 3900
diff changeset
     5
ifdef MACOSX_BUILD
3211
044f84240f65 (svn r3882) -Codechange: [OSX] changed the way universal and tripple binaries are build
bjarni
parents: 3087
diff changeset
     6
3354
88222b8dafef (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
044f84240f65 (svn r3882) -Codechange: [OSX] changed the way universal and tripple binaries are build
bjarni
parents: 3087
diff changeset
     8
3354
88222b8dafef (svn r4149) -Codechange: [OSX] rewrite of how universal binaries are compiled
bjarni
parents: 3318
diff changeset
     9
ifdef OTTD_PPC
88222b8dafef (svn r4149) -Codechange: [OSX] rewrite of how universal binaries are compiled
bjarni
parents: 3318
diff changeset
    10
OTTD_PPC    :=.OSX/openttd.ppc
88222b8dafef (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
5f173c71d053 (svn r4989) -Fix: make the OSX Makefile stuff to work with the compile-farm
truelight
parents: 3900
diff changeset
    12
ifndef CC_PPC
5f173c71d053 (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
5f173c71d053 (svn r4989) -Fix: make the OSX Makefile stuff to work with the compile-farm
truelight
parents: 3900
diff changeset
    14
endif
5f173c71d053 (svn r4989) -Fix: make the OSX Makefile stuff to work with the compile-farm
truelight
parents: 3900
diff changeset
    15
ifndef CXX_PPC
5f173c71d053 (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
5f173c71d053 (svn r4989) -Fix: make the OSX Makefile stuff to work with the compile-farm
truelight
parents: 3900
diff changeset
    17
endif
3354
88222b8dafef (svn r4149) -Codechange: [OSX] rewrite of how universal binaries are compiled
bjarni
parents: 3318
diff changeset
    18
endif
88222b8dafef (svn r4149) -Codechange: [OSX] rewrite of how universal binaries are compiled
bjarni
parents: 3318
diff changeset
    19
88222b8dafef (svn r4149) -Codechange: [OSX] rewrite of how universal binaries are compiled
bjarni
parents: 3318
diff changeset
    20
ifdef OTTD_i386
88222b8dafef (svn r4149) -Codechange: [OSX] rewrite of how universal binaries are compiled
bjarni
parents: 3318
diff changeset
    21
OTTD_i386   :=.OSX/openttd.i386
88222b8dafef (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
5f173c71d053 (svn r4989) -Fix: make the OSX Makefile stuff to work with the compile-farm
truelight
parents: 3900
diff changeset
    23
ifndef CC_I386
5f173c71d053 (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
5f173c71d053 (svn r4989) -Fix: make the OSX Makefile stuff to work with the compile-farm
truelight
parents: 3900
diff changeset
    25
endif
5f173c71d053 (svn r4989) -Fix: make the OSX Makefile stuff to work with the compile-farm
truelight
parents: 3900
diff changeset
    26
ifndef CXX_I386
5f173c71d053 (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
5f173c71d053 (svn r4989) -Fix: make the OSX Makefile stuff to work with the compile-farm
truelight
parents: 3900
diff changeset
    28
endif
3354
88222b8dafef (svn r4149) -Codechange: [OSX] rewrite of how universal binaries are compiled
bjarni
parents: 3318
diff changeset
    29
endif
88222b8dafef (svn r4149) -Codechange: [OSX] rewrite of how universal binaries are compiled
bjarni
parents: 3318
diff changeset
    30
88222b8dafef (svn r4149) -Codechange: [OSX] rewrite of how universal binaries are compiled
bjarni
parents: 3318
diff changeset
    31
ifdef OTTD_PPC970
88222b8dafef (svn r4149) -Codechange: [OSX] rewrite of how universal binaries are compiled
bjarni
parents: 3318
diff changeset
    32
OTTD_PPC970 :=.OSX/openttd.ppc970
88222b8dafef (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
5f173c71d053 (svn r4989) -Fix: make the OSX Makefile stuff to work with the compile-farm
truelight
parents: 3900
diff changeset
    34
ifndef CC_PPC970
5f173c71d053 (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
5f173c71d053 (svn r4989) -Fix: make the OSX Makefile stuff to work with the compile-farm
truelight
parents: 3900
diff changeset
    36
endif
5f173c71d053 (svn r4989) -Fix: make the OSX Makefile stuff to work with the compile-farm
truelight
parents: 3900
diff changeset
    37
ifndef CXX_PPC970
5f173c71d053 (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
5f173c71d053 (svn r4989) -Fix: make the OSX Makefile stuff to work with the compile-farm
truelight
parents: 3900
diff changeset
    39
endif
5f173c71d053 (svn r4989) -Fix: make the OSX Makefile stuff to work with the compile-farm
truelight
parents: 3900
diff changeset
    40
endif
5f173c71d053 (svn r4989) -Fix: make the OSX Makefile stuff to work with the compile-farm
truelight
parents: 3900
diff changeset
    41
5f173c71d053 (svn r4989) -Fix: make the OSX Makefile stuff to work with the compile-farm
truelight
parents: 3900
diff changeset
    42
ifndef LIPO
5f173c71d053 (svn r4989) -Fix: make the OSX Makefile stuff to work with the compile-farm
truelight
parents: 3900
diff changeset
    43
LIPO := lipo
3354
88222b8dafef (svn r4149) -Codechange: [OSX] rewrite of how universal binaries are compiled
bjarni
parents: 3318
diff changeset
    44
endif
3907
61074b916295 (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
61074b916295 (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
61074b916295 (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
88222b8dafef (svn r4149) -Codechange: [OSX] rewrite of how universal binaries are compiled
bjarni
parents: 3318
diff changeset
    48
88222b8dafef (svn r4149) -Codechange: [OSX] rewrite of how universal binaries are compiled
bjarni
parents: 3318
diff changeset
    49
# targets to link OpenTTD
88222b8dafef (svn r4149) -Codechange: [OSX] rewrite of how universal binaries are compiled
bjarni
parents: 3318
diff changeset
    50
$(TTD): $(OTTD_PPC) $(OTTD_i386) $(OTTD_PPC970)
88222b8dafef (svn r4149) -Codechange: [OSX] rewrite of how universal binaries are compiled
bjarni
parents: 3318
diff changeset
    51
	@echo '===> Linking $@ into a single file'
3901
5f173c71d053 (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
88222b8dafef (svn r4149) -Codechange: [OSX] rewrite of how universal binaries are compiled
bjarni
parents: 3318
diff changeset
    53
88222b8dafef (svn r4149) -Codechange: [OSX] rewrite of how universal binaries are compiled
bjarni
parents: 3318
diff changeset
    54
$(OTTD_PPC): $(MAKE_CONFIG) $(OBJS_ppc)
88222b8dafef (svn r4149) -Codechange: [OSX] rewrite of how universal binaries are compiled
bjarni
parents: 3318
diff changeset
    55
	@echo '[PowerPC] Linking $(TTD)'
3902
a86bb5e6e334 (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
88222b8dafef (svn r4149) -Codechange: [OSX] rewrite of how universal binaries are compiled
bjarni
parents: 3318
diff changeset
    57
88222b8dafef (svn r4149) -Codechange: [OSX] rewrite of how universal binaries are compiled
bjarni
parents: 3318
diff changeset
    58
$(OTTD_i386): $(MAKE_CONFIG) $(OBJS_i386)
88222b8dafef (svn r4149) -Codechange: [OSX] rewrite of how universal binaries are compiled
bjarni
parents: 3318
diff changeset
    59
	@echo '[i386] Linking $(TTD)'
3902
a86bb5e6e334 (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
88222b8dafef (svn r4149) -Codechange: [OSX] rewrite of how universal binaries are compiled
bjarni
parents: 3318
diff changeset
    61
88222b8dafef (svn r4149) -Codechange: [OSX] rewrite of how universal binaries are compiled
bjarni
parents: 3318
diff changeset
    62
$(OTTD_PPC970): $(MAKE_CONFIG) $(OBJS_ppc970)
88222b8dafef (svn r4149) -Codechange: [OSX] rewrite of how universal binaries are compiled
bjarni
parents: 3318
diff changeset
    63
	@echo '[PowerPC G5] Linking $(TTD)'
3902
a86bb5e6e334 (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
88222b8dafef (svn r4149) -Codechange: [OSX] rewrite of how universal binaries are compiled
bjarni
parents: 3318
diff changeset
    65
88222b8dafef (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
88222b8dafef (svn r4149) -Codechange: [OSX] rewrite of how universal binaries are compiled
bjarni
parents: 3318
diff changeset
    67
.OSX/%.o.ppc: %.c      .deps/%.d
88222b8dafef (svn r4149) -Codechange: [OSX] rewrite of how universal binaries are compiled
bjarni
parents: 3318
diff changeset
    68
	@echo '[PowerPC] Compiling $<'
4582
22baea97e866 (svn r6432) -Fix r4987: [OSX] added CCFLAGS to OSX targets as well
bjarni
parents: 4215
diff changeset
    69
	$(Q)$(CC_PPC) $(CC_CFLAGS) $(CFLAGS) $(CFLAGS_PPC) $(CDEFS) -c -o $@ $<
3354
88222b8dafef (svn r4149) -Codechange: [OSX] rewrite of how universal binaries are compiled
bjarni
parents: 3318
diff changeset
    70
88222b8dafef (svn r4149) -Codechange: [OSX] rewrite of how universal binaries are compiled
bjarni
parents: 3318
diff changeset
    71
.OSX/%.o.ppc: %.cpp    .deps/%.d
88222b8dafef (svn r4149) -Codechange: [OSX] rewrite of how universal binaries are compiled
bjarni
parents: 3318
diff changeset
    72
	@echo '[PowerPC] Compiling $<'
3901
5f173c71d053 (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
88222b8dafef (svn r4149) -Codechange: [OSX] rewrite of how universal binaries are compiled
bjarni
parents: 3318
diff changeset
    74
88222b8dafef (svn r4149) -Codechange: [OSX] rewrite of how universal binaries are compiled
bjarni
parents: 3318
diff changeset
    75
.OSX/%.o.ppc: %.m      .deps/%.d
88222b8dafef (svn r4149) -Codechange: [OSX] rewrite of how universal binaries are compiled
bjarni
parents: 3318
diff changeset
    76
	@echo '[PowerPC] Compiling $<'
4582
22baea97e866 (svn r6432) -Fix r4987: [OSX] added CCFLAGS to OSX targets as well
bjarni
parents: 4215
diff changeset
    77
	$(Q)$(CC_PPC) $(CC_CFLAGS) $(CFLAGS) $(CFLAGS_PPC) $(CDEFS) -c -o $@ $<
3354
88222b8dafef (svn r4149) -Codechange: [OSX] rewrite of how universal binaries are compiled
bjarni
parents: 3318
diff changeset
    78
88222b8dafef (svn r4149) -Codechange: [OSX] rewrite of how universal binaries are compiled
bjarni
parents: 3318
diff changeset
    79
.OSX/%.o.i386: %.c     .deps/%.d
88222b8dafef (svn r4149) -Codechange: [OSX] rewrite of how universal binaries are compiled
bjarni
parents: 3318
diff changeset
    80
	@echo '[i386] Compiling $<'
4582
22baea97e866 (svn r6432) -Fix r4987: [OSX] added CCFLAGS to OSX targets as well
bjarni
parents: 4215
diff changeset
    81
	$(Q)$(CC_I386) $(CC_CFLAGS) $(CFLAGS) $(CFLAGS_i386) $(CDEFS) -c -o $@ $<
3354
88222b8dafef (svn r4149) -Codechange: [OSX] rewrite of how universal binaries are compiled
bjarni
parents: 3318
diff changeset
    82
88222b8dafef (svn r4149) -Codechange: [OSX] rewrite of how universal binaries are compiled
bjarni
parents: 3318
diff changeset
    83
.OSX/%.o.i386: %.cpp   .deps/%.d
88222b8dafef (svn r4149) -Codechange: [OSX] rewrite of how universal binaries are compiled
bjarni
parents: 3318
diff changeset
    84
	@echo '[i386] Compiling $<'
3901
5f173c71d053 (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
88222b8dafef (svn r4149) -Codechange: [OSX] rewrite of how universal binaries are compiled
bjarni
parents: 3318
diff changeset
    86
88222b8dafef (svn r4149) -Codechange: [OSX] rewrite of how universal binaries are compiled
bjarni
parents: 3318
diff changeset
    87
.OSX/%.o.i386: %.m     .deps/%.d
88222b8dafef (svn r4149) -Codechange: [OSX] rewrite of how universal binaries are compiled
bjarni
parents: 3318
diff changeset
    88
	@echo '[i386] Compiling $<'
4582
22baea97e866 (svn r6432) -Fix r4987: [OSX] added CCFLAGS to OSX targets as well
bjarni
parents: 4215
diff changeset
    89
	$(Q)$(CC_I386) $(CC_CFLAGS) $(CFLAGS) $(CFLAGS_i386) $(CDEFS) -c -o $@ $<
3354
88222b8dafef (svn r4149) -Codechange: [OSX] rewrite of how universal binaries are compiled
bjarni
parents: 3318
diff changeset
    90
88222b8dafef (svn r4149) -Codechange: [OSX] rewrite of how universal binaries are compiled
bjarni
parents: 3318
diff changeset
    91
.OSX/%.o.ppc970: %.c   .deps/%.d
88222b8dafef (svn r4149) -Codechange: [OSX] rewrite of how universal binaries are compiled
bjarni
parents: 3318
diff changeset
    92
	@echo '[PowerPC G5] Compiling $<'
4582
22baea97e866 (svn r6432) -Fix r4987: [OSX] added CCFLAGS to OSX targets as well
bjarni
parents: 4215
diff changeset
    93
	$(Q)$(CC_PPC970) $(CC_CFLAGS) $(CFLAGS) $(CFLAGS_PPC) $(G5_FLAGS) $(CDEFS) -c -o $@ $<
3354
88222b8dafef (svn r4149) -Codechange: [OSX] rewrite of how universal binaries are compiled
bjarni
parents: 3318
diff changeset
    94
88222b8dafef (svn r4149) -Codechange: [OSX] rewrite of how universal binaries are compiled
bjarni
parents: 3318
diff changeset
    95
.OSX/%.o.ppc970: %.cpp .deps/%.d
88222b8dafef (svn r4149) -Codechange: [OSX] rewrite of how universal binaries are compiled
bjarni
parents: 3318
diff changeset
    96
	@echo '[PowerPC G5] Compiling $<'
3901
5f173c71d053 (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
88222b8dafef (svn r4149) -Codechange: [OSX] rewrite of how universal binaries are compiled
bjarni
parents: 3318
diff changeset
    98
88222b8dafef (svn r4149) -Codechange: [OSX] rewrite of how universal binaries are compiled
bjarni
parents: 3318
diff changeset
    99
.OSX/%.o.ppc970: %.m   .deps/%.d
88222b8dafef (svn r4149) -Codechange: [OSX] rewrite of how universal binaries are compiled
bjarni
parents: 3318
diff changeset
   100
	@echo '[PowerPC G5] Compiling $<'
4582
22baea97e866 (svn r6432) -Fix r4987: [OSX] added CCFLAGS to OSX targets as well
bjarni
parents: 4215
diff changeset
   101
	$(Q)$(CC_PPC970) $(CC_CFLAGS) $(CFLAGS) $(CFLAGS_PPC) $(G5_FLAGS) $(CDEFS) -c -o $@ $<
3354
88222b8dafef (svn r4149) -Codechange: [OSX] rewrite of how universal binaries are compiled
bjarni
parents: 3318
diff changeset
   102
2713
9f06e1f94ce9 (svn r3258) -Feature: [OSX] added support for universal binaries
bjarni
parents: 2712
diff changeset
   103
endif
9f06e1f94ce9 (svn r3258) -Feature: [OSX] added support for universal binaries
bjarni
parents: 2712
diff changeset
   104
3907
61074b916295 (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
61074b916295 (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)
61074b916295 (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
61074b916295 (svn r4997) -Fix: [OSX] reverted the OSX part of rev 4994 as it caused dyld (lib) crashes
bjarni
parents: 3906
diff changeset
   108
3303
b0c382927186 (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
2688
ef9861cdd745 (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
   110
# build the bundle. OSX wants to keep apps in bundles, so we will give it one
ef9861cdd745 (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
   111
# 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
9f06e1f94ce9 (svn r3258) -Feature: [OSX] added support for universal binaries
bjarni
parents: 2712
diff changeset
   112
3907
61074b916295 (svn r4997) -Fix: [OSX] reverted the OSX part of rev 4994 as it caused dyld (lib) crashes
bjarni
parents: 3906
diff changeset
   113
BUILD_OSX_BUNDLE: $(TTD) $(OSX_STRIP)
2722
dcbf94a5ad1a (svn r3267) -Codechange: [OSX] universal binary makefile code cleanup
bjarni
parents: 2717
diff changeset
   114
	@echo '===> Building application bundle'
2688
ef9861cdd745 (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
   115
	$(Q)rm -fr "$(OSXAPP)"
ef9861cdd745 (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
   116
	$(Q)mkdir -p "$(OSXAPP)"/Contents/MacOS
ef9861cdd745 (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
   117
	$(Q)mkdir -p "$(OSXAPP)"/Contents/Resources
ef9861cdd745 (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)mkdir -p "$(OSXAPP)"/Contents/Data
ef9861cdd745 (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/Lang
ef9861cdd745 (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)echo "APPL????" > "$(OSXAPP)"/Contents/PkgInfo
ef9861cdd745 (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)cp os/macosx/openttd.icns "$(OSXAPP)"/Contents/Resources/openttd.icns
ef9861cdd745 (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)os/macosx/plistgen.sh "$(OSXAPP)" "$(REV)"
4215
64ceec5b5f82 (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
   123
	$(Q)cp -R data/* "$(OSXAPP)"/Contents/Data/
2736
1ea068235989 (svn r3281) -Feature: [OSX] added native cocoa sound and video drivers (egladil)
bjarni
parents: 2731
diff changeset
   124
	$(Q)cp os/macosx/splash.png "$(OSXAPP)"/Contents/Data/
2688
ef9861cdd745 (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)cp lang/*.lng "$(OSXAPP)"/Contents/Lang/
ef9861cdd745 (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
   126
	$(Q)cp $(TTD) "$(OSXAPP)"/Contents/MacOS/$(TTD)
ef9861cdd745 (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
   127
ef9861cdd745 (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
# 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
ef9861cdd745 (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
release: all
3303
b0c382927186 (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
   130
	@echo '===> Building release disk image'
b0c382927186 (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
   131
	$(Q)mkdir -p "OpenTTD $(REV)"
b0c382927186 (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
   132
	$(Q)mkdir -p "OpenTTD $(REV)/docs"
b0c382927186 (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
	$(Q)mkdir -p "OpenTTD $(REV)/scenario"
b0c382927186 (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)cp -R $(OSXAPP) "OpenTTD $(REV)/"
b0c382927186 (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)cp docs/OSX_install_instructions.txt "OpenTTD $(REV)/How to install (please read).txt"
b0c382927186 (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)cp readme.txt "OpenTTD $(REV)/docs/"
b0c382927186 (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 COPYING "OpenTTD $(REV)/docs/"
b0c382927186 (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 changelog.txt "OpenTTD $(REV)/docs/"
b0c382927186 (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
   139
	$(Q)cp known-bugs.txt "OpenTTD $(REV)/known-bugs.txt"
4215
64ceec5b5f82 (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
   140
	$(Q)cp -R scenario/* "OpenTTD $(REV)/scenario/"
5586
aa39ed5e2247 (svn r7588) -Change: [OSX] removed the flag JAGUAR since it didn't work anyway
bjarni
parents: 4582
diff changeset
   141
	$(Q)hdiutil create -ov -format UDZO -srcfolder "OpenTTD $(REV)" openttd-"$(REV)"-osx.dmg
3303
b0c382927186 (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)rm -fr "OpenTTD $(REV)"
2688
ef9861cdd745 (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
   143
3907
61074b916295 (svn r4997) -Fix: [OSX] reverted the OSX part of rev 4994 as it caused dyld (lib) crashes
bjarni
parents: 3906
diff changeset
   144
$(OSX): $(TTD) $(OSX_STRIP) BUILD_OSX_BUNDLE
2688
ef9861cdd745 (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
   145
4104
70558bf4da32 (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
   146
.PHONY: release BUILD_OSX_BUNDLE