Changeset - r12951:0cd9683b75be
[Not reviewed]
master
0 4 0
smatz - 15 years ago 2009-09-07 13:33:45
smatz@openttd.org
(svn r17454) -Codechange: some alignment in Makefile*.in
4 files changed with 78 insertions and 78 deletions:
0 comments (0 inline, 0 general)
Makefile.in
Show inline comments
 
# $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
 

	
 
SOURCE_LIST = !!SOURCE_LIST!!
 
CONFIG_CACHE_PWD         = !!CONFIG_CACHE_PWD!!
 
CONFIG_CACHE_SOURCE_LIST = !!CONFIG_CACHE_SOURCE_LIST!!
 
CONFIG_CACHE_PWD = !!CONFIG_CACHE_PWD!!
 
CONFIGURE_FILES = !!CONFIGURE_FILES!!
 
LIPO = !!LIPO!!
 
BIN_DIR = !!BIN_DIR!!
 
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!!
 
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!!
 
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!!
 
REVISION = !!REVISION!!
 
AWK = !!AWK!!
 
DISTCC = !!DISTCC!!
 
STRIP       = !!STRIP!!
 
TTD         = !!TTD!!
 
TTDS        = $(SRC_DIRS:%=%/$(TTD))
 
OS          = !!OS!!
 
OSXAPP      = !!OSXAPP!!
 
LIPO        = !!LIPO!!
 
REVISION    = !!REVISION!!
 
AWK         = !!AWK!!
 
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; \
 
	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
Makefile.lang.in
Show inline comments
 
# $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/>.
 

	
 
STRGEN       = !!STRGEN!!
 
ENDIAN_CHECK = !!ENDIAN_CHECK!!
 
SRC_DIR      = !!SRC_DIR!!
 
LANG_DIR     = !!LANG_DIR!!
 
BIN_DIR      = !!BIN_DIR!!
 
