Changeset - r10076:abc7bd0d29af
[Not reviewed]
master
0 4 0
truebrain - 16 years ago 2008-09-04 19:15:52
truebrain@openttd.org
(svn r14244) -Fix: add 'Auto-generated' text when autogenerated, not in template (complain by blathijs ;))
4 files changed with 6 insertions and 9 deletions:
0 comments (0 inline, 0 general)
Makefile.in
Show inline comments
 
# Auto-generated file -- DO NOT EDIT
 

	
 
# 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_SOURCE_LIST = !!CONFIG_CACHE_SOURCE_LIST!!
 
CONFIG_CACHE_PWD = !!CONFIG_CACHE_PWD!!
 
CONFIGURE_FILES = !!CONFIGURE_FILES!!
 
LIPO = !!LIPO!!
 
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!!
 
TTD = !!TTD!!
 
TTDS = $(SRC_DIRS:%=%/$(TTD))
 
OS = !!OS!!
 
OSXAPP = !!OSXAPP!!
 
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
 

	
 
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."
Makefile.lang.in
Show inline comments
 
# Auto-generated file -- DO NOT EDIT
 

	
 
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!!
 
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
 
	$(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) $^ -o $@
 

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

	
 
$(LANGS): %.lng: $(LANG_DIR)/%.txt $(STRGEN) lang/english.txt
 
	$(E) '$(STAGE) Compiling language $(*F)'
 
	$(Q)./$(STRGEN) $(STRGEN_FLAGS) -s $(LANG_DIR) -d $(LANG_OBJS_DIR) $< $(LANG_ERRORS) && cp $@ $(BIN_DIR)/lang || true # Do not fail all languages when one fails
 

	
 
# The targets to compile the endian-code
 

	
 
endian_host.h: $(ENDIAN_CHECK)
 
	$(E) '$(STAGE) Testing endianness for host'
 
	$(Q)./$(ENDIAN_CHECK) > $@
 

	
 
$(ENDIAN_CHECK): $(SRC_DIR)/endian_check.cpp
 
	$(E) '$(STAGE) Compiling and Linking $@'
 
	$(Q)$(CXX_BUILD) $(CFLAGS_BUILD) $< -o $@
 

	
 
depend:
 

	
 
clean:
 
	$(E) '$(STAGE) Cleaning up language files'
 
	$(Q)rm -f strgen.o string.o table/strings.h $(STRGEN) $(LANGS) $(LANGS:%=$(BIN_DIR)/lang/%) lang/english.* $(ENDIAN_TARGETS)
 

	
 
mrproper: clean
 

	
 
%.lng:
 
	@echo '$(STAGE) No such language: $(@:%.lng=%)'
 

	
 
.PHONY: all mrproper depend clean
Makefile.src.in
Show inline comments
 
# Auto-generated file -- DO NOT EDIT
 

	
 
CC_HOST      = !!CC_HOST!!
 
CXX_HOST     = !!CXX_HOST!!
 
CC_BUILD     = !!CC_BUILD!!
 
CXX_BUILD    = !!CXX_BUILD!!
 
WINDRES      = !!WINDRES!!
 
STRIP        = !!STRIP!!
 
CC_CFLAGS    = !!CC_CFLAGS!!
 
CFLAGS       = !!CFLAGS!!
 
CFLAGS_BUILD = !!CFLAGS_BUILD!!
 
LIBS         = !!LIBS!!
 
LDFLAGS      = !!LDFLAGS!!
 
BIN_DIR      = !!BIN_DIR!!
 
LANG_DIR     = !!LANG_DIR!!
 
SRC_OBJS_DIR = !!SRC_OBJS_DIR!!
 
LANG_OBJS_DIR= !!LANG_OBJS_DIR!!
 
SRC_DIR      = !!SRC_DIR!!
 
MEDIA_DIR    = !!MEDIA_DIR!!
 
TTD          = !!TTD!!
 
STRGEN       = !!STRGEN!!
 
