summaryrefslogtreecommitdiff
path: root/makefiledir
diff options
context:
space:
mode:
authorrubidium <rubidium@openttd.org>2007-01-02 19:19:48 +0000
committerrubidium <rubidium@openttd.org>2007-01-02 19:19:48 +0000
commit66bbf336c6af7353ef0aeed58002c46543b30635 (patch)
treead4a63860df2626b22f77e7dac712e958bea54cb /makefiledir
parentccc0a3f4dbf58c005b22341ac8874252924690cd (diff)
downloadopenttd-66bbf336c6af7353ef0aeed58002c46543b30635.tar.xz
(svn r7759) -Merge: makefile rewrite. This merge features:
- A proper ./configure, so everything needs to be configured only once, not for every make. - Usage of makedepend when available. This greatly reduces the time needed for generating the dependencies. - A generator for all project files. There is a single file with sources, which is used to generate Makefiles and the project files for MSVC. - Proper support for OSX universal binaries. - Object files for non-MSVC compiles are also placed in separate directories, making is faster to switch between debug and release compiles and it does not touch the directory with the source files. - Functionality to make a bundle of all needed files for for example a nightly or distribution of a binary with all needed GRFs and language files. Note: as this merge moves almost all files, it is recommended to make a backup of your working copy before updating your working copy.
Diffstat (limited to 'makefiledir')
-rw-r--r--makefiledir/Makefile.config_writer111
-rw-r--r--makefiledir/Makefile.libdetection149
2 files changed, 0 insertions, 260 deletions
diff --git a/makefiledir/Makefile.config_writer b/makefiledir/Makefile.config_writer
deleted file mode 100644
index a956d9e62..000000000
--- a/makefiledir/Makefile.config_writer
+++ /dev/null
@@ -1,111 +0,0 @@
-# This file generates Makefile.config
-# Create default config from autodetected values
-# Magic at work, note that you can't use commas in arguments for this
-CONFIG_LINE=@$(SHELL) -c 'echo $(1)' >> $(MAKE_CONFIG) 2> /dev/null
-
-$(MAKE_CONFIG):
-
- touch $(MAKE_CONFIG)
-
- $(call CONFIG_LINE,\# OpenTTD config file for makefile)
- $(call CONFIG_LINE,\# Set your options here - 1 for use and empty for disable)
- $(call CONFIG_LINE,)
-
- $(call CONFIG_LINE,\# User setup flags)
- $(call CONFIG_LINE,\# Translator: adds TODO to any untranslated strings)
- $(call CONFIG_LINE,\# MIDI: sets path to midi player)
- $(call CONFIG_LINE,\# MIDI_ARG: sets an argument which is used when calling the midi player. Default off)
- $(call CONFIG_LINE,\# SUPRESS_LANG_ERRORS: supresses output about missing and mismatched strings)
- $(call CONFIG_LINE,\# WITH_NETWORK: makes OpenTTD able to play multiplayer using TCP and UDP)
- $(call CONFIG_LINE,\# DEDICATED: compiles a dedicated server. This one can only host using a CLI, but do not need SDL)
- $(call CONFIG_LINE,STATIC:=$(STATIC))
- $(call CONFIG_LINE,TRANSLATOR:=$(TRANSLATOR))
- $(call CONFIG_LINE,DEBUG:=$(DEBUG))
- $(call CONFIG_LINE,PROFILE:=$(PROFILE))
- $(call CONFIG_LINE,MIDI:=$(MIDI))
- $(call CONFIG_LINE,MIDI_ARG:=$(MIDI_ARG))
- $(call CONFIG_LINE,SUPRESS_LANG_ERRORS:=$(SUPRESS_LANG_ERRORS))
- $(call CONFIG_LINE,WITH_DIRECTMUSIC:=$(WITH_DIRECTMUSIC))
- $(call CONFIG_LINE,WITH_NETWORK:=$(WITH_NETWORK))
- $(call CONFIG_LINE,DEDICATED:=$(DEDICATED))
- $(call CONFIG_LINE,)
-
- $(call CONFIG_LINE,\# Disable asserts. Leave them on for easier bug finding)
- $(call CONFIG_LINE,DISABLE_ASSERTS:=$(DISABLE_ASSERTS))
- $(call CONFIG_LINE,\# Disable threads. Useful if you do not like it and for testing)
- $(call CONFIG_LINE,NO_THREADS:=$(NO_THREADS))
- $(call CONFIG_LINE,)
-
- $(call CONFIG_LINE,\# See Makefile for details on these paths)
- $(call CONFIG_LINE,\# Folders should not end with /)
- $(call CONFIG_LINE,INSTALL:=$(INSTALL))
- $(call CONFIG_LINE,PREFIX:=$(PREFIX))
- $(call CONFIG_LINE,BINARY_DIR:=$(BINARY_DIR))
- $(call CONFIG_LINE,DATA_DIR:=$(DATA_DIR))
- $(call CONFIG_LINE,ICON_DIR:=$(ICON_DIR))
- $(call CONFIG_LINE,USE_HOMEDIR:=$(USE_HOMEDIR))
- $(call CONFIG_LINE,PERSONAL_DIR:=$(PERSONAL_DIR))
- $(call CONFIG_LINE,SECOND_DATA_PATH:=$(SECOND_DATA_PATH))
- $(call CONFIG_LINE,CUSTOM_LANG_PATH:=$(CUSTOM_LANG_PATH))
- $(call CONFIG_LINE,)
-
- $(call CONFIG_LINE,\# Flag to skip test for OS when building static)
- $(call CONFIG_LINE,\# OpenTTD have only been succesfully tested with static builds on MorphOS and MacOSX)
- $(call CONFIG_LINE,\# If you want to try anyway on other OSes, set this flag)
- $(call CONFIG_LINE,\# Inform us if you have success)
- $(call CONFIG_LINE,SKIP_STATIC_CHECK:=$(SKIP_STATIC_CHECK))
- $(call CONFIG_LINE,)
- $(call CONFIG_LINE,)
-
- $(call CONFIG_LINE,\# Everything below this line is autogenerated)
- $(call CONFIG_LINE,\#)
- $(call CONFIG_LINE,\# If you need to change anything below, you should run "make upgradeconf")
- $(call CONFIG_LINE,\# If that does not fix the problem, you should make a bug report.)
- $(call CONFIG_LINE,\# It would really help if you could tell how to autodetect the missing setting)
- $(call CONFIG_LINE,\# That info could be where the missing lib is placed)
- $(call CONFIG_LINE,)
-
- $(call CONFIG_LINE,\# Libs)
- $(call CONFIG_LINE,WITH_ZLIB:=$(WITH_ZLIB))
- $(call CONFIG_LINE,WITH_SDL:=$(WITH_SDL))
- $(call CONFIG_LINE,WITH_PNG:=$(WITH_PNG))
- $(call CONFIG_LINE,WITH_ICONV:=$(WITH_ICONV))
- $(call CONFIG_LINE,WITH_ICONV_PATH:=$(WITH_ICONV_PATH))
- $(call CONFIG_LINE,STATIC_ZLIB_PATH:=$(STATIC_ZLIB_PATH))
- $(call CONFIG_LINE,WITH_COCOA:=$(WITH_COCOA))
- $(call CONFIG_LINE,WITH_FREETYPE:=$(WITH_FREETYPE))
- $(call CONFIG_LINE,WITH_FONTCONFIG:=$(WITH_FONTCONFIG))
- $(call CONFIG_LINE,)
-
- $(call CONFIG_LINE,\# OS flags)
- $(call CONFIG_LINE,WIN32:=$(WIN32))
- $(call CONFIG_LINE,UNIX:=$(UNIX))
- $(call CONFIG_LINE,OSX:=$(OSX))
- $(call CONFIG_LINE,FREEBSD:=$(FREEBSD))
- $(call CONFIG_LINE,MORPHOS:=$(MORPHOS))
- $(call CONFIG_LINE,BEOS:=$(BEOS))
- $(call CONFIG_LINE,OS2:=$(OS2))
- $(call CONFIG_LINE,SUNOS:=$(SUNOS))
- $(call CONFIG_LINE,CYGWIN:=$(CYGWIN))
- $(call CONFIG_LINE,MINGW:=$(MINGW))
- $(call CONFIG_LINE,)
-
- $(call CONFIG_LINE,\# For cross-compiling)
- $(call CONFIG_LINE,CC_TARGET:=$(CC_TARGET))
- $(call CONFIG_LINE,CC_HOST:=$(CC_HOST))
- $(call CONFIG_LINE,CXX_TARGET:=$(CXX_TARGET))
- $(call CONFIG_LINE,CXX_HOST:=$(CXX_HOST))
- $(call CONFIG_LINE,CFLAGS_HOST:=$(CFLAGS_HOST))
- $(call CONFIG_LINE,WINDRES:=$(WINDRES))
- $(call CONFIG_LINE,ENDIAN_FORCE:=$(ENDIAN_FORCE))
- $(call CONFIG_LINE,)
-
- $(call CONFIG_LINE,\# misc)
- $(call CONFIG_LINE,SDL_CONFIG:=$(SDL_CONFIG))
- $(call CONFIG_LINE,LIBPNG_CONFIG:=$(LIBPNG_CONFIG))
- $(call CONFIG_LINE,FREETYPE_CONFIG:=$(FREETYPE_CONFIG))
- $(call CONFIG_LINE,FONTCONFIG_CONFIG:=$(FONTCONFIG_CONFIG))
- $(call CONFIG_LINE,BEOS_NET_SERVER:=$(BEOS_NET_SERVER))
- $(call CONFIG_LINE,CONFIG_INCLUDED:=yes)
- $(call CONFIG_LINE,PATH_SET:=$(PATH_SET))
- $(call CONFIG_LINE,CONFIG_VERSION:=$(MAKEFILE_VERSION))
diff --git a/makefiledir/Makefile.libdetection b/makefiledir/Makefile.libdetection
deleted file mode 100644
index eb38ffd47..000000000
--- a/makefiledir/Makefile.libdetection
+++ /dev/null
@@ -1,149 +0,0 @@
-# this file detects what OS and libs the computer have/are running
-
-ifndef CONFIG_VERSION
-CONFIG_VERSION:=0
-endif
-
-ifeq ($(shell expr $(CONFIG_VERSION) \< 9), 1)
-
-ifndef BYPASS_OS_DETECT
-
-# Automatically recognize if building on Win32
-ifdef WINDIR
-ifndef UNIX
-WIN32:=1
-CYGWIN:=1
-MINGW:=1
-STATIC:=1
-SKIP_STATIC_CHECK:=1
-endif
-else
-UNIX:=1
-endif
-
-# Automatically recognize if building on FreeBSD
-ifeq ($(shell uname),FreeBSD)
-FREEBSD:=1
-endif
-
-# Automatically recognize if building on MacOSX
-ifeq ($(shell uname), Darwin)
-OSX:=1
-# OSX uses the unix setup too
-UNIX:=1
-endif
-
-# Automatically recognize if building on MorphOS
-ifeq ($(shell uname), MorphOS)
-MORPHOS:=1
-# MorphOS uses UNIX setup too
-UNIX:=1
-endif
-
-# Automatically recognize if building on BeOS
-ifeq ($(shell uname), BeOS)
-BEOS:=1
-# BeOS uses UNIX setup too
-UNIX:=1
-# Except that in BeOS 5.0 we need to use net_server, not BONE networking
-ifeq ($(shell uname -r), 5.0)
-BEOS_NET_SERVER:=1
-endif
-endif
-
-# Automatically recognize if building on SunOS/Solaris
-ifeq ($(shell uname), SunOS)
-SUNOS:=1
-# SunOS uses UNIX setup too
-UNIX:=1
-endif
-
-# END BYPASS_OS_DETECT
-endif
-
-SDL_CONFIG:=sdl-config
-
-# set libpng-config to the default value
-LIBPNG_CONFIG :=libpng-config
-
-# set freetype-config to the default value
-FREETYPE_CONFIG:=freetype-config
-
-# set pkg-config to the default value
-FONTCONFIG_CONFIG:=pkg-config fontconfig
-
-# Networking, enabled by default
-WITH_NETWORK:=1
-
-# Library detections
-WITH_SDL:=$(shell $(SDL_CONFIG) --version 2>/dev/null)
-
-# libpng detection
-WITH_PNG:=$(shell $(LIBPNG_CONFIG) --version 2>/dev/null)
-
-# Freetype detection
-WITH_FREETYPE:=$(shell $(FREETYPE_CONFIG) --ftversion 2>/dev/null)
-
-# fontconfig detection
-WITH_FONTCONFIG:=$(shell $(FONTCONFIG_CONFIG) --modversion 2>/dev/null)
-
-ifdef WITH_PNG
- # LibPNG depends on Zlib
- WITH_ZLIB:=1
-else
-# We go looking for zlib with a little hack
-WITH_ZLIB:=$(shell ls /usr/include | grep "zlib.h" 2>/dev/null) \
-$(shell ls /usr/local/include | grep "zlib.h" 2>/dev/null)
-ifdef WITH_ZLIB
-WITH_ZLIB:=1
-endif
-endif
-
-ifdef WITH_ZLIB
- TEMP:=$(shell ls /lib 2>/dev/null | grep "zlib.a")$(shell ls /lib 2>/dev/null | grep "libz.a")
- ifdef TEMP
- STATIC_ZLIB_PATH:=/lib/$(TEMP)
- else
- TEMP:=$(shell ls /usr/lib 2>/dev/null | grep "zlib.a")$(shell ls /usr/lib 2>/dev/null | grep "libz.a")
- ifdef TEMP
- STATIC_ZLIB_PATH:=/usr/lib/$(TEMP)
- else
- TEMP:=$(shell ls /usr/local/lib 2>/dev/null | grep "zlib.a")$(shell ls /usr/local/lib 2>/dev/null | grep "libz.a")
- ifdef TEMP
- STATIC_ZLIB_PATH:=/usr/local/lib/$(TEMP)
- endif
- endif
- endif
-endif
-
-# sets the default paths
-ifdef UNIX
-ifndef OSX
-ifndef MORPHOS
-ifndef BIN_DIR
-#BINARY_DIR:=
-#DATA_DIR_PREFIX:=
-#INSTALL_DIR:=/usr/local/
-#USE_HOMEDIR:=
-endif
-endif
-endif
-endif
-
-ifdef OSX
-# we prefer to use cocoa drivers rather than SDL drivers
-# if you really want SDL drivers, you can always modify Makefile.config
-ifndef DEDICATED
-WITH_COCOA:=1
-WITH_SDL:=
-endif
-endif
-
-
-# workaround
-# cygwin have problems with libpng, so we will just disable it for now until the problem is solved
-ifdef CYGWIN
-WITH_PNG:=
-endif
-
-endif