Files @ r15899:3bbe04d427d2
Branch filter:

Location: cpp/openttd-patchpack/source/Makefile.in - annotation

rubidium
(svn r20593) -Fix: (rlongago, r20547): long ago the service interval was int16, after which is got converted to Date except in the order backup. Much later I copied the savegame snippets from a vehicle and applied that on the order backup. Presto, reading/writing 32 bits (of Date) into 16 bits of ancient style service interval. That would then "spoil" the name pointer and that eventually crashes OpenTTD as it's likely to be an invalid pointer.
r12768:980ae0491352
r12768:980ae0491352
r12768:980ae0491352
r12768:980ae0491352
r12768:980ae0491352
r12768:980ae0491352
r12768:980ae0491352
r5475:3f5cd13d1b63
r5475:3f5cd13d1b63
r5475:3f5cd13d1b63
r5475:3f5cd13d1b63
r5475:3f5cd13d1b63
r5475:3f5cd13d1b63
r5475:3f5cd13d1b63
r5475:3f5cd13d1b63
r5475:3f5cd13d1b63
r12951:0cd9683b75be
r5475:3f5cd13d1b63
r12951:0cd9683b75be
r9694:c3989dff0985
r12951:0cd9683b75be
r12951:0cd9683b75be
r12951:0cd9683b75be
r12951:0cd9683b75be
r12951:0cd9683b75be
r12951:0cd9683b75be
r12951:0cd9683b75be
r12951:0cd9683b75be
r12951:0cd9683b75be
r12951:0cd9683b75be
r12951:0cd9683b75be
r9694:c3989dff0985
r12951:0cd9683b75be
r12951:0cd9683b75be
r12951:0cd9683b75be
r12951:0cd9683b75be
r10244:5c15d395c36e
r12951:0cd9683b75be
r12951:0cd9683b75be
r12951:0cd9683b75be
r12951:0cd9683b75be
r12951:0cd9683b75be
r12951:0cd9683b75be
r12951:0cd9683b75be
r12951:0cd9683b75be
r15239:23cdba781af3
r12951:0cd9683b75be
r5475:3f5cd13d1b63
r10060:e7724ac712b0
r10060:e7724ac712b0
r5475:3f5cd13d1b63
r10060:e7724ac712b0
r7093:b3638d2ccaee
r7093:b3638d2ccaee
r7093:b3638d2ccaee
r7093:b3638d2ccaee
r15805:83ef427d044d
r7093:b3638d2ccaee
r7093:b3638d2ccaee
r7093:b3638d2ccaee
r7093:b3638d2ccaee
r7093:b3638d2ccaee
r7093:b3638d2ccaee
r7093:b3638d2ccaee
r7093:b3638d2ccaee
r7093:b3638d2ccaee
r7093:b3638d2ccaee
r7093:b3638d2ccaee
r7092:1b152654846d
r7092:1b152654846d
r7092:1b152654846d
r7092:1b152654846d
r7092:1b152654846d
r7092:1b152654846d
r7092:1b152654846d
r7092:1b152654846d
r7092:1b152654846d
r7092:1b152654846d
r7092:1b152654846d
r7092:1b152654846d
r7092:1b152654846d
r7092:1b152654846d
r7092:1b152654846d
r7092:1b152654846d
r7092:1b152654846d
r7092:1b152654846d
r7092:1b152654846d
r7092:1b152654846d
r7092:1b152654846d
r7092:1b152654846d
r10060:e7724ac712b0
r10060:e7724ac712b0
r10060:e7724ac712b0
r5475:3f5cd13d1b63
r10060:e7724ac712b0
r10060:e7724ac712b0
r10060:e7724ac712b0
r5475:3f5cd13d1b63
r5475:3f5cd13d1b63
r5475:3f5cd13d1b63
r5475:3f5cd13d1b63
r5475:3f5cd13d1b63
r5475:3f5cd13d1b63
r11911:68c886dabb52
r5475:3f5cd13d1b63
r10060:e7724ac712b0
r5475:3f5cd13d1b63
r5475:3f5cd13d1b63
r5475:3f5cd13d1b63
r5475:3f5cd13d1b63
r5475:3f5cd13d1b63
r5475:3f5cd13d1b63
r5475:3f5cd13d1b63
r5475:3f5cd13d1b63
r5475:3f5cd13d1b63
r5475:3f5cd13d1b63
r5475:3f5cd13d1b63
r5475:3f5cd13d1b63
r5475:3f5cd13d1b63
r5475:3f5cd13d1b63
r5475:3f5cd13d1b63
r5475:3f5cd13d1b63
r5475:3f5cd13d1b63
r5475:3f5cd13d1b63
r5475:3f5cd13d1b63
r5475:3f5cd13d1b63
r5475:3f5cd13d1b63
r5475:3f5cd13d1b63
r5475:3f5cd13d1b63
r5475:3f5cd13d1b63
r5475:3f5cd13d1b63
r10057:5831c7e6573f
r14449:65b617338169
r10060:e7724ac712b0
r14449:65b617338169
r5475:3f5cd13d1b63
r5475:3f5cd13d1b63
r14449:65b617338169
r14449:65b617338169
r14449:65b617338169
r14449:65b617338169
r14449:65b617338169
r14449:65b617338169
r14449:65b617338169
r14449:65b617338169
r14449:65b617338169
r14449:65b617338169
r14449:65b617338169
r5475:3f5cd13d1b63
r5475:3f5cd13d1b63
r5475:3f5cd13d1b63
r5475:3f5cd13d1b63
r5475:3f5cd13d1b63
r5475:3f5cd13d1b63
r5475:3f5cd13d1b63
r6254:ee09ade12c2f
r5475:3f5cd13d1b63
r6308:d50b4b07c9cd
r6308:d50b4b07c9cd
r6308:d50b4b07c9cd
r6828:f0a98c7c4e55
r6828:f0a98c7c4e55
r6828:f0a98c7c4e55
r10696:8dfe83e30d01
r10696:8dfe83e30d01
r14449:65b617338169
r10696:8dfe83e30d01
r5475:3f5cd13d1b63
r5475:3f5cd13d1b63
r5551:bbf92a6eba24
r5475:3f5cd13d1b63
r5475:3f5cd13d1b63
r5475:3f5cd13d1b63
r5475:3f5cd13d1b63
r5475:3f5cd13d1b63
r5475:3f5cd13d1b63
r5475:3f5cd13d1b63
r14449:65b617338169
r14449:65b617338169
r9919:f8325475f091
# $Id$

