mirror of https://github.com/OpenTTD/OpenTTD.git
(svn r972) Makefile: added make release (currently only works on mac)
Mac: sets the STATIC flag if no makefile.config is found
This commit is contained in:
parent
bad25dec0e
commit
701e58e157
23
Makefile
23
Makefile
|
@ -36,6 +36,7 @@
|
||||||
# mrproper: remove intermediate files and makefile configuration
|
# mrproper: remove intermediate files and makefile configuration
|
||||||
# upgradeconf: add new options to old Makefile.config
|
# upgradeconf: add new options to old Makefile.config
|
||||||
# osx: OS X application
|
# osx: OS X application
|
||||||
|
# release: used by OSX to make a dmg file ready to release
|
||||||
|
|
||||||
# Options:
|
# Options:
|
||||||
#
|
#
|
||||||
|
@ -622,7 +623,7 @@ $(TTD): table/strings.h $(ttd_OBJS) $(MAKE_CONFIG)
|
||||||
$(if $(VERBOSE),@echo '$(C_LINK) $@ $(TTDLDFLAGS) $(ttd_OBJS) $(LIBS)';,@echo 'Compiling and Linking $@';) \
|
$(if $(VERBOSE),@echo '$(C_LINK) $@ $(TTDLDFLAGS) $(ttd_OBJS) $(LIBS)';,@echo 'Compiling and Linking $@';) \
|
||||||
$(C_LINK) $@ $(TTDLDFLAGS) $(ttd_OBJS) $(LIBS) $(VERBOSE_FILTER)
|
$(C_LINK) $@ $(TTDLDFLAGS) $(ttd_OBJS) $(LIBS) $(VERBOSE_FILTER)
|
||||||
|
|
||||||
$(OSX):
|
$(OSX):
|
||||||
@rm -fr $(OSXAPP)
|
@rm -fr $(OSXAPP)
|
||||||
@mkdir -p $(OSXAPP)/Contents/MacOS
|
@mkdir -p $(OSXAPP)/Contents/MacOS
|
||||||
@mkdir -p $(OSXAPP)/Contents/Resources
|
@mkdir -p $(OSXAPP)/Contents/Resources
|
||||||
|
@ -638,8 +639,6 @@ $(OSX):
|
||||||
@cp data/* $(OSXAPP)/Contents/data/
|
@cp data/* $(OSXAPP)/Contents/data/
|
||||||
@cp lang/*.lng $(OSXAPP)/Contents/lang/
|
@cp lang/*.lng $(OSXAPP)/Contents/lang/
|
||||||
@cp $(TTD) $(OSXAPP)/Contents/MacOS/$(TTD)
|
@cp $(TTD) $(OSXAPP)/Contents/MacOS/$(TTD)
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
$(endwarnings): $(64_bit_warnings)
|
$(endwarnings): $(64_bit_warnings)
|
||||||
|
|
||||||
|
@ -662,6 +661,24 @@ lang/%.lng: lang/%.txt $(STRGEN) lang/english.txt
|
||||||
winres.o: ttd.rc
|
winres.o: ttd.rc
|
||||||
windres -o $@ $<
|
windres -o $@ $<
|
||||||
|
|
||||||
|
ifdef OSX
|
||||||
|
release: all
|
||||||
|
@mkdir -p OpenTTD\ $(RELEASE)
|
||||||
|
@mkdir -p OpenTTD\ $(RELEASE)/docs
|
||||||
|
@cp -R $(OSXAPP) OpenTTD\ $(RELEASE)/
|
||||||
|
@cp docs/OSX_where_did_the_package_go.txt OpenTTD\ $(RELEASE)/Where\ did\ the\ package\ go.txt
|
||||||
|
@cp readme.txt OpenTTD\ $(RELEASE)/docs/
|
||||||
|
@cp docs/README_if_game_crashed_on_OSX.txt OpenTTD\ $(RELEASE)/docs/readme\ if\ crashed\ on\ OSX.txt
|
||||||
|
@cp docs/console.txt OpenTTD\ $(RELEASE)/docs/
|
||||||
|
@cp COPYING OpenTTD\ $(RELEASE)/docs/
|
||||||
|
@cp changelog.txt OpenTTD\ $(RELEASE)/docs/
|
||||||
|
@cp docs/README_if_game_crashed_on_OSX.txt OpenTTD\ $(RELEASE)/docs/
|
||||||
|
@cp os/macos/*.webloc OpenTTD\ $(RELEASE)/
|
||||||
|
@hdiutil create -ov -format UDZO -srcfolder OpenTTD\ $(RELEASE) openttd-$(RELEASE)-osx.dmg
|
||||||
|
@rm -fr OpenTTD\ $(RELEASE)
|
||||||
|
|
||||||
|
.PHONY: release
|
||||||
|
endif
|
||||||
|
|
||||||
rev.c: FORCE
|
rev.c: FORCE
|
||||||
@# setting the revision number in a place, there the binary can read it
|
@# setting the revision number in a place, there the binary can read it
|
||||||
|
|
|
@ -23,6 +23,8 @@ ifeq ($(VENDOR), apple)
|
||||||
OSX:=1
|
OSX:=1
|
||||||
# OSX uses the unix setup too
|
# OSX uses the unix setup too
|
||||||
UNIX:=1
|
UNIX:=1
|
||||||
|
# OSX generally uses static since so few computers actually have all the libs installed in unix style
|
||||||
|
STATIC:=1
|
||||||
endif
|
endif
|
||||||
|
|
||||||
# Automatically recognize if building on MorphOS
|
# Automatically recognize if building on MorphOS
|
||||||
|
|
Loading…
Reference in New Issue