ENDIAN_CHECK = !!ENDIAN_CHECK!!
 
ENDIAN_FORCE = !!ENDIAN_FORCE!!
 
OS           = !!OS!!
 
STAGE        = !!STAGE!!
 
MAKEDEPEND   = !!MAKEDEPEND!!
 
CFLAGS_MAKEDEP= !!CFLAGS_MAKEDEP!!
 
SORT         = !!SORT!!
 
REVISION     = !!REVISION!!
 
AWK          = !!AWK!!
 
GCC295       = !!GCC295!!
 
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) $(LANG_OBJS_DIR)/table/strings.h 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)
 

	
 
ENDIAN_TARGETS := endian_target.h $(ENDIAN_CHECK)
 

	
 
# This 'sed' basicly just removes 'const' from the line if it is a 2+D array
 
# For more information, please check:
 
#  http://maillist.openttd.org/pipermail/devs/2007-April/000284.html
 
#  http://maillist.openttd.org/pipermail/devs/2007-February/000248.html
 
GCC295_FIX=sed -r 's/^(\t*)(.*)( const )([A-Za-z0-9_ ]+(\[.*\]){2,})(( = \{)|(;))(.*)$$/\1\2 \4\6\8\9/g'
 
# This 'sed' removes the 3rd '4' in the # lines of the -E output of
 
#  gcc 2.95.3 and lower, as it should indicate that it is a C-linkage, but the
 
#  compiler can't handle that information (just don't ask). So we remove it
 
#  and then it compiles happily and without bitching :)
 
# Furthermore gcc 2.95 has some trouble with protected and private when
 
#  accessing the protected/private stuff of the enclosing class (or the
 
#  super class of the enclosing class).
 
GCC295_FIX_2=sed -e 's|\(^\# [0-9][0-9]* "[^"]*"[ 0-9]*\) 4$$|\1|g;s|private:|public:|g;s|protected:|public:|g'
 

	
 
# 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
 

	
 

	
 
# Determine if we are using a modified version
 
ifeq ($(shell if test -d $(SRC_DIR)/.svn; then echo 1; fi), 1)
 
REV_MODIFIED := $(shell svnversion $(SRC_DIR) | sed -n 's/.*\(M\).*/\1/p' )
 
else
 
# Are we a git dir?
 
ifeq ($(shell if test -d $(SRC_DIR)/../.git; then echo 1; fi), 1)
config.lib
Show inline comments
 