# This file is part of OpenTTD.
# OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2.
# OpenTTD is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
# See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with OpenTTD. If not, see <http://www.gnu.org/licenses/>.

# Check if we want to show what we are doing
ifdef VERBOSE
	Q =
else
	Q = @
endif

include Makefile.am

CONFIG_CACHE_PWD         = !!CONFIG_CACHE_PWD!!
CONFIG_CACHE_SOURCE_LIST = !!CONFIG_CACHE_SOURCE_LIST!!
BIN_DIR        = !!BIN_DIR!!
ICON_THEME_DIR = !!ICON_THEME_DIR!!
MAN_DIR        = !!MAN_DIR!!
MENU_DIR       = !!MENU_DIR!!
SRC_DIR        = !!SRC_DIR!!
ROOT_DIR       = !!ROOT_DIR!!
BUNDLE_DIR     = "$(ROOT_DIR)/bundle"
BUNDLES_DIR    = "$(ROOT_DIR)/bundles"
INSTALL_DIR    = !!INSTALL_DIR!!
INSTALL_BINARY_DIR     = "$(INSTALL_DIR)/"!!BINARY_DIR!!
INSTALL_MAN_DIR        = "$(INSTALL_DIR)/$(MAN_DIR)"
INSTALL_MENU_DIR       = "$(INSTALL_DIR)/$(MENU_DIR)"
INSTALL_ICON_DIR       = "$(INSTALL_DIR)/"!!ICON_DIR!!
INSTALL_ICON_THEME_DIR = "$(INSTALL_DIR)/$(ICON_THEME_DIR)"
INSTALL_DATA_DIR       = "$(INSTALL_DIR)/"!!DATA_DIR!!
INSTALL_DOC_DIR        = "$(INSTALL_DIR)/"!!DOC_DIR!!
SOURCE_LIST     = !!SOURCE_LIST!!
CONFIGURE_FILES = !!CONFIGURE_FILES!!
BINARY_NAME = !!BINARY_NAME!!
STRIP       = !!STRIP!!
TTD         = !!TTD!!
TTDS        = $(SRC_DIRS:%=%/$(TTD))
OS          = !!OS!!
OSXAPP      = !!OSXAPP!!
LIPO        = !!LIPO!!
REVISION    = !!REVISION!!
AWK         = !!AWK!!
SORT        = !!SORT!!
DISTCC      = !!DISTCC!!

RES := $(shell if [ ! -f $(CONFIG_CACHE_PWD) ] || [ "`pwd`" != "`cat $(CONFIG_CACHE_PWD)`" ]; then echo "`pwd`" > $(CONFIG_CACHE_PWD); fi )
RES := $(shell if [ ! -f $(CONFIG_CACHE_SOURCE_LIST) ] || [ -n "`cmp $(CONFIG_CACHE_SOURCE_LIST) $(SOURCE_LIST) 2>/dev/null`" ]; then cp $(SOURCE_LIST) $(CONFIG_CACHE_SOURCE_LIST); fi )

all: config.pwd config.cache
ifdef DISTCC
	@if [ -z "`echo '$(MFLAGS)' | grep '\-j'`" ]; then echo; echo "WARNING: you enabled distcc support, but you don't seem to be using the -jN paramter"; echo; fi
endif
	@for dir in $(DIRS); do \
		$(MAKE) -C $$dir all || exit 1; \
	done