LANGS_SRC    = $(shell ls $(LANG_DIR)/*.txt)
 
LANGS        = $(LANGS_SRC:$(LANG_DIR)/%.txt=%.lng)
 
CXX_BUILD    = !!CXX_BUILD!!
 
CFLAGS_BUILD = !!CFLAGS_BUILD!!
 
LDFLAGS_BUILD= !!LDFLAGS_BUILD!!
 
STRGEN_FLAGS = !!STRGEN_FLAGS!!
 
STAGE        = !!STAGE!!
 
LANG_SUPPRESS= !!LANG_SUPPRESS!!
 
LANG_OBJS_DIR= !!LANG_OBJS_DIR!!
 
STRGEN        = !!STRGEN!!
 
ENDIAN_CHECK  = !!ENDIAN_CHECK!!
 
SRC_DIR       = !!SRC_DIR!!
 
LANG_DIR      = !!LANG_DIR!!
 
BIN_DIR       = !!BIN_DIR!!
 
LANGS_SRC     = $(shell ls $(LANG_DIR)/*.txt)
 
LANGS         = $(LANGS_SRC:$(LANG_DIR)/%.txt=%.lng)
 
CXX_BUILD     = !!CXX_BUILD!!
 
CFLAGS_BUILD  = !!CFLAGS_BUILD!!
 
LDFLAGS_BUILD = !!LDFLAGS_BUILD!!
 
STRGEN_FLAGS  = !!STRGEN_FLAGS!!
 
STAGE         = !!STAGE!!
 
LANG_SUPPRESS = !!LANG_SUPPRESS!!
 
LANG_OBJS_DIR = !!LANG_OBJS_DIR!!
 

	
 
ifeq ($(LANG_SUPPRESS), yes)
 
LANG_ERRORS = >/dev/null 2>&1
 
endif
 

	
 
# Make sure endian_host.h is reasable as if it was in the src/ dir
 
CFLAGS_BUILD += -I $(LANG_OBJS_DIR)
 

	
 
ENDIAN_TARGETS := endian_host.h endian_target.h $(ENDIAN_CHECK)
 

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

	
 
RES := $(shell mkdir -p $(BIN_DIR)/lang )
 

	
 
all: table/strings.h $(LANGS)
 

	
 
strgen.o: $(SRC_DIR)/strgen/strgen.cpp endian_host.h $(SRC_DIR)/table/control_codes.h $(SRC_DIR)/table/strgen_tables.h
 
	$(E) '$(STAGE) Compiling $(<:$(SRC_DIR)/%.cpp=%.cpp)'
 
	$(Q)$(CXX_BUILD) $(CFLAGS_BUILD) -DSTRGEN -c -o $@ $<
 

	
 
string.o: $(SRC_DIR)/string.cpp endian_host.h
 
	$(E) '$(STAGE) Compiling $(<:$(SRC_DIR)/%.cpp=%.cpp)'
 
	$(Q)$(CXX_BUILD) $(CFLAGS_BUILD) -DSTRGEN -c -o $@ $<
 

	
 
alloc_func.o: $(SRC_DIR)/core/alloc_func.cpp endian_host.h
 
	$(E) '$(STAGE) Compiling $(<:$(SRC_DIR)/%.cpp=%.cpp)'
 
	$(Q)$(CXX_BUILD) $(CFLAGS_BUILD) -DSTRGEN -c -o $@ $<
 

	
 
lang/english.txt: $(LANG_DIR)/english.txt
 
	$(Q)mkdir -p lang
 
	$(Q)cp $(LANG_DIR)/english.txt lang/english.txt
 

	
 
$(STRGEN): alloc_func.o string.o strgen.o
 
	$(E) '$(STAGE) Compiling and Linking $@'
 
	$(Q)$(CXX_BUILD) $(LDFLAGS_BUILD) $^ -o $@
 

	
 
table/strings.h: lang/english.txt $(STRGEN)
 
	$(E) '$(STAGE) Generating $@'
 
	@mkdir -p table
 
	$(Q)./$(STRGEN) -s $(LANG_DIR) -d table
 

	
Makefile.msvc
Show inline comments
 
# $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/>.
 

	
 
#
 
# Makefile for creating bundles of MSVC's binaries in the same way as we make
 
# the zip bundles for ALL other OSes.
 
#
 
# Usage: make -f Makefile.msvc PLATFORM=[Win32|x64] BUNDLE_NAME=openttd-<version>-win[32|64]
 
#   or   make -f Makefile.msvc PLATFORM=[Win32|x64] BUNDLE_NAME=OTTD-win[32|64]-nightly-<revision>
 
#
 

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

	
 
AWK = "awk"
 
ROOT_DIR := $(shell pwd)
 
BIN_DIR = "$(ROOT_DIR)/bin"
 
SRC_DIR = "$(ROOT_DIR)/src"
 
BUNDLE_DIR = "$(ROOT_DIR)/bundle"
 
AWK         = "awk"
 
ROOT_DIR   := $(shell pwd)
 
BIN_DIR     = "$(ROOT_DIR)/bin"
 
SRC_DIR     = "$(ROOT_DIR)/src"
 
BUNDLE_DIR  = "$(ROOT_DIR)/bundle"
 
BUNDLES_DIR = "$(ROOT_DIR)/bundles"
 
TTD = openttd.exe
 
TARGET := $(shell echo $(PLATFORM) | sed "s@win64@x64@;s@win32@Win32@")
 
TTD         = openttd.exe
 
TARGET     := $(shell echo $(PLATFORM) | sed "s@win64@x64@;s@win32@Win32@")
 

	
 
all:
 
	$(Q)cp objs/$(TARGET)/Release/$(TTD) $(BIN_DIR)/$(TTD)
 

	
 
include Makefile.bundle.in
Makefile.src.in
Show inline comments
 
# $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/>.
 

	
 
CC_HOST      = !!CC_HOST!!
 
CXX_HOST     = !!CXX_HOST!!
 
CC_BUILD     = !!CC_BUILD!!
 
CXX_BUILD    = !!CXX_BUILD!!
 
WINDRES      = !!WINDRES!!
 
STRIP        = !!STRIP!!
 
CFLAGS       = !!CFLAGS!!
 
CFLAGS_BUILD = !!CFLAGS_BUILD!!
 
LIBS         = !!LIBS!!
 
LDFLAGS      = !!LDFLAGS!!
 
LDFLAGS_BUILD= !!LDFLAGS_BUILD!!
 
ROOT_DIR     = !!ROOT_DIR!!
 
BIN_DIR      = !!BIN_DIR!!
 
LANG_DIR     = !!LANG_DIR!!
 
SRC_OBJS_DIR = !!SRC_OBJS_DIR!!
 
LANG_OBJS_DIR= !!LANG_OBJS_DIR!!
 
SRC_DIR      = !!SRC_DIR!!
 
SCRIPT_SRC_DIR=!!SCRIPT_SRC_DIR!!
 
MEDIA_DIR    = !!MEDIA_DIR!!
 
TTD          = !!TTD!!
 
STRGEN       = !!STRGEN!!
 
ENDIAN_CHECK = !!ENDIAN_CHECK!!
 
DEPEND       = !!DEPEND!!
 
ENDIAN_FORCE = !!ENDIAN_FORCE!!
 
OS           = !!OS!!
 
STAGE        = !!STAGE!!
 
MAKEDEPEND   = !!MAKEDEPEND!!
 
CFLAGS_MAKEDEP= !!CFLAGS_MAKEDEP!!
 
SORT         = !!SORT!!
 
REVISION     = !!REVISION!!
 
AWK          = !!AWK!!
 
CC_HOST        = !!CC_HOST!!
 
CXX_HOST       = !!CXX_HOST!!
 
CC_BUILD       = !!CC_BUILD!!
 
CXX_BUILD      = !!CXX_BUILD!!
 
WINDRES        = !!WINDRES!!
 
STRIP          = !!STRIP!!
 
CFLAGS         = !!CFLAGS!!
 
CFLAGS_BUILD   = !!CFLAGS_BUILD!!
 
LIBS           = !!LIBS!!
 
LDFLAGS        = !!LDFLAGS!!
 
LDFLAGS_BUILD  = !!LDFLAGS_BUILD!!
 
ROOT_DIR       = !!ROOT_DIR!!
 
BIN_DIR        = !!BIN_DIR!!
 
LANG_DIR       = !!LANG_DIR!!
 
SRC_OBJS_DIR   = !!SRC_OBJS_DIR!!
 
LANG_OBJS_DIR  = !!LANG_OBJS_DIR!!
 
SRC_DIR        = !!SRC_DIR!!
 
SCRIPT_SRC_DIR = !!SCRIPT_SRC_DIR!!
 
MEDIA_DIR      = !!MEDIA_DIR!!
 
TTD            = !!TTD!!
 
STRGEN         = !!STRGEN!!
 
ENDIAN_CHECK   = !!ENDIAN_CHECK!!
 
DEPEND         = !!DEPEND!!
 
ENDIAN_FORCE   = !!ENDIAN_FORCE!!
 
OS             = !!OS!!
 
STAGE          = !!STAGE!!
 
MAKEDEPEND     = !!MAKEDEPEND!!
 
CFLAGS_MAKEDEP = !!CFLAGS_MAKEDEP!!
 
SORT           = !!SORT!!
 
REVISION       = !!REVISION!!
 
AWK            = !!AWK!!
 
CONFIG_CACHE_COMPILER = $(SRC_OBJS_DIR)/!!CONFIG_CACHE_COMPILER!!
 
CONFIG_CACHE_LINKER   = $(SRC_OBJS_DIR)/!!CONFIG_CACHE_LINKER!!
 
CONFIG_CACHE_ENDIAN   = $(SRC_OBJS_DIR)/!!CONFIG_CACHE_ENDIAN!!
 
CONFIG_CACHE_SOURCE   = $(SRC_OBJS_DIR)/!!CONFIG_CACHE_SOURCE!!
 
CONFIG_CACHE_VERSION  = $(SRC_OBJS_DIR)/!!CONFIG_CACHE_VERSION!!
 

	
 
OBJS_C   := !!OBJS_C!!
 
OBJS_CPP := !!OBJS_CPP!!
 
OBJS_MM  := !!OBJS_MM!!
 
OBJS_RC  := !!OBJS_RC!!
 
OBJS     := $(OBJS_C) $(OBJS_CPP) $(OBJS_MM) $(OBJS_RC)
 
SRCS     := !!SRCS!!
 

	
 
# All C-files depend on those 3 files
 
FILE_DEP := $(CONFIG_CACHE_COMPILER) endian_target.h
 
# Create all dirs and subdirs
 
RES      := $(shell mkdir -p $(BIN_DIR) $(sort $(dir $(OBJS))))
 

	
 
# Make sure endian_target.h is reasable as if it was in the src/ dir
 
CFLAGS += -I $(SRC_OBJS_DIR) -I $(LANG_OBJS_DIR)
 
CFLAGS_MAKEDEP += -I $(SRC_OBJS_DIR) -I $(LANG_OBJS_DIR) -I $(SCRIPT_SRC_DIR)
 

	
 
ENDIAN_TARGETS := endian_target.h $(ENDIAN_CHECK)
 

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

	
 
# Our default target
 
all: $(BIN_DIR)/$(TTD)
 

	
 
# This are 2 rules that are pointing back to STRGEN stuff.
 
#  There is not really a need to have them here, but in case
 
#  some weirdo wants to run 'make' in the 'src' dir and expects
 
#  the languages to be recompiled, this catches that case and
 
#  takes care of it nicely.
 
$(LANG_OBJS_DIR)/$(STRGEN):
 
	$(MAKE) -C $(LANG_OBJS_DIR) $(STRGEN)
 

	
 
$(LANG_OBJS_DIR)/table/strings.h: $(LANG_DIR)/english.txt $(LANG_OBJS_DIR)/$(STRGEN)
 
	$(MAKE) -C $(LANG_OBJS_DIR) table/strings.h
 

	
 
# Always run version detection, so we always have an accurate modified
0 comments (0 inline, 0 general)