@@ -2282,233 +2282,236 @@ make_sed() {
 
		s#!!LDFLAGS!!#$T_LDFLAGS#g;
 
		s#!!BIN_DIR!!#$BIN_DIR#g;
 
		s#!!ROOT_DIR!!#$ROOT_DIR#g;
 
		s#!!MEDIA_DIR!!#$MEDIA_DIR#g;
 
		s#!!SOURCE_LIST!!#$SOURCE_LIST#g;
 
		s#!!SRC_OBJS_DIR!!#$SRC_OBJS_DIR#g;
 
		s#!!LANG_OBJS_DIR!!#$LANG_OBJS_DIR#g;
 
		s#!!SRC_DIR!!#$SRC_DIR#g;
 
		s#!!OSXAPP!!#$OSXAPP#g;
 
		s#!!LANG_DIR!!#$LANG_DIR#g;
 
		s#!!TTD!!#$TTD#g;
 
		s#!!BINARY_DIR!!#$prefix_dir/$binary_dir#g;
 
		s#!!DATA_DIR!!#$prefix_dir/$data_dir#g;
 
		s#!!DOC_DIR!!#$prefix_dir/$doc_dir#g;
 
		s#!!MAN_DIR!!#$prefix_dir/$man_dir#g;
 
		s#!!ICON_DIR!!#$prefix_dir/$icon_dir#g;
 
		s#!!ICON_THEME_DIR!!#$prefix_dir/$icon_theme_dir#g;
 
		s#!!PERSONAL_DIR!!#$personal_dir#g;
 
		s#!!SHARED_DIR!!#$shared_dir#g;
 
		s#!!INSTALL_DIR!!#$install_dir#g;
 
		s#!!STRGEN!!#$STRGEN#g;
 
		s#!!ENDIAN_CHECK!!#$ENDIAN_CHECK#g;
 
		s#!!ENDIAN_FORCE!!#$endian#g;
 
		s#!!STAGE!!#$STAGE#g;
 
		s#!!MAKEDEPEND!!#$makedepend#g;
 
		s#!!CFLAGS_MAKEDEP!!#$cflags_makedep#g;
 
		s#!!SORT!!#$sort#g;
 
		s#!!CONFIG_CACHE_COMPILER!!#config.cache.compiler#g;
 
		s#!!CONFIG_CACHE_LINKER!!#config.cache.linker#g;
 
		s#!!CONFIG_CACHE_ENDIAN!!#config.cache.endian#g;
 
		s#!!CONFIG_CACHE_SOURCE!!#config.cache.source#g;
 
		s#!!CONFIG_CACHE_VERSION!!#config.cache.version#g;
 
		s#!!CONFIG_CACHE_SOURCE_LIST!!#config.cache.source.list#g;
 
		s#!!CONFIG_CACHE_PWD!!#config.cache.pwd#g;
 
		s#!!LANG_SUPPRESS!!#$lang_suppress#g;
 
		s#!!OBJS_C!!#$OBJS_C#g;
 
		s#!!OBJS_CPP!!#$OBJS_CPP#g;
 
		s#!!OBJS_MM!!#$OBJS_MM#g;
 
		s#!!OBJS_RC!!#$OBJS_RC#g;
 
		s#!!SRCS!!#$SRCS#g;
 
		s#!!OS!!#$os#g;
 
		s#!!CONFIGURE_FILES!!#$CONFIGURE_FILES#g;
 
		s#!!REVISION!!#$revision#g;
 
		s#!!AWK!!#$awk#g;
 
		s#!!GCC295!!#$gcc295#g;
 
		s#!!DISTCC!!#$distcc#g;
 
	"
 

	
 
	if [ "$icon_theme_dir" != "" ]; then
 
		SRC_REPLACE="$SRC_REPLACE
 
			s#!!ICON_THEME_DIR!!#$prefix_dir/$icon_theme_dir#g;
 
		"
 
	else
 
		SRC_REPLACE="$SRC_REPLACE
 
			s#!!ICON_THEME_DIR!!##g;
 
		"
 
	fi
 

	
 
	if [ "$man_dir" != "" ]; then
 
		SRC_REPLACE="$SRC_REPLACE
 
			s#!!MAN_DIR!!#$prefix_dir/$man_dir#g;
 
		"
 
	else
 
		SRC_REPLACE="$SRC_REPLACE
 
			s#!!MAN_DIR!!##g;
 
		"
 
	fi
 

	
 
	if [ "$menu_dir" != "" ]; then
 
		SRC_REPLACE="$SRC_REPLACE
 
			s#!!MENU_DIR!!#$prefix_dir/$menu_dir#g;
 
		"
 
	else
 
		SRC_REPLACE="$SRC_REPLACE
 
			s#!!MENU_DIR!!##g;
 
		"
 
	fi
 
}
 

	
 
generate_menu_item() {
 
	MENU_REPLACE="
 
		s#!!TTD!!#$TTD#g;
 
		s#!!MENU_GROUP!!#$menu_group#g
 
	"
 
	echo "Generating menu item..."
 
	mkdir -p media
 
	< $ROOT_DIR/media/openttd.desktop.in sed "$MENU_REPLACE" > media/openttd.desktop
 
}
 

	
 