ifdef LIPO
# Lipo is an OSX thing. If it is defined, it means we are building for universal,
# and so we have have to combine the binaries into one big binary

# Remove the last binary made by the last compiled target
	$(Q)rm -f $(BIN_DIR)/$(TTD)
# Make all the binaries into one
	$(Q)$(LIPO) -create -output $(BIN_DIR)/$(TTD) $(TTDS)
endif

help:
	@echo "Available make commands:"
	@echo ""
	@echo "Compilation:"
	@echo "  all           compile the executable and the lang files"
	@echo "  lang          compile the lang files only"
	@echo "Clean up:"
	@echo "  clean         remove the files generated during compilation"
	@echo "  mrproper      remove the files generated during configuration and compilation"
	@echo "Run after compilation:"
	@echo "  run           execute openttd after the compilation"
	@echo "  run-gdb       execute openttd in debug mode after the compilation"
	@echo "  run-prof      execute openttd in profiling mode after the compilation"
	@echo "Installation:"
	@echo "  install       install the compiled files and the data-files after the compilation"
	@echo "  bundle        create the base for an installation bundle"
	@echo "  bundle_zip    create the zip installation bundle"
	@echo "  bundle_gzip   create the gzip installation bundle"
	@echo "  bundle_bzip2  create the bzip2 installation bundle"
	@echo "  bundle_lha    create the lha installation bundle"
	@echo "  bundle_dmg    create the dmg installation bundle"

config.pwd: $(CONFIG_CACHE_PWD)
	$(MAKE) reconfigure

config.cache: $(CONFIG_CACHE_SOURCE_LIST) $(CONFIGURE_FILES)
	$(MAKE) reconfigure

reconfigure:
ifeq ($(shell if test -f config.cache; then echo 1; fi), 1)
	@echo "----------------"
	@echo "The system detected that source.list or any configure file is altered."
	@echo " Going to reconfigure with last known settings..."
	@echo "----------------"
# Make sure we don't lock config.cache
	@$(shell cat config.cache | sed 's@\\ @\\\\ @g') || exit 1
	@echo "----------------"
	@echo "Reconfig done. Please re-execute make."
	@echo "----------------"
else
	@echo "----------------"
	@echo "Have not found a configuration, please run configure first."
	@echo "----------------"
	@exit 1
endif

clean:
	@for dir in $(DIRS); do \
		$(MAKE) -C $$dir clean; \
	done
	$(Q)rm -rf $(BUNDLE_TARGET)

lang:
	@for dir in $(LANG_DIRS); do \
		$(MAKE) -C $$dir all; \
	done

mrproper:
	@for dir in $(DIRS); do \
		$(MAKE) -C $$dir mrproper; \
		rm -f $$dir/Makefile; \
	done
	$(Q)rm -rf objs
	$(Q)rm -f Makefile Makefile.am Makefile.bundle
	$(Q)rm -f media/openttd.desktop media/openttd.desktop.install
	$(Q)rm -f $(CONFIG_CACHE_SOURCE_LIST) config.cache config.pwd config.log $(CONFIG_CACHE_PWD)
# directories for bundle generation
	$(Q)rm -rf $(BUNDLE_DIR)
	$(Q)rm -rf $(BUNDLES_DIR)
# output of profiling
	$(Q)rm -f $(BIN_DIR)/gmon.out
# output of generating 'API' documentation
	$(Q)rm -f $(ROOT_DIR)/openttd.tag
	$(Q)rm -rf $(ROOT_DIR)/docs/source
# output of generating AI API documentation
	$(Q)rm -f $(SRC_DIR)/ai/api/openttd.tag
	$(Q)rm -rf $(ROOT_DIR)/docs/aidocs
# directories created by OpenTTD on regression testing
	$(Q)rm -rf $(BIN_DIR)/ai/regression/content_download $(BIN_DIR)/ai/regression/save $(BIN_DIR)/ai/regression/scenario
distclean: mrproper

depend:
	@for dir in $(SRC_DIRS); do \
		$(MAKE) -C $$dir depend; \
	done

run: all
	$(Q)cd !!BIN_DIR!! && ./!!TTD!! $(OPENTTD_ARGS)

run-gdb: all
	$(Q)cd !!BIN_DIR!! && gdb --ex run --args ./!!TTD!! $(OPENTTD_ARGS)

run-prof: all
	$(Q)cd !!BIN_DIR!! && ./!!TTD!! $(OPENTTD_ARGS) && gprof !!TTD!! | less

regression: all
	$(Q)cd !!BIN_DIR!! && sh ai/regression/run.sh
test: regression

%.o:
	@for dir in $(SRC_DIRS); do \
		$(MAKE) -C $$dir $(@:src/%=%); \
	done

%.lng:
	@for dir in $(LANG_DIRS); do \
		$(MAKE) -C $$dir $@; \
	done

.PHONY: test distclean mrproper clean

include Makefile.bundle