generate_main() {
 
	STAGE="[MAIN]"
 

	
 
	make_sed
 

	
 
	# Create the main Makefile
 
	echo "Generating Makefile..."
 
	< $ROOT_DIR/Makefile.in sed "$SRC_REPLACE" > Makefile
 
	echo "# Auto-generated file from 'Makefile.in' -- DO NOT EDIT" > Makefile
 
	< $ROOT_DIR/Makefile.in sed "$SRC_REPLACE" >> Makefile
 
	cp $ROOT_DIR/Makefile.bundle.in Makefile.bundle
 
	echo "# Auto-generated file -- DO NOT EDIT" > Makefile.am
 
	echo >> Makefile.am
 
	# Make the copy of the source-list, so we don't trigger an unwanted recompile
 
	cp $SOURCE_LIST config.cache.source.list
 
	# Add the current directory, so we don't trigger an unwanted recompile
 
	echo "`pwd`" > config.cache.pwd
 
	# Make sure config.cache is OLDER then config.cache.source.list
 
	touch config.cache
 
	touch config.pwd
 

	
 
	if [ "$menu_dir" != "" ]; then
 
		generate_menu_item
 
	fi
 
}
 

	
 
generate_lang() {
 
	STAGE="[LANG]"
 

	
 
	make_sed
 

	
 
	# Create the language file
 
	mkdir -p $LANG_OBJS_DIR
 

	
 
	echo "Generating lang/Makefile..."
 
	< $ROOT_DIR/Makefile.lang.in sed "$SRC_REPLACE" > $LANG_OBJS_DIR/Makefile
 
	echo "# Auto-generated file from 'Makefile.lang.in' -- DO NOT EDIT" > $LANG_OBJS_DIR/Makefile
 
	< $ROOT_DIR/Makefile.lang.in sed "$SRC_REPLACE" >> $LANG_OBJS_DIR/Makefile
 
	echo "DIRS += $LANG_OBJS_DIR" >> Makefile.am
 
	echo "LANG_DIRS += $LANG_OBJS_DIR" >> Makefile.am
 
}
 

	
 
generate_src_normal() {
 
	STAGE=$1
 

	
 
	make_sed
 

	
 
	# Create the source file
 
	mkdir -p $SRC_OBJS_DIR
 

	
 
	echo "Generating $2/Makefile..."
 
	< $ROOT_DIR/Makefile.src.in sed "$SRC_REPLACE" > $SRC_OBJS_DIR/Makefile
 
	echo "# Auto-generated file from 'Makefile.src.in' -- DO NOT EDIT" > $SRC_OBJS_DIR/Makefile
 
	< $ROOT_DIR/Makefile.src.in sed "$SRC_REPLACE" >> $SRC_OBJS_DIR/Makefile
 
	echo "DIRS += $SRC_OBJS_DIR" >> Makefile.am
 
	echo "SRC_DIRS += $SRC_OBJS_DIR" >> Makefile.am
 
}
 

	
 
generate_src_osx() {
 
	cc_host_orig="$cc_host"
 
	cxx_host_orig="$cxx_host"
 

	
 
	BASE_SRC_OBJS_DIR="$OBJS_DIR/ppc"
 
	cc_host="$cc_host_orig -arch ppc"
 
	cxx_host="$cxx_host_orig -arch ppc"
 
	generate_src_normal "[PowerPC]" "objs/ppc"
 

	
 
	BASE_SRC_OBJS_DIR="$OBJS_DIR/intel"
 
	cc_host="$cc_host_orig -arch i386"
 
	cxx_host="$cxx_host_orig -arch i386"
 
	generate_src_normal "[Intel]" "objs/intel"
 

	
 
	BASE_SRC_OBJS_DIR="$OBJS_DIR/ppc970"
 
	cc_host="$cc_host_orig -arch ppc970"
 
	cxx_host="$cxx_host_orig -arch ppc970"
 
	CFLAGS="$CFLAGS -mtune=970 -mcpu=970 -mpowerpc-gpopt"
 
	generate_src_normal "[PowerPC G5]" "objs/ppc970"
 
}
 

	
 
generate_src() {
 
	if [ "$os" = "OSX" ] && [ "$enable_universal" != "0" ]; then
 
		generate_src_osx
 
	else
 
		generate_src_normal "[SRC]" "objs"
 
	fi
 
}
 

	
 
showhelp() {
 
	echo "'configure' configures OpenTTD."
 
	echo ""
 
	echo "Usage: $0 [OPTION]... [VAR=VALUE]..."
 
	echo ""
 
	echo "To assign environment variables (e.g., CC, CFLAGS...), specify them as"
 
	echo "VAR=VALUE.  See below for descriptions of some of the useful variables."
 
	echo ""
 
	echo "Defaults for the options are specified in brackets."
 
	echo ""
 
	echo "Configuration:"
 
	echo "  -h, --help                     display this help and exit"
 
	echo ""
 
	echo "System types:"
 
	echo "  --build=BUILD                  configure for building on BUILD [guessed]"
 
	echo "  --host=HOST                    cross-compile to build programs to run"
 
	echo "                                 on HOST [BUILD]"
 
	echo "  --windres=WINDRES              the windres to use [HOST-windres]"
 
	echo "  --strip=STRIP                  the strip to use [HOST-strip]"
 
	echo "  --awk=AWK                      the awk to use in configure [awk]"
 
	echo "  --lipo=LIPO                    the lipo to use (OSX ONLY) [HOST-lipo]"
 
	echo "  --os=OS                        the OS we are compiling for [DETECT]"
 
	echo "                                 DETECT/UNIX/OSX/FREEBSD/OPENBSD/NETBSD/"
 
	echo "                                 MORPHOS/HPUX/BEOS/SUNOS/CYGWIN/MINGW/OS2/"
 
	echo "                                 WINCE/PSP"
 
	echo "  --endian=ENDIAN                set the endian of the HOST (AUTO/LE/BE)"
 
	echo "  --revision=rXXXX               overwrite the revision detection."
 
	echo "                                 Use with care!"
 
	echo ""
 
	echo "Paths:"
 
	echo "  --prefix-dir=dir               specifies the prefix for all installed"
 
	echo "                                 files [/usr/local]"
 
	echo "  --binary-dir=dir               location of the binary. Will be prefixed"
 
	echo "                                 with the prefix-dir [games]"
 
	echo "  --data-dir=dir                 location of data files (lang, data, gm)."
 
	echo "                                 Will be prefixed with the prefix-dir"
 
	echo "                                 [share/games/openttd]"
 
	echo "  --doc-dir=dir                  location of the doc files"
 
	echo "                                 Will be prefixed with the prefix-dir"
 
	echo "                                 [$doc_dir]"
 
	echo "  --icon-dir=dir                 location of icons. Will be prefixed"
 
	echo "                                 with the prefix-dir [share/pixmaps]"
 
	echo "  --icon-theme-dir=dir           location of icon theme."
 
	echo "                                 Will be prefixed with the prefix-dir"
 
	echo "                                 and postfixed with size-dirs [$icon_theme_dir]"
 
	echo "  --man-dir=dir                  location of the manual page (UNIX only)"
 
	echo "                                 Will be prefixed with the prefix-dir"
 
	echo "                                 [$man_dir]"
 
	echo "  --menu-dir=dir                 location of the menu item. (UNIX only, except OSX)"
 
	echo "                                 Will be prefixed with the prefix-dir"
 
	echo "                                 [share/applications]"
 
	echo "  --personal-dir=dir             location of the personal directory"
 
	echo "                                 [os-dependent default]"
 
	echo "  --shared-dir=dir               location of shared data files"
 
	echo "                                 [os-dependent default]"
 
	echo "  --install-dir=dir              specifies the root to install to."
 
	echo "                                 Useful to install into jails [/]"
 
	echo ""
 
	echo "Features and packages:"
 
	echo "  --enable-debug[=LVL]           enable debug-mode (LVL=[0123], 0 is release)"
 
	echo "  --enable-desync-debug=[LVL]    enable desync debug options (LVL=[012], 0 is none"
 
	echo "  --enable-profiling             enables profiling"
 
	echo "  --enable-dedicated             compile a dedicated server (without video)"
0 comments (0 inline, 0 general)