Makefile
author peter1138
Sun, 01 Oct 2006 12:00:32 +0000
changeset 4694 c917a3ad0dd2
parent 4656 9c1d8c4d3e60
child 4800 5afc1bfc7a85
permissions -rw-r--r--
(svn r6601) - Codechange: Support cargo subtypes in the refit window. The refit window has been altered to support resizing and scrolling. Note that the cargo subtype isn't yet passed for actual refitting yet. (Based on mart3p's patch)
2185
3df7d9081a29 (svn r2700) Insert Id tag into the Makefile
tron
parents: 2177
diff changeset
     1
# $Id$
3df7d9081a29 (svn r2700) Insert Id tag into the Makefile
tron
parents: 2177
diff changeset
     2
0
29654efe3188 (svn r1) Import of revision 975 of old (crashed) SVN
truelight
parents:
diff changeset
     3
##############################################################################
29654efe3188 (svn r1) Import of revision 975 of old (crashed) SVN
truelight
parents:
diff changeset
     4
#
29654efe3188 (svn r1) Import of revision 975 of old (crashed) SVN
truelight
parents:
diff changeset
     5
# Usage
29654efe3188 (svn r1) Import of revision 975 of old (crashed) SVN
truelight
parents:
diff changeset
     6
#
29654efe3188 (svn r1) Import of revision 975 of old (crashed) SVN
truelight
parents:
diff changeset
     7
29654efe3188 (svn r1) Import of revision 975 of old (crashed) SVN
truelight
parents:
diff changeset
     8
# Synopsis:
29654efe3188 (svn r1) Import of revision 975 of old (crashed) SVN
truelight
parents:
diff changeset
     9
#
29654efe3188 (svn r1) Import of revision 975 of old (crashed) SVN
truelight
parents:
diff changeset
    10
# make WITH_ZLIB=1 UNIX=1 MANUAL_CONFIG=1
29654efe3188 (svn r1) Import of revision 975 of old (crashed) SVN
truelight
parents:
diff changeset
    11
#
29654efe3188 (svn r1) Import of revision 975 of old (crashed) SVN
truelight
parents:
diff changeset
    12
# (See below for the list of possible options.)
29654efe3188 (svn r1) Import of revision 975 of old (crashed) SVN
truelight
parents:
diff changeset
    13
#
29654efe3188 (svn r1) Import of revision 975 of old (crashed) SVN
truelight
parents:
diff changeset
    14
# Alternately, you can run make without the MANUAL_CONFIG part. It then
29654efe3188 (svn r1) Import of revision 975 of old (crashed) SVN
truelight
parents:
diff changeset
    15
# generates Makefile.config, where you can customize all the options.
29654efe3188 (svn r1) Import of revision 975 of old (crashed) SVN
truelight
parents:
diff changeset
    16
# However beware that for all subsequent calls the option values from
29654efe3188 (svn r1) Import of revision 975 of old (crashed) SVN
truelight
parents:
diff changeset
    17
# Makefile.config take precedence to the commandline options.
29654efe3188 (svn r1) Import of revision 975 of old (crashed) SVN
truelight
parents:
diff changeset
    18
#
29654efe3188 (svn r1) Import of revision 975 of old (crashed) SVN
truelight
parents:
diff changeset
    19
# (That means that you probably want to either specify the options on command
29654efe3188 (svn r1) Import of revision 975 of old (crashed) SVN
truelight
parents:
diff changeset
    20
# line together with MANUAL_CONFIG=1 or you want to specify no commandline
29654efe3188 (svn r1) Import of revision 975 of old (crashed) SVN
truelight
parents:
diff changeset
    21
# options at all.)
29654efe3188 (svn r1) Import of revision 975 of old (crashed) SVN
truelight
parents:
diff changeset
    22
29654efe3188 (svn r1) Import of revision 975 of old (crashed) SVN
truelight
parents:
diff changeset
    23
# Targets:
29654efe3188 (svn r1) Import of revision 975 of old (crashed) SVN
truelight
parents:
diff changeset
    24
#
29654efe3188 (svn r1) Import of revision 975 of old (crashed) SVN
truelight
parents:
diff changeset
    25
# Defaults to building binary
29654efe3188 (svn r1) Import of revision 975 of old (crashed) SVN
truelight
parents:
diff changeset
    26
# clean: remove intermediate build files
29654efe3188 (svn r1) Import of revision 975 of old (crashed) SVN
truelight
parents:
diff changeset
    27
# mrproper: remove intermediate files and makefile configuration
29654efe3188 (svn r1) Import of revision 975 of old (crashed) SVN
truelight
parents:
diff changeset
    28
# upgradeconf: add new options to old Makefile.config
29654efe3188 (svn r1) Import of revision 975 of old (crashed) SVN
truelight
parents:
diff changeset
    29
# osx: OS X application
563
a6ef8e441cd6 (svn r972) Makefile: added make release (currently only works on mac)
bjarni
parents: 561
diff changeset
    30
# release: used by OSX to make a dmg file ready to release
0
29654efe3188 (svn r1) Import of revision 975 of old (crashed) SVN
truelight
parents:
diff changeset
    31
29654efe3188 (svn r1) Import of revision 975 of old (crashed) SVN
truelight
parents:
diff changeset
    32
# Options:
29654efe3188 (svn r1) Import of revision 975 of old (crashed) SVN
truelight
parents:
diff changeset
    33
#
29654efe3188 (svn r1) Import of revision 975 of old (crashed) SVN
truelight
parents:
diff changeset
    34
# Summary of OS choice defines
29654efe3188 (svn r1) Import of revision 975 of old (crashed) SVN
truelight
parents:
diff changeset
    35
# WIN32: building on Windows
29654efe3188 (svn r1) Import of revision 975 of old (crashed) SVN
truelight
parents:
diff changeset
    36
# UNIX: building on *nix derivate (Linux, FreeBSD)
29654efe3188 (svn r1) Import of revision 975 of old (crashed) SVN
truelight
parents:
diff changeset
    37
# OSX: building on Mac OS X
29654efe3188 (svn r1) Import of revision 975 of old (crashed) SVN
truelight
parents:
diff changeset
    38
# MORPHOS: building on MorphOS
421
3dd9b5a439af (svn r619) Add the necessary bits to make building under BeOS using GNU Make work
tron
parents: 413
diff changeset
    39
# BEOS: building on BeOS
446
7a92ca9738e2 (svn r655) Add the necessary bits to make building on SunOS/Solaris work
tron
parents: 421
diff changeset
    40
# SUNOS: building on SunOS (Solaris)
0
29654efe3188 (svn r1) Import of revision 975 of old (crashed) SVN
truelight
parents:
diff changeset
    41
#
29654efe3188 (svn r1) Import of revision 975 of old (crashed) SVN
truelight
parents:
diff changeset
    42
# Summary of library choice defines
29654efe3188 (svn r1) Import of revision 975 of old (crashed) SVN
truelight
parents:
diff changeset
    43
# WITH_ZLIB: savegames using zlib
29654efe3188 (svn r1) Import of revision 975 of old (crashed) SVN
truelight
parents:
diff changeset
    44
# WITH_PNG: screenshots using PNG
29654efe3188 (svn r1) Import of revision 975 of old (crashed) SVN
truelight
parents:
diff changeset
    45
# WITH_SDL: SDL video driver support
2736
3d6487cbbb69 (svn r3281) -Feature: [OSX] added native cocoa sound and video drivers (egladil)
bjarni
parents: 2735
diff changeset
    46
# WITH_COCOA: Cocoa video driver support
0
29654efe3188 (svn r1) Import of revision 975 of old (crashed) SVN
truelight
parents:
diff changeset
    47
#
29654efe3188 (svn r1) Import of revision 975 of old (crashed) SVN
truelight
parents:
diff changeset
    48
# Summary of other defines:
29654efe3188 (svn r1) Import of revision 975 of old (crashed) SVN
truelight
parents:
diff changeset
    49
# DEBUG: build in debug mode
29654efe3188 (svn r1) Import of revision 975 of old (crashed) SVN
truelight
parents:
diff changeset
    50
# PROFILE: build in profile mode, disables -s and -fomit-frame-pointer
29654efe3188 (svn r1) Import of revision 975 of old (crashed) SVN
truelight
parents:
diff changeset
    51
# TRANSLATOR: build in translator mode (untranslated strings are prepended by
29654efe3188 (svn r1) Import of revision 975 of old (crashed) SVN
truelight
parents:
diff changeset
    52
#             a <TODO> mark)
29654efe3188 (svn r1) Import of revision 975 of old (crashed) SVN
truelight
parents:
diff changeset
    53
# RELEASE: this will be the released version number. It replaces all places
29654efe3188 (svn r1) Import of revision 975 of old (crashed) SVN
truelight
parents:
diff changeset
    54
#          where it normally would print the revision number
222
b88456001397 (svn r223) -Fix: Const correctness and miscellaneous fixes. Thank you Tron for your diligent fixing of warnings (and some possibly bugs) (Tron)
darkvater
parents: 221
diff changeset
    55
# MIDI: if set, it will use it as custom path to midi player.
1584
7122e759d56c (svn r2088) - Fix: [ 1155158 ] Make extmidi command a config option in addition to the compile-time MIDI switch. Patch by macbaine.
pasky
parents: 1542
diff changeset
    56
#       If unset, it will use the hardcoded path in the c code
7122e759d56c (svn r2088) - Fix: [ 1155158 ] Make extmidi command a config option in addition to the compile-time MIDI switch. Patch by macbaine.
pasky
parents: 1542
diff changeset
    57
#       This can still be overriden by the music.extmidi openttd.cfg option.
2197
ffa3d1f9d1be (svn r2712) Overhaul DirectMusic MIDI backend:
tron
parents: 2189
diff changeset
    58
# WITH_DIRECTMUSIC: enable DirectMusic MIDI support
804
3288a1c6d133 (svn r1274) Makefile: networking is not longer experimental
bjarni
parents: 798
diff changeset
    59
# WITH_NETWORK: enable networking
3288a1c6d133 (svn r1274) Makefile: networking is not longer experimental
bjarni
parents: 798
diff changeset
    60
# DEDICATED: allows compilation on UNIX without SDL. Useful for dedicated servers
0
29654efe3188 (svn r1) Import of revision 975 of old (crashed) SVN
truelight
parents:
diff changeset
    61
#
285
cf5213c8a919 (svn r291) Minor fix to english.txt
bjarni
parents: 222
diff changeset
    62
# Paths:
cf5213c8a919 (svn r291) Minor fix to english.txt
bjarni
parents: 222
diff changeset
    63
# INSTALL: If not set, the game uses the directory of the binary to
543
946badd71033 (svn r942) -Merged branch/network back into the trunk
truelight
parents: 532
diff changeset
    64
# store everything (lang, data, gm, save and openttd.cfg), this is the `old' behaviour.
285
cf5213c8a919 (svn r291) Minor fix to english.txt
bjarni
parents: 222
diff changeset
    65
# In this case, none of the following paths are used, you also should _not_
cf5213c8a919 (svn r291) Minor fix to english.txt
bjarni
parents: 222
diff changeset
    66
# use `make install', but copy the required stuff yourself (or just play out
cf5213c8a919 (svn r291) Minor fix to english.txt
bjarni
parents: 222
diff changeset
    67
# of you source directory, which should work fine).
cf5213c8a919 (svn r291) Minor fix to english.txt
bjarni
parents: 222
diff changeset
    68
# If you want to use `make install' to install the game globally, you should
cf5213c8a919 (svn r291) Minor fix to english.txt
bjarni
parents: 222
diff changeset
    69
# define it _before_ you build the game. If you only define INSTALL when you
cf5213c8a919 (svn r291) Minor fix to english.txt
bjarni
parents: 222
diff changeset
    70
# do `make install', the game won't be able to find it's files (so you should
cf5213c8a919 (svn r291) Minor fix to english.txt
bjarni
parents: 222
diff changeset
    71
# also define all the following paths before building).
cf5213c8a919 (svn r291) Minor fix to english.txt
bjarni
parents: 222
diff changeset
    72
#
cf5213c8a919 (svn r291) Minor fix to english.txt
bjarni
parents: 222
diff changeset
    73
# So, the following paths should be defined if INSTALL is defined.
cf5213c8a919 (svn r291) Minor fix to english.txt
bjarni
parents: 222
diff changeset
    74
# None of these paths have to end with /
cf5213c8a919 (svn r291) Minor fix to english.txt
bjarni
parents: 222
diff changeset
    75
# PREFIX:	Normally /usr/local
cf5213c8a919 (svn r291) Minor fix to english.txt
bjarni
parents: 222
diff changeset
    76
# BINARY_DIR:	The location of the binary, normally games. (Will be prefixed
cf5213c8a919 (svn r291) Minor fix to english.txt
bjarni
parents: 222
diff changeset
    77
#		with $PREFIX)
1865
739183b1243a (svn r2371) - Fix: [ 1144510 ] make install tries to install scenarios in the (non-existing) personal dir when USE_HOMEDIR is specified.
matthijs
parents: 1829
diff changeset
    78
# DATA_DIR: 	The location of the data (lang, data, gm and scenario), normally
739183b1243a (svn r2371) - Fix: [ 1144510 ] make install tries to install scenarios in the (non-existing) personal dir when USE_HOMEDIR is specified.
matthijs
parents: 1829
diff changeset
    79
#		share/games/openttd. (Will be prefixed with $PREFIX) Note that scenarios
739183b1243a (svn r2371) - Fix: [ 1144510 ] make install tries to install scenarios in the (non-existing) personal dir when USE_HOMEDIR is specified.
matthijs
parents: 1829
diff changeset
    80
#		are only put here if USE_HOMEDIR is true, otherwise they are placed in
739183b1243a (svn r2371) - Fix: [ 1144510 ] make install tries to install scenarios in the (non-existing) personal dir when USE_HOMEDIR is specified.
matthijs
parents: 1829
diff changeset
    81
#		PERSONAL_DIR/scenario
2901
c9a1a969b017 (svn r3456) - Feature: [Makefile] Icons can now be installed in a seperate directory.
matthijs
parents: 2835
diff changeset
    82
# ICON_DIR:   The location of the openttd icon. (Will be prefixed with
c9a1a969b017 (svn r3456) - Feature: [Makefile] Icons can now be installed in a seperate directory.
matthijs
parents: 2835
diff changeset
    83
# 	$PREFIX).
285
cf5213c8a919 (svn r291) Minor fix to english.txt
bjarni
parents: 222
diff changeset
    84
# PERSONAL_DIR:	The directory where openttd.cfg and the save folder will be
cf5213c8a919 (svn r291) Minor fix to english.txt
bjarni
parents: 222
diff changeset
    85
#		stored. You cannot use ~ here, define USE_HOMEDIR for that.
cf5213c8a919 (svn r291) Minor fix to english.txt
bjarni
parents: 222
diff changeset
    86
# USE_HOMEDIR:	If this variable is set, PERSONAL_DIR will be prefixed with
cf5213c8a919 (svn r291) Minor fix to english.txt
bjarni
parents: 222
diff changeset
    87
#		~/ at runtime (the user's homedir)
561
9a0c469a251c (svn r970) Added 2nd data path for all non-windows OSes
bjarni
parents: 551
diff changeset
    88
# SECOND_DATA_PATH  Use this data dir if a file is not found in the data dir in the data path
1251
c833ce273512 (svn r1755) Trim trailing whitespace
tron
parents: 1247
diff changeset
    89
# CUSTOM_LANG_PATH  If this is set, it will use the path given to search for lng files
561
9a0c469a251c (svn r970) Added 2nd data path for all non-windows OSes
bjarni
parents: 551
diff changeset
    90
#		instead of the lang dir in the data path
9a0c469a251c (svn r970) Added 2nd data path for all non-windows OSes
bjarni
parents: 551
diff changeset
    91
#   NOTE: both SECOND_DATA_PATH and CUSTOM_LANG_PATH uses paths relative to where OTTD is opened
285
cf5213c8a919 (svn r291) Minor fix to english.txt
bjarni
parents: 222
diff changeset
    92
#
cf5213c8a919 (svn r291) Minor fix to english.txt
bjarni
parents: 222
diff changeset
    93
# DEST_DIR:	make install will use this directory instead of the filesystem
cf5213c8a919 (svn r291) Minor fix to english.txt
bjarni
parents: 222
diff changeset
    94
# 		root to install its files. This should normally not be used by
cf5213c8a919 (svn r291) Minor fix to english.txt
bjarni
parents: 222
diff changeset
    95
# 		ordinary users, currently it is only used for the debian
cf5213c8a919 (svn r291) Minor fix to english.txt
bjarni
parents: 222
diff changeset
    96
# 		packaging. This value should only be set when calling `make
cf5213c8a919 (svn r291) Minor fix to english.txt
bjarni
parents: 222
diff changeset
    97
# 		install' and is not saved in Makefile.config
1476
c1e4ba7193db (svn r1980) Check $DESTDIR if $DEST_DIR was not set.
pasky
parents: 1435
diff changeset
    98
#               (Note that DESTDIR is checked if DEST_DIR is not set.)
0
29654efe3188 (svn r1) Import of revision 975 of old (crashed) SVN
truelight
parents:
diff changeset
    99
#
29654efe3188 (svn r1) Import of revision 975 of old (crashed) SVN
truelight
parents:
diff changeset
   100
# STATIC: link statically
29654efe3188 (svn r1) Import of revision 975 of old (crashed) SVN
truelight
parents:
diff changeset
   101
# CYGWIN: build in Cygwin environment
29654efe3188 (svn r1) Import of revision 975 of old (crashed) SVN
truelight
parents:
diff changeset
   102
# MINGW: build with MingW compiler, link with MingW libraries
29654efe3188 (svn r1) Import of revision 975 of old (crashed) SVN
truelight
parents:
diff changeset
   103
#
1411
2ff543ac50a7 (svn r1915) Support for a VERBOSE flag which will make the full compiler invocations to be shown instead of ===> Brief summaries.
pasky
parents: 1324
diff changeset
   104
# VERBOSE: show full compiler invocations instead of brief progress messages
2ff543ac50a7 (svn r1915) Support for a VERBOSE flag which will make the full compiler invocations to be shown instead of ===> Brief summaries.
pasky
parents: 1324
diff changeset
   105
#
1692
0b52df38cabc (svn r2196) -Change: updated the Makefile, now it works for crossplatform compiling
TrueLight
parents: 1629
diff changeset
   106
# Special for crosscompiling there are some commands available:
0b52df38cabc (svn r2196) -Change: updated the Makefile, now it works for crossplatform compiling
TrueLight
parents: 1629
diff changeset
   107
#
3085
d56874235364 (svn r3674) -Feature: [OSX] Added support for tripple binaries (binaries optimised for G3, G5 and i686)
bjarni
parents: 3084
diff changeset
   108
# UNIVERSAL_BINARY: builds a universal binary for OSX. Make sure you got both PPC and x86 libs. Only works with GCC 4 or newer
3212
39c32be8404c (svn r3884) renamed TRIPPLE_BINARY to TRIPLE_BINARY
bjarni
parents: 3211
diff changeset
   109
# TRIPLE_BINARY: builds a universal binary with the addition of code optimised for G5 (which means a total of 3 binaries in one file)
3354
245157a5eafe (svn r4149) -Codechange: [OSX] rewrite of how universal binaries are compiled
bjarni
parents: 3341
diff changeset
   110
# OTTD_PPC, OTTD_PPC970, OTTD_i386: compile for target architecture.
245157a5eafe (svn r4149) -Codechange: [OSX] rewrite of how universal binaries are compiled
bjarni
parents: 3341
diff changeset
   111
#    Multiple flags can be used so OTTD_PPC:=1 OTTD_i386:=1 produces the same result as UNIVERSAL_BINARY
2834
edb722907b73 (svn r3382) -Feature: [OSX] added the flag JAGUAR to crosscompile for OSX 10.2.8 on 10.4
bjarni
parents: 2800
diff changeset
   112
#
edb722907b73 (svn r3382) -Feature: [OSX] added the flag JAGUAR to crosscompile for OSX 10.2.8 on 10.4
bjarni
parents: 2800
diff changeset
   113
# JAGUAR: Crosscompiling for OSX 1.2.8 (codenamed Jaguar). Only works if OSX is defined too. Only works with GCC 4 or newer
edb722907b73 (svn r3382) -Feature: [OSX] added the flag JAGUAR to crosscompile for OSX 10.2.8 on 10.4
bjarni
parents: 2800
diff changeset
   114
#	This can be changed to any PPC version of OSX by changing the ppc flags in Makefile.config
2713
9c42385e4f41 (svn r3258) -Feature: [OSX] added support for universal binaries
bjarni
parents: 2712
diff changeset
   115
#
2719
75b0750edccf (svn r3264) -Codechange: [OSX] OSX targets will now always use the preprocessor to determine endianess
bjarni
parents: 2717
diff changeset
   116
# ENDIAN_FORCE: forces the endian-check to give a certain result. Can be BE, LE or PREPROCESSOR.
75b0750edccf (svn r3264) -Codechange: [OSX] OSX targets will now always use the preprocessor to determine endianess
bjarni
parents: 2717
diff changeset
   117
#	PREPROCESSOR is always used on all OSX targets and will make the preprocessor pick the right endian.
75b0750edccf (svn r3264) -Codechange: [OSX] OSX targets will now always use the preprocessor to determine endianess
bjarni
parents: 2717
diff changeset
   118
#	this means that you don't have to think about endianess when compiling for OSX.
75b0750edccf (svn r3264) -Codechange: [OSX] OSX targets will now always use the preprocessor to determine endianess
bjarni
parents: 2717
diff changeset
   119
#	Very useful for universal binaries and crosscompilers. Not sure if it works on non OSX targets
1692
0b52df38cabc (svn r2196) -Change: updated the Makefile, now it works for crossplatform compiling
TrueLight
parents: 1629
diff changeset
   120
# WINDRES: the location of your windres
0b52df38cabc (svn r2196) -Change: updated the Makefile, now it works for crossplatform compiling
TrueLight
parents: 1629
diff changeset
   121
# CC_HOST: the gcc of your localhost if you are making a target that produces incompatible executables
0b52df38cabc (svn r2196) -Change: updated the Makefile, now it works for crossplatform compiling
TrueLight
parents: 1629
diff changeset
   122
# CFLAGS_HOST: cflags used for CC_HOST. Make it something if you are getting errors when you try to compi
0b52df38cabc (svn r2196) -Change: updated the Makefile, now it works for crossplatform compiling
TrueLight
parents: 1629
diff changeset
   123
#		windows executables on linux. (just: CFLAGS_HOST:='-I' or something)
0
29654efe3188 (svn r1) Import of revision 975 of old (crashed) SVN
truelight
parents:
diff changeset
   124
29654efe3188 (svn r1) Import of revision 975 of old (crashed) SVN
truelight
parents:
diff changeset
   125
29654efe3188 (svn r1) Import of revision 975 of old (crashed) SVN
truelight
parents:
diff changeset
   126
##############################################################################
29654efe3188 (svn r1) Import of revision 975 of old (crashed) SVN
truelight
parents:
diff changeset
   127
#
29654efe3188 (svn r1) Import of revision 975 of old (crashed) SVN
truelight
parents:
diff changeset
   128
# Configuration
29654efe3188 (svn r1) Import of revision 975 of old (crashed) SVN
truelight
parents:
diff changeset
   129
#
29654efe3188 (svn r1) Import of revision 975 of old (crashed) SVN
truelight
parents:
diff changeset
   130
1148
c7ffa9f5adc1 (svn r1649) Makefile: added known-bugs.txt to mac and MorphOS release scripts and made a really dirty hack to force 0.3.6 on binary files compiled with this makefile
bjarni
parents: 1146
diff changeset
   131
180
47ee14fe2b35 (svn r181) Makefile: enabled ability to supress output of missing strings in lng files
bjarni
parents: 164
diff changeset
   132
# Makefile version tag
1492
311c5770360e (svn r1996) makefile.config -> Makefile.config, that's its name.
pasky
parents: 1491
diff changeset
   133
# it checks if the version tag in Makefile.config is the same and force update outdated config files
3354
245157a5eafe (svn r4149) -Codechange: [OSX] rewrite of how universal binaries are compiled
bjarni
parents: 3341
diff changeset
   134
MAKEFILE_VERSION:=10
180
47ee14fe2b35 (svn r181) Makefile: enabled ability to supress output of missing strings in lng files
bjarni
parents: 164
diff changeset
   135
0
29654efe3188 (svn r1) Import of revision 975 of old (crashed) SVN
truelight
parents:
diff changeset
   136
# Automatic configuration
29654efe3188 (svn r1) Import of revision 975 of old (crashed) SVN
truelight
parents:
diff changeset
   137
MAKE_CONFIG:=Makefile.config
29654efe3188 (svn r1) Import of revision 975 of old (crashed) SVN
truelight
parents:
diff changeset
   138
MAKEFILE:=Makefile
29654efe3188 (svn r1) Import of revision 975 of old (crashed) SVN
truelight
parents:
diff changeset
   139
LIB_DETECTION=makefiledir/Makefile.libdetection
29654efe3188 (svn r1) Import of revision 975 of old (crashed) SVN
truelight
parents:
diff changeset
   140
CONFIG_WRITER=makefiledir/Makefile.config_writer
29654efe3188 (svn r1) Import of revision 975 of old (crashed) SVN
truelight
parents:
diff changeset
   141
29654efe3188 (svn r1) Import of revision 975 of old (crashed) SVN
truelight
parents:
diff changeset
   142
# Apply automatic configuration
29654efe3188 (svn r1) Import of revision 975 of old (crashed) SVN
truelight
parents:
diff changeset
   143
# See target section for how this is built, suppress errors
29654efe3188 (svn r1) Import of revision 975 of old (crashed) SVN
truelight
parents:
diff changeset
   144
# since first time it isn't found but make reads this twice
29654efe3188 (svn r1) Import of revision 975 of old (crashed) SVN
truelight
parents:
diff changeset
   145
-include $(MAKE_CONFIG)
29654efe3188 (svn r1) Import of revision 975 of old (crashed) SVN
truelight
parents:
diff changeset
   146
1955
793bb2e9f1d3 (svn r2461) -Feature [Makefile] libpng-config can now be called something else in Makefile.config
bjarni
parents: 1952
diff changeset
   147
1492
311c5770360e (svn r1996) makefile.config -> Makefile.config, that's its name.
pasky
parents: 1491
diff changeset
   148
# updates Makefile.config if it's outdated
180
47ee14fe2b35 (svn r181) Makefile: enabled ability to supress output of missing strings in lng files
bjarni
parents: 164
diff changeset
   149
ifneq ($(MAKEFILE_VERSION),$(CONFIG_VERSION))
1693
463d48b86526 (svn r2197) -fix [Makefile]: SDL_CONFIG from makefile.config is now not always overwritten
bjarni
parents: 1692
diff changeset
   150
	UPDATECONFIG:=upgradeconf
463d48b86526 (svn r2197) -fix [Makefile]: SDL_CONFIG from makefile.config is now not always overwritten
bjarni
parents: 1692
diff changeset
   151
	CONFIG_INCLUDED:=
0
29654efe3188 (svn r1) Import of revision 975 of old (crashed) SVN
truelight
parents:
diff changeset
   152
endif
29654efe3188 (svn r1) Import of revision 975 of old (crashed) SVN
truelight
parents:
diff changeset
   153
1492
311c5770360e (svn r1996) makefile.config -> Makefile.config, that's its name.
pasky
parents: 1491
diff changeset
   154
# this is used if there aren't any Makefile.config
0
29654efe3188 (svn r1) Import of revision 975 of old (crashed) SVN
truelight
parents:
diff changeset
   155
ifndef CONFIG_INCLUDED
285
cf5213c8a919 (svn r291) Minor fix to english.txt
bjarni
parents: 222
diff changeset
   156
# sets network on by default if there aren't any config file
543
946badd71033 (svn r942) -Merged branch/network back into the trunk
truelight
parents: 532
diff changeset
   157
ENABLE_NETWORK:=1
285
cf5213c8a919 (svn r291) Minor fix to english.txt
bjarni
parents: 222
diff changeset
   158
cf5213c8a919 (svn r291) Minor fix to english.txt
bjarni
parents: 222
diff changeset
   159
# paths for make install
cf5213c8a919 (svn r291) Minor fix to english.txt
bjarni
parents: 222
diff changeset
   160
# disabled as they would break it for some (many?) people if they were default
cf5213c8a919 (svn r291) Minor fix to english.txt
bjarni
parents: 222
diff changeset
   161
#PREFIX:=/usr/local
cf5213c8a919 (svn r291) Minor fix to english.txt
bjarni
parents: 222
diff changeset
   162
#DATA_DIR:=share/games/openttd
cf5213c8a919 (svn r291) Minor fix to english.txt
bjarni
parents: 222
diff changeset
   163
#BINARY_DIR:=games
cf5213c8a919 (svn r291) Minor fix to english.txt
bjarni
parents: 222
diff changeset
   164
#PERSONAL_DIR:=.openttd
cf5213c8a919 (svn r291) Minor fix to english.txt
bjarni
parents: 222
diff changeset
   165
#USE_HOMEDIR:=1
cf5213c8a919 (svn r291) Minor fix to english.txt
bjarni
parents: 222
diff changeset
   166
0
29654efe3188 (svn r1) Import of revision 975 of old (crashed) SVN
truelight
parents:
diff changeset
   167
-include $(LIB_DETECTION)
29654efe3188 (svn r1) Import of revision 975 of old (crashed) SVN
truelight
parents:
diff changeset
   168
endif
29654efe3188 (svn r1) Import of revision 975 of old (crashed) SVN
truelight
parents:
diff changeset
   169
180
47ee14fe2b35 (svn r181) Makefile: enabled ability to supress output of missing strings in lng files
bjarni
parents: 164
diff changeset
   170
ifdef SUPRESS_LANG_ERRORS
47ee14fe2b35 (svn r181) Makefile: enabled ability to supress output of missing strings in lng files
bjarni
parents: 164
diff changeset
   171
LANG_ERRORS =  >/dev/null 2>&1
47ee14fe2b35 (svn r181) Makefile: enabled ability to supress output of missing strings in lng files
bjarni
parents: 164
diff changeset
   172
endif
47ee14fe2b35 (svn r181) Makefile: enabled ability to supress output of missing strings in lng files
bjarni
parents: 164
diff changeset
   173
2722
d2ab10ffc5e7 (svn r3267) -Codechange: [OSX] universal binary makefile code cleanup
bjarni
parents: 2719
diff changeset
   174
ifdef OSX
3901
88d50f8030ce (svn r4989) -Fix: make the OSX Makefile stuff to work with the compile-farm
truelight
parents: 3900
diff changeset
   175
-include os/macosx/Makefile.setup
2722
d2ab10ffc5e7 (svn r3267) -Codechange: [OSX] universal binary makefile code cleanup
bjarni
parents: 2719
diff changeset
   176
endif
d2ab10ffc5e7 (svn r3267) -Codechange: [OSX] universal binary makefile code cleanup
bjarni
parents: 2719
diff changeset
   177
0
29654efe3188 (svn r1) Import of revision 975 of old (crashed) SVN
truelight
parents:
diff changeset
   178
ifdef STATIC
29654efe3188 (svn r1) Import of revision 975 of old (crashed) SVN
truelight
parents:
diff changeset
   179
ifndef WIN32
29654efe3188 (svn r1) Import of revision 975 of old (crashed) SVN
truelight
parents:
diff changeset
   180
ifndef OSX
29654efe3188 (svn r1) Import of revision 975 of old (crashed) SVN
truelight
parents:
diff changeset
   181
ifndef MORPHOS
29654efe3188 (svn r1) Import of revision 975 of old (crashed) SVN
truelight
parents:
diff changeset
   182
ifndef SKIP_STATIC_CHECK
1492
311c5770360e (svn r1996) makefile.config -> Makefile.config, that's its name.
pasky
parents: 1491
diff changeset
   183
$(error Static is only known to work on MorphOS and MacOSX!!! --- Check Makefile.config for more info and howto bypass this check)
0
29654efe3188 (svn r1) Import of revision 975 of old (crashed) SVN
truelight
parents:
diff changeset
   184
endif
29654efe3188 (svn r1) Import of revision 975 of old (crashed) SVN
truelight
parents:
diff changeset
   185
endif
29654efe3188 (svn r1) Import of revision 975 of old (crashed) SVN
truelight
parents:
diff changeset
   186
endif
29654efe3188 (svn r1) Import of revision 975 of old (crashed) SVN
truelight
parents:
diff changeset
   187
endif
29654efe3188 (svn r1) Import of revision 975 of old (crashed) SVN
truelight
parents:
diff changeset
   188
endif
29654efe3188 (svn r1) Import of revision 975 of old (crashed) SVN
truelight
parents:
diff changeset
   189
2736
3d6487cbbb69 (svn r3281) -Feature: [OSX] added native cocoa sound and video drivers (egladil)
bjarni
parents: 2735
diff changeset
   190
ifdef WITH_COCOA
3d6487cbbb69 (svn r3281) -Feature: [OSX] added native cocoa sound and video drivers (egladil)
bjarni
parents: 2735
diff changeset
   191
ifdef WITH_SDL
3d6487cbbb69 (svn r3281) -Feature: [OSX] added native cocoa sound and video drivers (egladil)
bjarni
parents: 2735
diff changeset
   192
$(error You can not use both the SDL video driver and the Cocoa video driver at the same time)
3d6487cbbb69 (svn r3281) -Feature: [OSX] added native cocoa sound and video drivers (egladil)
bjarni
parents: 2735
diff changeset
   193
endif
3d6487cbbb69 (svn r3281) -Feature: [OSX] added native cocoa sound and video drivers (egladil)
bjarni
parents: 2735
diff changeset
   194
ifdef DEDICATED
3d6487cbbb69 (svn r3281) -Feature: [OSX] added native cocoa sound and video drivers (egladil)
bjarni
parents: 2735
diff changeset
   195
$(error You can not use the Cocoa video driver in a dedicated server)
3d6487cbbb69 (svn r3281) -Feature: [OSX] added native cocoa sound and video drivers (egladil)
bjarni
parents: 2735
diff changeset
   196
endif
3d6487cbbb69 (svn r3281) -Feature: [OSX] added native cocoa sound and video drivers (egladil)
bjarni
parents: 2735
diff changeset
   197
else
0
29654efe3188 (svn r1) Import of revision 975 of old (crashed) SVN
truelight
parents:
diff changeset
   198
# Force SDL on UNIX platforms
29654efe3188 (svn r1) Import of revision 975 of old (crashed) SVN
truelight
parents:
diff changeset
   199
ifndef WITH_SDL
29654efe3188 (svn r1) Import of revision 975 of old (crashed) SVN
truelight
parents:
diff changeset
   200
ifdef UNIX
549
e48b65755929 (svn r949) Makefile: added DEDICATED flag to allow complilation of dedicated servers without linking to SDL. Request by Jezral
bjarni
parents: 543
diff changeset
   201
ifndef DEDICATED
e48b65755929 (svn r949) Makefile: added DEDICATED flag to allow complilation of dedicated servers without linking to SDL. Request by Jezral
bjarni
parents: 543
diff changeset
   202
$(error You need to have SDL installed in order to run OpenTTD on UNIX. Use DEDICATED if you want to compile a CLI based server)
0
29654efe3188 (svn r1) Import of revision 975 of old (crashed) SVN
truelight
parents:
diff changeset
   203
endif
29654efe3188 (svn r1) Import of revision 975 of old (crashed) SVN
truelight
parents:
diff changeset
   204
endif
549
e48b65755929 (svn r949) Makefile: added DEDICATED flag to allow complilation of dedicated servers without linking to SDL. Request by Jezral
bjarni
parents: 543
diff changeset
   205
endif
2736
3d6487cbbb69 (svn r3281) -Feature: [OSX] added native cocoa sound and video drivers (egladil)
bjarni
parents: 2735
diff changeset
   206
endif
549
e48b65755929 (svn r949) Makefile: added DEDICATED flag to allow complilation of dedicated servers without linking to SDL. Request by Jezral
bjarni
parents: 543
diff changeset
   207
1029
985407cedbbd (svn r1530) Makefilefix: now the binary never links to SDL if DEDICATED is set. Thanks to igor2code for making me aware of this issue even through I fixed it in a different way than his patch did. (I made dedicated never link to sdl, nomatter what makefile.config says)
bjarni
parents: 988
diff changeset
   208
# remove the dependancy for sdl if DEDICALTED is used
985407cedbbd (svn r1530) Makefilefix: now the binary never links to SDL if DEDICATED is set. Thanks to igor2code for making me aware of this issue even through I fixed it in a different way than his patch did. (I made dedicated never link to sdl, nomatter what makefile.config says)
bjarni
parents: 988
diff changeset
   209
ifdef DEDICATED
2779
0058526344b9 (svn r3326) - Fix: [ 1226832 ] Build fails if SDL is built without pthread support (dst)
Darkvater
parents: 2767
diff changeset
   210
	WITH_SDL:=
0058526344b9 (svn r3326) - Fix: [ 1226832 ] Build fails if SDL is built without pthread support (dst)
Darkvater
parents: 2767
diff changeset
   211
endif
0058526344b9 (svn r3326) - Fix: [ 1226832 ] Build fails if SDL is built without pthread support (dst)
Darkvater
parents: 2767
diff changeset
   212
0058526344b9 (svn r3326) - Fix: [ 1226832 ] Build fails if SDL is built without pthread support (dst)
Darkvater
parents: 2767
diff changeset
   213
# add -lpthread to LDFLAGS
2298
65fe3d67e7fb (svn r2822) -Fix: don't compile pthread for win32 dedicated servers
truelight
parents: 2291
diff changeset
   214
ifndef WIN32
2779
0058526344b9 (svn r3326) - Fix: [ 1226832 ] Build fails if SDL is built without pthread support (dst)
Darkvater
parents: 2767
diff changeset
   215
	ifndef MORPHOS
0058526344b9 (svn r3326) - Fix: [ 1226832 ] Build fails if SDL is built without pthread support (dst)
Darkvater
parents: 2767
diff changeset
   216
		ifndef OSX
0058526344b9 (svn r3326) - Fix: [ 1226832 ] Build fails if SDL is built without pthread support (dst)
Darkvater
parents: 2767
diff changeset
   217
			LDFLAGS+=-lpthread
0058526344b9 (svn r3326) - Fix: [ 1226832 ] Build fails if SDL is built without pthread support (dst)
Darkvater
parents: 2767
diff changeset
   218
		endif
0058526344b9 (svn r3326) - Fix: [ 1226832 ] Build fails if SDL is built without pthread support (dst)
Darkvater
parents: 2767
diff changeset
   219
	endif
1029
985407cedbbd (svn r1530) Makefilefix: now the binary never links to SDL if DEDICATED is set. Thanks to igor2code for making me aware of this issue even through I fixed it in a different way than his patch did. (I made dedicated never link to sdl, nomatter what makefile.config says)
bjarni
parents: 988
diff changeset
   220
endif
2779
0058526344b9 (svn r3326) - Fix: [ 1226832 ] Build fails if SDL is built without pthread support (dst)
Darkvater
parents: 2767
diff changeset
   221
2300
543211f07c9e (svn r2824) -Fix: OSX can now also produce dedicated servers
truelight
parents: 2299
diff changeset
   222
ifdef OSX
2779
0058526344b9 (svn r3326) - Fix: [ 1226832 ] Build fails if SDL is built without pthread support (dst)
Darkvater
parents: 2767
diff changeset
   223
	LDFLAGS+=-framework Cocoa
2300
543211f07c9e (svn r2824) -Fix: OSX can now also produce dedicated servers
truelight
parents: 2299
diff changeset
   224
endif
0
29654efe3188 (svn r1) Import of revision 975 of old (crashed) SVN
truelight
parents:
diff changeset
   225
3380
2d02cfdf6d14 (svn r4183) -Codechange: [Makefile]: removed MANUAL_CONFIG as it's not used anymore
bjarni
parents: 3355
diff changeset
   226
ifdef WITH_SDL
3406
ee3af0f1932b (svn r4217) Replace SDL-CONFIG and LIBPNG-CONFIG with SDL_CONFIG and LIBPNG_CONFIG
peter1138
parents: 3389
diff changeset
   227
	ifndef SDL_CONFIG
ee3af0f1932b (svn r4217) Replace SDL-CONFIG and LIBPNG-CONFIG with SDL_CONFIG and LIBPNG_CONFIG
peter1138
parents: 3389
diff changeset
   228
$(error WITH_SDL can't be used when SDL_CONFIG is not set. Edit Makefile.config to correct this)
3380
2d02cfdf6d14 (svn r4183) -Codechange: [Makefile]: removed MANUAL_CONFIG as it's not used anymore
bjarni
parents: 3355
diff changeset
   229
	endif
2d02cfdf6d14 (svn r4183) -Codechange: [Makefile]: removed MANUAL_CONFIG as it's not used anymore
bjarni
parents: 3355
diff changeset
   230
endif
2d02cfdf6d14 (svn r4183) -Codechange: [Makefile]: removed MANUAL_CONFIG as it's not used anymore
bjarni
parents: 3355
diff changeset
   231
2d02cfdf6d14 (svn r4183) -Codechange: [Makefile]: removed MANUAL_CONFIG as it's not used anymore
bjarni
parents: 3355
diff changeset
   232
ifdef WITH_PNG
3406
ee3af0f1932b (svn r4217) Replace SDL-CONFIG and LIBPNG-CONFIG with SDL_CONFIG and LIBPNG_CONFIG
peter1138
parents: 3389
diff changeset
   233
	ifndef LIBPNG_CONFIG
ee3af0f1932b (svn r4217) Replace SDL-CONFIG and LIBPNG-CONFIG with SDL_CONFIG and LIBPNG_CONFIG
peter1138
parents: 3389
diff changeset
   234
$(error WITH_PNG can't be used when LIBPNG_CONFIG is not set. Edit Makefile.config to correct this)
3380
2d02cfdf6d14 (svn r4183) -Codechange: [Makefile]: removed MANUAL_CONFIG as it's not used anymore
bjarni
parents: 3355
diff changeset
   235
	endif
2d02cfdf6d14 (svn r4183) -Codechange: [Makefile]: removed MANUAL_CONFIG as it's not used anymore
bjarni
parents: 3355
diff changeset
   236
endif
0
29654efe3188 (svn r1) Import of revision 975 of old (crashed) SVN
truelight
parents:
diff changeset
   237
29654efe3188 (svn r1) Import of revision 975 of old (crashed) SVN
truelight
parents:
diff changeset
   238
##############################################################################
29654efe3188 (svn r1) Import of revision 975 of old (crashed) SVN
truelight
parents:
diff changeset
   239
#
29654efe3188 (svn r1) Import of revision 975 of old (crashed) SVN
truelight
parents:
diff changeset
   240
# Compiler configuration
29654efe3188 (svn r1) Import of revision 975 of old (crashed) SVN
truelight
parents:
diff changeset
   241
#
29654efe3188 (svn r1) Import of revision 975 of old (crashed) SVN
truelight
parents:
diff changeset
   242
29654efe3188 (svn r1) Import of revision 975 of old (crashed) SVN
truelight
parents:
diff changeset
   243
# Executable file extension
29654efe3188 (svn r1) Import of revision 975 of old (crashed) SVN
truelight
parents:
diff changeset
   244
ifdef WIN32
29654efe3188 (svn r1) Import of revision 975 of old (crashed) SVN
truelight
parents:
diff changeset
   245
EXE=.exe
29654efe3188 (svn r1) Import of revision 975 of old (crashed) SVN
truelight
parents:
diff changeset
   246
else
29654efe3188 (svn r1) Import of revision 975 of old (crashed) SVN
truelight
parents:
diff changeset
   247
EXE=
29654efe3188 (svn r1) Import of revision 975 of old (crashed) SVN
truelight
parents:
diff changeset
   248
endif
29654efe3188 (svn r1) Import of revision 975 of old (crashed) SVN
truelight
parents:
diff changeset
   249
29654efe3188 (svn r1) Import of revision 975 of old (crashed) SVN
truelight
parents:
diff changeset
   250
# Set output executable names
32
bc861ea6d23b (svn r33) -Executeable is now openttd(.exe) always
darkvater
parents: 0
diff changeset
   251
TTD=openttd$(EXE)
157
dd017fa3bad8 (svn r158) -Fix: make endianess check 100% accurate (hopefully ;))
truelight
parents: 126
diff changeset
   252
ENDIAN_CHECK=endian_check$(EXE)
0
29654efe3188 (svn r1) Import of revision 975 of old (crashed) SVN
truelight
parents:
diff changeset
   253
STRGEN=strgen/strgen$(EXE)
29654efe3188 (svn r1) Import of revision 975 of old (crashed) SVN
truelight
parents:
diff changeset
   254
OSXAPP="OpenTTD.app"
29654efe3188 (svn r1) Import of revision 975 of old (crashed) SVN
truelight
parents:
diff changeset
   255
29654efe3188 (svn r1) Import of revision 975 of old (crashed) SVN
truelight
parents:
diff changeset
   256
ifdef RELEASE
29654efe3188 (svn r1) Import of revision 975 of old (crashed) SVN
truelight
parents:
diff changeset
   257
REV:=$(RELEASE)
29654efe3188 (svn r1) Import of revision 975 of old (crashed) SVN
truelight
parents:
diff changeset
   258
else
3994
7ed8945d7171 (svn r5197) - Use svn info to automatically find the last modified revision number and get branch information and place it in the revision string. Increase NETWORK_REVISION_LENGTH to accommodate the branch tag.
peter1138
parents: 3907
diff changeset
   259
ifeq ($(shell if test -d .svn; then echo 1; fi), 1)
4135
776e8f849206 (svn r5493) -Fix: 'grep -o' isn't supported on all targets. 'sed' is, so use thatone (tokai)
truelight
parents: 4120
diff changeset
   260
REV_MODIFIED := $(shell svnversion . | sed -n 's/.*\(M\).*/\1/p' )
3994
7ed8945d7171 (svn r5197) - Use svn info to automatically find the last modified revision number and get branch information and place it in the revision string. Increase NETWORK_REVISION_LENGTH to accommodate the branch tag.
peter1138
parents: 3907
diff changeset
   261
REV := $(shell LC_ALL=C svn info | awk '/^URL:.*branch/ { BRANCH="-"a[split($$2, a, "/")] } /^Last Changed Rev:/ { REV="r"$$4"$(REV_MODIFIED)" } END { print REV BRANCH }')
7ed8945d7171 (svn r5197) - Use svn info to automatically find the last modified revision number and get branch information and place it in the revision string. Increase NETWORK_REVISION_LENGTH to accommodate the branch tag.
peter1138
parents: 3907
diff changeset
   262
endif
0
29654efe3188 (svn r1) Import of revision 975 of old (crashed) SVN
truelight
parents:
diff changeset
   263
endif
29654efe3188 (svn r1) Import of revision 975 of old (crashed) SVN
truelight
parents:
diff changeset
   264
3900
2c84ed52709d (svn r4987) Feature: Merged YAPF into trunk. Thanks to devs for continuous support and users for testing.
KUDr
parents: 3866
diff changeset
   265
# define flag to use for -lrt (some OSes overwrites this later for compatibility)
2c84ed52709d (svn r4987) Feature: Merged YAPF into trunk. Thanks to devs for continuous support and users for testing.
KUDr
parents: 3866
diff changeset
   266
ifndef LRT
2c84ed52709d (svn r4987) Feature: Merged YAPF into trunk. Thanks to devs for continuous support and users for testing.
KUDr
parents: 3866
diff changeset
   267
ifndef MORPHOS
2c84ed52709d (svn r4987) Feature: Merged YAPF into trunk. Thanks to devs for continuous support and users for testing.
KUDr
parents: 3866
diff changeset
   268
LRT:= -lrt
2c84ed52709d (svn r4987) Feature: Merged YAPF into trunk. Thanks to devs for continuous support and users for testing.
KUDr
parents: 3866
diff changeset
   269
endif
2c84ed52709d (svn r4987) Feature: Merged YAPF into trunk. Thanks to devs for continuous support and users for testing.
KUDr
parents: 3866
diff changeset
   270
endif
2c84ed52709d (svn r4987) Feature: Merged YAPF into trunk. Thanks to devs for continuous support and users for testing.
KUDr
parents: 3866
diff changeset
   271
0
29654efe3188 (svn r1) Import of revision 975 of old (crashed) SVN
truelight
parents:
diff changeset
   272
# MorphOS needs builddate
1289
2514debc704e (svn r1793) Revert one instance of $(shell) back to ``, because MorphOS does The Wrong Thing(tm) when date is used within $(shell)
tron
parents: 1288
diff changeset
   273
BUILDDATE=`date +%d.%m.%y`
0
29654efe3188 (svn r1) Import of revision 975 of old (crashed) SVN
truelight
parents:
diff changeset
   274
1692
0b52df38cabc (svn r2196) -Change: updated the Makefile, now it works for crossplatform compiling
TrueLight
parents: 1629
diff changeset
   275
# Check if there is a windres override
0b52df38cabc (svn r2196) -Change: updated the Makefile, now it works for crossplatform compiling
TrueLight
parents: 1629
diff changeset
   276
ifndef WINDRES
0b52df38cabc (svn r2196) -Change: updated the Makefile, now it works for crossplatform compiling
TrueLight
parents: 1629
diff changeset
   277
WINDRES = windres
0b52df38cabc (svn r2196) -Change: updated the Makefile, now it works for crossplatform compiling
TrueLight
parents: 1629
diff changeset
   278
endif
0b52df38cabc (svn r2196) -Change: updated the Makefile, now it works for crossplatform compiling
TrueLight
parents: 1629
diff changeset
   279
3900
2c84ed52709d (svn r4987) Feature: Merged YAPF into trunk. Thanks to devs for continuous support and users for testing.
KUDr
parents: 3866
diff changeset
   280
# Check that CXX is defined. If not, then it's g++
2c84ed52709d (svn r4987) Feature: Merged YAPF into trunk. Thanks to devs for continuous support and users for testing.
KUDr
parents: 3866
diff changeset
   281
ifndef CXX
2c84ed52709d (svn r4987) Feature: Merged YAPF into trunk. Thanks to devs for continuous support and users for testing.
KUDr
parents: 3866
diff changeset
   282
CXX = g++
2c84ed52709d (svn r4987) Feature: Merged YAPF into trunk. Thanks to devs for continuous support and users for testing.
KUDr
parents: 3866
diff changeset
   283
endif
2c84ed52709d (svn r4987) Feature: Merged YAPF into trunk. Thanks to devs for continuous support and users for testing.
KUDr
parents: 3866
diff changeset
   284
2c84ed52709d (svn r4987) Feature: Merged YAPF into trunk. Thanks to devs for continuous support and users for testing.
KUDr
parents: 3866
diff changeset
   285
# Check if CXX_HOST is defined. If not, it is CXX
2c84ed52709d (svn r4987) Feature: Merged YAPF into trunk. Thanks to devs for continuous support and users for testing.
KUDr
parents: 3866
diff changeset
   286
ifndef CXX_HOST
2c84ed52709d (svn r4987) Feature: Merged YAPF into trunk. Thanks to devs for continuous support and users for testing.
KUDr
parents: 3866
diff changeset
   287
CXX_HOST = $(CXX)
2c84ed52709d (svn r4987) Feature: Merged YAPF into trunk. Thanks to devs for continuous support and users for testing.
KUDr
parents: 3866
diff changeset
   288
endif
2c84ed52709d (svn r4987) Feature: Merged YAPF into trunk. Thanks to devs for continuous support and users for testing.
KUDr
parents: 3866
diff changeset
   289
2c84ed52709d (svn r4987) Feature: Merged YAPF into trunk. Thanks to devs for continuous support and users for testing.
KUDr
parents: 3866
diff changeset
   290
# Check if we have a new target
4094
333c7cf842a7 (svn r5426) - Makefile: Make the configure script work properly for setting target compilers; Set CC_TARGET / CXX_TARGET
peter1138
parents: 3994
diff changeset
   291
ifndef CXX_TARGET
333c7cf842a7 (svn r5426) - Makefile: Make the configure script work properly for setting target compilers; Set CC_TARGET / CXX_TARGET
peter1138
parents: 3994
diff changeset
   292
CXX_TARGET = $(CXX_HOST)
3900
2c84ed52709d (svn r4987) Feature: Merged YAPF into trunk. Thanks to devs for continuous support and users for testing.
KUDr
parents: 3866
diff changeset
   293
endif
2c84ed52709d (svn r4987) Feature: Merged YAPF into trunk. Thanks to devs for continuous support and users for testing.
KUDr
parents: 3866
diff changeset
   294
1692
0b52df38cabc (svn r2196) -Change: updated the Makefile, now it works for crossplatform compiling
TrueLight
parents: 1629
diff changeset
   295
# Check if CC_HOST is defined. If not, it is CC
0b52df38cabc (svn r2196) -Change: updated the Makefile, now it works for crossplatform compiling
TrueLight
parents: 1629
diff changeset
   296
ifndef CC_HOST
0b52df38cabc (svn r2196) -Change: updated the Makefile, now it works for crossplatform compiling
TrueLight
parents: 1629
diff changeset
   297
CC_HOST = $(CC)
0b52df38cabc (svn r2196) -Change: updated the Makefile, now it works for crossplatform compiling
TrueLight
parents: 1629
diff changeset
   298
endif
4094
333c7cf842a7 (svn r5426) - Makefile: Make the configure script work properly for setting target compilers; Set CC_TARGET / CXX_TARGET
peter1138
parents: 3994
diff changeset
   299
1692
0b52df38cabc (svn r2196) -Change: updated the Makefile, now it works for crossplatform compiling
TrueLight
parents: 1629
diff changeset
   300
ifndef CFLAGS_HOST
0b52df38cabc (svn r2196) -Change: updated the Makefile, now it works for crossplatform compiling
TrueLight
parents: 1629
diff changeset
   301
CFLAGS_HOST = $(BASECFLAGS)
0b52df38cabc (svn r2196) -Change: updated the Makefile, now it works for crossplatform compiling
TrueLight
parents: 1629
diff changeset
   302
endif
0
29654efe3188 (svn r1) Import of revision 975 of old (crashed) SVN
truelight
parents:
diff changeset
   303
3141
30bd6feedb91 (svn r3759) -Fix: [OSX] don't set CC_HOST to i686 gcc when compiling universal binaries on PPC without any Makefile.config. Introduced in 3674 (before that i686 used PPC as CC_HOST, but nobody noticed that)
bjarni
parents: 3085
diff changeset
   304
# Check if we have a new target
4094
333c7cf842a7 (svn r5426) - Makefile: Make the configure script work properly for setting target compilers; Set CC_TARGET / CXX_TARGET
peter1138
parents: 3994
diff changeset
   305
ifndef CC_TARGET
333c7cf842a7 (svn r5426) - Makefile: Make the configure script work properly for setting target compilers; Set CC_TARGET / CXX_TARGET
peter1138
parents: 3994
diff changeset
   306
CC_TARGET = $(CC_HOST)
3141
30bd6feedb91 (svn r3759) -Fix: [OSX] don't set CC_HOST to i686 gcc when compiling universal binaries on PPC without any Makefile.config. Introduced in 3674 (before that i686 used PPC as CC_HOST, but nobody noticed that)
bjarni
parents: 3085
diff changeset
   307
endif
0
29654efe3188 (svn r1) Import of revision 975 of old (crashed) SVN
truelight
parents:
diff changeset
   308
4113
f993487814cf (svn r5456) -Fix: detect the version of the TARGET, not the HOST please
truelight
parents: 4094
diff changeset
   309
CC_VERSION = $(shell $(CC_TARGET) -dumpversion | cut -c 1,3)
1052
f996874f0f16 (svn r1553) Check which gcc version is present and only set availible compiler flags
tron
parents: 1051
diff changeset
   310
f996874f0f16 (svn r1553) Check which gcc version is present and only set availible compiler flags
tron
parents: 1051
diff changeset
   311
# GNU make can only test for (in)equality
f996874f0f16 (svn r1553) Check which gcc version is present and only set availible compiler flags
tron
parents: 1051
diff changeset
   312
# this is a workaround to test for >=
2240
08cab36d20f3 (svn r2760) Remove stale comments, long unused stuff and simplify some checks
tron
parents: 2236
diff changeset
   313
ifeq ($(shell expr $(CC_VERSION) \>= 29), 1)
3900
2c84ed52709d (svn r4987) Feature: Merged YAPF into trunk. Thanks to devs for continuous support and users for testing.
KUDr
parents: 3866
diff changeset
   314
  CFLAGS += -O -Wall -Wno-multichar -Wsign-compare -Wundef
2c84ed52709d (svn r4987) Feature: Merged YAPF into trunk. Thanks to devs for continuous support and users for testing.
KUDr
parents: 3866
diff changeset
   315
  CC_CFLAGS += -Wstrict-prototypes
1324
9295c63a1ce1 (svn r1828) New warning flag especially for truelight (:<
tron
parents: 1317
diff changeset
   316
  CFLAGS += -Wwrite-strings -Wpointer-arith
1052
f996874f0f16 (svn r1553) Check which gcc version is present and only set availible compiler flags
tron
parents: 1051
diff changeset
   317
endif
2240
08cab36d20f3 (svn r2760) Remove stale comments, long unused stuff and simplify some checks
tron
parents: 2236
diff changeset
   318
ifeq ($(shell expr $(CC_VERSION) \>= 30), 1)
1052
f996874f0f16 (svn r1553) Check which gcc version is present and only set availible compiler flags
tron
parents: 1051
diff changeset
   319
  CFLAGS += -W -Wno-unused-parameter
f996874f0f16 (svn r1553) Check which gcc version is present and only set availible compiler flags
tron
parents: 1051
diff changeset
   320
endif
2240
08cab36d20f3 (svn r2760) Remove stale comments, long unused stuff and simplify some checks
tron
parents: 2236
diff changeset
   321
ifeq ($(shell expr $(CC_VERSION) \>= 34), 1)
3900
2c84ed52709d (svn r4987) Feature: Merged YAPF into trunk. Thanks to devs for continuous support and users for testing.
KUDr
parents: 3866
diff changeset
   322
  CC_CFLAGS += -Wdeclaration-after-statement -Wold-style-definition
1052
f996874f0f16 (svn r1553) Check which gcc version is present and only set availible compiler flags
tron
parents: 1051
diff changeset
   323
endif
f996874f0f16 (svn r1553) Check which gcc version is present and only set availible compiler flags
tron
parents: 1051
diff changeset
   324
1240
7d7f18e0b2c5 (svn r1744) DEBUG and PROFILE can be used at the same time.
tron
parents: 1211
diff changeset
   325
ifdef DEBUG
1479
6770c281d22f (svn r1983) Introduce multiple compile time debug levels
tron
parents: 1476
diff changeset
   326
  ifeq ($(shell expr $(DEBUG) \>= 1), 1)
6770c281d22f (svn r1983) Introduce multiple compile time debug levels
tron
parents: 1476
diff changeset
   327
    CFLAGS += -g -D_DEBUG
6770c281d22f (svn r1983) Introduce multiple compile time debug levels
tron
parents: 1476
diff changeset
   328
  endif
6770c281d22f (svn r1983) Introduce multiple compile time debug levels
tron
parents: 1476
diff changeset
   329
  ifeq ($(shell expr $(DEBUG) \>= 2), 1)
6770c281d22f (svn r1983) Introduce multiple compile time debug levels
tron
parents: 1476
diff changeset
   330
    CFLAGS += -fno-inline
6770c281d22f (svn r1983) Introduce multiple compile time debug levels
tron
parents: 1476
diff changeset
   331
  endif
6770c281d22f (svn r1983) Introduce multiple compile time debug levels
tron
parents: 1476
diff changeset
   332
  ifeq ($(shell expr $(DEBUG) \>= 3), 1)
6770c281d22f (svn r1983) Introduce multiple compile time debug levels
tron
parents: 1476
diff changeset
   333
    CFLAGS += -O0
6770c281d22f (svn r1983) Introduce multiple compile time debug levels
tron
parents: 1476
diff changeset
   334
  endif
1240
7d7f18e0b2c5 (svn r1744) DEBUG and PROFILE can be used at the same time.
tron
parents: 1211
diff changeset
   335
endif
7d7f18e0b2c5 (svn r1744) DEBUG and PROFILE can be used at the same time.
tron
parents: 1211
diff changeset
   336
7d7f18e0b2c5 (svn r1744) DEBUG and PROFILE can be used at the same time.
tron
parents: 1211
diff changeset
   337
ifdef PROFILE
7d7f18e0b2c5 (svn r1744) DEBUG and PROFILE can be used at the same time.
tron
parents: 1211
diff changeset
   338
  CFLAGS += -pg
7d7f18e0b2c5 (svn r1744) DEBUG and PROFILE can be used at the same time.
tron
parents: 1211
diff changeset
   339
  LDFLAGS += -pg
3031
ea55e2750fff (svn r3611) -Feature: [OSX profiling] Shark (Xcode's profiling tool) can now relate CPU usage to lines in the source files
bjarni
parents: 2997
diff changeset
   340
  ifdef OSX
ea55e2750fff (svn r3611) -Feature: [OSX profiling] Shark (Xcode's profiling tool) can now relate CPU usage to lines in the source files
bjarni
parents: 2997
diff changeset
   341
  # Shark (Xcode's profiling tool) needs -g to relate CPU usage to line numbers in the source code
ea55e2750fff (svn r3611) -Feature: [OSX profiling] Shark (Xcode's profiling tool) can now relate CPU usage to lines in the source files
bjarni
parents: 2997
diff changeset
   342
    BASECFLAGS += -g
ea55e2750fff (svn r3611) -Feature: [OSX profiling] Shark (Xcode's profiling tool) can now relate CPU usage to lines in the source files
bjarni
parents: 2997
diff changeset
   343
  endif
1240
7d7f18e0b2c5 (svn r1744) DEBUG and PROFILE can be used at the same time.
tron
parents: 1211
diff changeset
   344
endif
7d7f18e0b2c5 (svn r1744) DEBUG and PROFILE can be used at the same time.
tron
parents: 1211
diff changeset
   345
0
29654efe3188 (svn r1) Import of revision 975 of old (crashed) SVN
truelight
parents:
diff changeset
   346
CDEFS=-DWITH_REV
29654efe3188 (svn r1) Import of revision 975 of old (crashed) SVN
truelight
parents:
diff changeset
   347
1240
7d7f18e0b2c5 (svn r1744) DEBUG and PROFILE can be used at the same time.
tron
parents: 1211
diff changeset
   348
ifndef DEBUG
7d7f18e0b2c5 (svn r1744) DEBUG and PROFILE can be used at the same time.
tron
parents: 1211
diff changeset
   349
ifndef PROFILE
0
29654efe3188 (svn r1) Import of revision 975 of old (crashed) SVN
truelight
parents:
diff changeset
   350
# Release mode
29654efe3188 (svn r1) Import of revision 975 of old (crashed) SVN
truelight
parents:
diff changeset
   351
ifndef MORPHOS
1810
8a574d47872b (svn r2314) - Feature: [ 1187490 ] Patches for building on IRIX (jgilje)
Darkvater
parents: 1722
diff changeset
   352
ifndef IRIX
0
29654efe3188 (svn r1) Import of revision 975 of old (crashed) SVN
truelight
parents:
diff changeset
   353
# automatical strip breaks under morphos
3907
ca5e75a55545 (svn r4997) -Fix: [OSX] reverted the OSX part of rev 4994 as it caused dyld (lib) crashes
bjarni
parents: 3906
diff changeset
   354
ifdef OSX
ca5e75a55545 (svn r4997) -Fix: [OSX] reverted the OSX part of rev 4994 as it caused dyld (lib) crashes
bjarni
parents: 3906
diff changeset
   355
# it appears that OSX can't handle automated stripping when mixing C and C++
ca5e75a55545 (svn r4997) -Fix: [OSX] reverted the OSX part of rev 4994 as it caused dyld (lib) crashes
bjarni
parents: 3906
diff changeset
   356
# we will do it manually in the target OSX_STRIP
ca5e75a55545 (svn r4997) -Fix: [OSX] reverted the OSX part of rev 4994 as it caused dyld (lib) crashes
bjarni
parents: 3906
diff changeset
   357
OSX_STRIP:=OSX_STRIP
ca5e75a55545 (svn r4997) -Fix: [OSX] reverted the OSX part of rev 4994 as it caused dyld (lib) crashes
bjarni
parents: 3906
diff changeset
   358
else
0
29654efe3188 (svn r1) Import of revision 975 of old (crashed) SVN
truelight
parents:
diff changeset
   359
LDFLAGS += -s
29654efe3188 (svn r1) Import of revision 975 of old (crashed) SVN
truelight
parents:
diff changeset
   360
endif
29654efe3188 (svn r1) Import of revision 975 of old (crashed) SVN
truelight
parents:
diff changeset
   361
endif
1810
8a574d47872b (svn r2314) - Feature: [ 1187490 ] Patches for building on IRIX (jgilje)
Darkvater
parents: 1722
diff changeset
   362
endif
3907
ca5e75a55545 (svn r4997) -Fix: [OSX] reverted the OSX part of rev 4994 as it caused dyld (lib) crashes
bjarni
parents: 3906
diff changeset
   363
endif
0
29654efe3188 (svn r1) Import of revision 975 of old (crashed) SVN
truelight
parents:
diff changeset
   364
29654efe3188 (svn r1) Import of revision 975 of old (crashed) SVN
truelight
parents:
diff changeset
   365
ifdef OSX
29654efe3188 (svn r1) Import of revision 975 of old (crashed) SVN
truelight
parents:
diff changeset
   366
# these compilerflags makes the app run as fast as possible without making the app unstable. It works on G3 or newer
2713
9c42385e4f41 (svn r3258) -Feature: [OSX] added support for universal binaries
bjarni
parents: 2712
diff changeset
   367
BASECFLAGS += -O3 -funroll-loops -fsched-interblock -falign-loops=16 -falign-jumps=16 -falign-functions=16 -falign-jumps-max-skip=15 -falign-loops-max-skip=15 -mdynamic-no-pic
0
29654efe3188 (svn r1) Import of revision 975 of old (crashed) SVN
truelight
parents:
diff changeset
   368
else
29654efe3188 (svn r1) Import of revision 975 of old (crashed) SVN
truelight
parents:
diff changeset
   369
ifdef MORPHOS
2356
43d1812406e7 (svn r2882) Some fixes for MorphOS (by tokai)
tron
parents: 2340
diff changeset
   370
BASECFLAGS += -I/gg/os-include -O2 -noixemul -fstrict-aliasing -fexpensive-optimizations
1291
cbb62d2fb544 (svn r1795) Change CFLAGS for MorphOS (tokai)
tron
parents: 1289
diff changeset
   371
BASECFLAGS += -mcpu=604 -fno-inline -mstring -mmultiple
0
29654efe3188 (svn r1) Import of revision 975 of old (crashed) SVN
truelight
parents:
diff changeset
   372
else
1169
6692150e84cd (svn r1671) Remove WARNING_DISPLAY, because it contained no warning, but an optimization flag
tron
parents: 1168
diff changeset
   373
BASECFLAGS += -O2
0
29654efe3188 (svn r1) Import of revision 975 of old (crashed) SVN
truelight
parents:
diff changeset
   374
endif
29654efe3188 (svn r1) Import of revision 975 of old (crashed) SVN
truelight
parents:
diff changeset
   375
ifndef PROFILE
1810
8a574d47872b (svn r2314) - Feature: [ 1187490 ] Patches for building on IRIX (jgilje)
Darkvater
parents: 1722
diff changeset
   376
ifndef IRIX
0
29654efe3188 (svn r1) Import of revision 975 of old (crashed) SVN
truelight
parents:
diff changeset
   377
BASECFLAGS += -fomit-frame-pointer
29654efe3188 (svn r1) Import of revision 975 of old (crashed) SVN
truelight
parents:
diff changeset
   378
endif
29654efe3188 (svn r1) Import of revision 975 of old (crashed) SVN
truelight
parents:
diff changeset
   379
endif
29654efe3188 (svn r1) Import of revision 975 of old (crashed) SVN
truelight
parents:
diff changeset
   380
endif
1810
8a574d47872b (svn r2314) - Feature: [ 1187490 ] Patches for building on IRIX (jgilje)
Darkvater
parents: 1722
diff changeset
   381
endif
0
29654efe3188 (svn r1) Import of revision 975 of old (crashed) SVN
truelight
parents:
diff changeset
   382
29654efe3188 (svn r1) Import of revision 975 of old (crashed) SVN
truelight
parents:
diff changeset
   383
ifdef STATIC
29654efe3188 (svn r1) Import of revision 975 of old (crashed) SVN
truelight
parents:
diff changeset
   384
ifndef OSX	# OSX can't build static if -static flag is used
29654efe3188 (svn r1) Import of revision 975 of old (crashed) SVN
truelight
parents:
diff changeset
   385
LDFLAGS += -static
29654efe3188 (svn r1) Import of revision 975 of old (crashed) SVN
truelight
parents:
diff changeset
   386
endif
29654efe3188 (svn r1) Import of revision 975 of old (crashed) SVN
truelight
parents:
diff changeset
   387
endif
29654efe3188 (svn r1) Import of revision 975 of old (crashed) SVN
truelight
parents:
diff changeset
   388
798
8331baea2dc9 (svn r1268) -Fix: some warnings in gfx.c fixed
darkvater
parents: 770
diff changeset
   389
# If building on MingW don't link with Cygwin libs
0
29654efe3188 (svn r1) Import of revision 975 of old (crashed) SVN
truelight
parents:
diff changeset
   390
ifdef WIN32
798
8331baea2dc9 (svn r1268) -Fix: some warnings in gfx.c fixed
darkvater
parents: 770
diff changeset
   391
ifdef CYGWIN
8331baea2dc9 (svn r1268) -Fix: some warnings in gfx.c fixed
darkvater
parents: 770
diff changeset
   392
BASECFLAGS += -mwin32
8331baea2dc9 (svn r1268) -Fix: some warnings in gfx.c fixed
darkvater
parents: 770
diff changeset
   393
LDFLAGS += -mwin32
8331baea2dc9 (svn r1268) -Fix: some warnings in gfx.c fixed
darkvater
parents: 770
diff changeset
   394
endif
0
29654efe3188 (svn r1) Import of revision 975 of old (crashed) SVN
truelight
parents:
diff changeset
   395
ifdef MINGW
29654efe3188 (svn r1) Import of revision 975 of old (crashed) SVN
truelight
parents:
diff changeset
   396
BASECFLAGS += -mno-cygwin
29654efe3188 (svn r1) Import of revision 975 of old (crashed) SVN
truelight
parents:
diff changeset
   397
LDFLAGS += -mno-cygwin
3900
2c84ed52709d (svn r4987) Feature: Merged YAPF into trunk. Thanks to devs for continuous support and users for testing.
KUDr
parents: 3866
diff changeset
   398
# -lrt fails with MINGW, so we disable it
2c84ed52709d (svn r4987) Feature: Merged YAPF into trunk. Thanks to devs for continuous support and users for testing.
KUDr
parents: 3866
diff changeset
   399
LRT:=
0
29654efe3188 (svn r1) Import of revision 975 of old (crashed) SVN
truelight
parents:
diff changeset
   400
endif
29654efe3188 (svn r1) Import of revision 975 of old (crashed) SVN
truelight
parents:
diff changeset
   401
endif
29654efe3188 (svn r1) Import of revision 975 of old (crashed) SVN
truelight
parents:
diff changeset
   402
29654efe3188 (svn r1) Import of revision 975 of old (crashed) SVN
truelight
parents:
diff changeset
   403
CFLAGS += $(BASECFLAGS)
29654efe3188 (svn r1) Import of revision 975 of old (crashed) SVN
truelight
parents:
diff changeset
   404
29654efe3188 (svn r1) Import of revision 975 of old (crashed) SVN
truelight
parents:
diff changeset
   405
ifdef UNIX
29654efe3188 (svn r1) Import of revision 975 of old (crashed) SVN
truelight
parents:
diff changeset
   406
CDEFS += -DUNIX
29654efe3188 (svn r1) Import of revision 975 of old (crashed) SVN
truelight
parents:
diff changeset
   407
endif
29654efe3188 (svn r1) Import of revision 975 of old (crashed) SVN
truelight
parents:
diff changeset
   408
421
3dd9b5a439af (svn r619) Add the necessary bits to make building under BeOS using GNU Make work
tron
parents: 413
diff changeset
   409
ifdef BEOS
3dd9b5a439af (svn r619) Add the necessary bits to make building under BeOS using GNU Make work
tron
parents: 413
diff changeset
   410
CDEFS += -DBEOS
2497
0fe349de34c7 (svn r3023) -Fix [BeOS] fixed compilation on BeOS R5 (MYOB)
bjarni
parents: 2496
diff changeset
   411
LDFLAGS += -lmidi -lbe -lpthread
421
3dd9b5a439af (svn r619) Add the necessary bits to make building under BeOS using GNU Make work
tron
parents: 413
diff changeset
   412
ifdef WITH_NETWORK
3dd9b5a439af (svn r619) Add the necessary bits to make building under BeOS using GNU Make work
tron
parents: 413
diff changeset
   413
	ifdef BEOS_NET_SERVER
1051
be278201f830 (svn r1552) Make ottd compile on Zeta
tron
parents: 1029
diff changeset
   414
		CDEFS += -DBEOS_NET_SERVER
2497
0fe349de34c7 (svn r3023) -Fix [BeOS] fixed compilation on BeOS R5 (MYOB)
bjarni
parents: 2496
diff changeset
   415
		LDFLAGS += -lnet
1051
be278201f830 (svn r1552) Make ottd compile on Zeta
tron
parents: 1029
diff changeset
   416
	else
2497
0fe349de34c7 (svn r3023) -Fix [BeOS] fixed compilation on BeOS R5 (MYOB)
bjarni
parents: 2496
diff changeset
   417
		# BONE needs a few more libraries than R5
1051
be278201f830 (svn r1552) Make ottd compile on Zeta
tron
parents: 1029
diff changeset
   418
		LDFLAGS += -lbind -lsocket
421
3dd9b5a439af (svn r619) Add the necessary bits to make building under BeOS using GNU Make work
tron
parents: 413
diff changeset
   419
	endif
3dd9b5a439af (svn r619) Add the necessary bits to make building under BeOS using GNU Make work
tron
parents: 413
diff changeset
   420
endif
3dd9b5a439af (svn r619) Add the necessary bits to make building under BeOS using GNU Make work
tron
parents: 413
diff changeset
   421
endif
3dd9b5a439af (svn r619) Add the necessary bits to make building under BeOS using GNU Make work
tron
parents: 413
diff changeset
   422
1164
48da7bcf7b7c (svn r1666) Move some MorphOS compile flags to a place where they actually belong
tron
parents: 1163
diff changeset
   423
ifdef MORPHOS
1291
cbb62d2fb544 (svn r1795) Change CFLAGS for MorphOS (tokai)
tron
parents: 1289
diff changeset
   424
# -Wstrict-prototypes generates much noise because of system headers
3900
2c84ed52709d (svn r4987) Feature: Merged YAPF into trunk. Thanks to devs for continuous support and users for testing.
KUDr
parents: 3866
diff changeset
   425
# and it also uses 4-byte bools in the C++ ABI, so C bools need to be that size as well for YAPF to work
2c84ed52709d (svn r4987) Feature: Merged YAPF into trunk. Thanks to devs for continuous support and users for testing.
KUDr
parents: 3866
diff changeset
   426
CFLAGS += -Wno-strict-prototypes -DFOUR_BYTE_BOOL
1164
48da7bcf7b7c (svn r1666) Move some MorphOS compile flags to a place where they actually belong
tron
parents: 1163
diff changeset
   427
endif
48da7bcf7b7c (svn r1666) Move some MorphOS compile flags to a place where they actually belong
tron
parents: 1163
diff changeset
   428
446
7a92ca9738e2 (svn r655) Add the necessary bits to make building on SunOS/Solaris work
tron
parents: 421
diff changeset
   429
ifdef SUNOS
7a92ca9738e2 (svn r655) Add the necessary bits to make building on SunOS/Solaris work
tron
parents: 421
diff changeset
   430
CDEFS += -DSUNOS
7a92ca9738e2 (svn r655) Add the necessary bits to make building on SunOS/Solaris work
tron
parents: 421
diff changeset
   431
ifdef WITH_NETWORK
7a92ca9738e2 (svn r655) Add the necessary bits to make building on SunOS/Solaris work
tron
parents: 421
diff changeset
   432
LDFLAGS += -lnsl -lsocket
7a92ca9738e2 (svn r655) Add the necessary bits to make building on SunOS/Solaris work
tron
parents: 421
diff changeset
   433
endif
7a92ca9738e2 (svn r655) Add the necessary bits to make building on SunOS/Solaris work
tron
parents: 421
diff changeset
   434
endif
7a92ca9738e2 (svn r655) Add the necessary bits to make building on SunOS/Solaris work
tron
parents: 421
diff changeset
   435
2500
92bc404b86ca (svn r3026) -Fix: [OSX] fixed bug that prevented dedicated servers from compiling (introduced in r3022)
bjarni
parents: 2497
diff changeset
   436
# tell the source that we are building a dedicated server
92bc404b86ca (svn r3026) -Fix: [OSX] fixed bug that prevented dedicated servers from compiling (introduced in r3022)
bjarni
parents: 2497
diff changeset
   437
ifdef DEDICATED
92bc404b86ca (svn r3026) -Fix: [OSX] fixed bug that prevented dedicated servers from compiling (introduced in r3022)
bjarni
parents: 2497
diff changeset
   438
CDEFS += -DDEDICATED
92bc404b86ca (svn r3026) -Fix: [OSX] fixed bug that prevented dedicated servers from compiling (introduced in r3022)
bjarni
parents: 2497
diff changeset
   439
endif
92bc404b86ca (svn r3026) -Fix: [OSX] fixed bug that prevented dedicated servers from compiling (introduced in r3022)
bjarni
parents: 2497
diff changeset
   440
0
29654efe3188 (svn r1) Import of revision 975 of old (crashed) SVN
truelight
parents:
diff changeset
   441
# SDL config
29654efe3188 (svn r1) Import of revision 975 of old (crashed) SVN
truelight
parents:
diff changeset
   442
ifdef WITH_SDL
29654efe3188 (svn r1) Import of revision 975 of old (crashed) SVN
truelight
parents:
diff changeset
   443
CDEFS += -DWITH_SDL
3406
ee3af0f1932b (svn r4217) Replace SDL-CONFIG and LIBPNG-CONFIG with SDL_CONFIG and LIBPNG_CONFIG
peter1138
parents: 3389
diff changeset
   444
CFLAGS += $(shell $(SDL_CONFIG) --cflags)
0
29654efe3188 (svn r1) Import of revision 975 of old (crashed) SVN
truelight
parents:
diff changeset
   445
ifdef STATIC
3406
ee3af0f1932b (svn r4217) Replace SDL-CONFIG and LIBPNG-CONFIG with SDL_CONFIG and LIBPNG_CONFIG
peter1138
parents: 3389
diff changeset
   446
LIBS += $(shell $(SDL_CONFIG) --static-libs)
0
29654efe3188 (svn r1) Import of revision 975 of old (crashed) SVN
truelight
parents:
diff changeset
   447
else
3406
ee3af0f1932b (svn r4217) Replace SDL-CONFIG and LIBPNG-CONFIG with SDL_CONFIG and LIBPNG_CONFIG
peter1138
parents: 3389
diff changeset
   448
LIBS += $(shell $(SDL_CONFIG) --libs)
0
29654efe3188 (svn r1) Import of revision 975 of old (crashed) SVN
truelight
parents:
diff changeset
   449
endif
29654efe3188 (svn r1) Import of revision 975 of old (crashed) SVN
truelight
parents:
diff changeset
   450
endif
29654efe3188 (svn r1) Import of revision 975 of old (crashed) SVN
truelight
parents:
diff changeset
   451
29654efe3188 (svn r1) Import of revision 975 of old (crashed) SVN
truelight
parents:
diff changeset
   452
# zlib config
29654efe3188 (svn r1) Import of revision 975 of old (crashed) SVN
truelight
parents:
diff changeset
   453
ifdef WITH_ZLIB
3389
56f72f7838cc (svn r4197) reentered STATIC_ZLIB_PATH (removed in 4183) since it turned out that it's used after all
bjarni
parents: 3380
diff changeset
   454
	CDEFS += -DWITH_ZLIB
56f72f7838cc (svn r4197) reentered STATIC_ZLIB_PATH (removed in 4183) since it turned out that it's used after all
bjarni
parents: 3380
diff changeset
   455
	ifdef STATIC
56f72f7838cc (svn r4197) reentered STATIC_ZLIB_PATH (removed in 4183) since it turned out that it's used after all
bjarni
parents: 3380
diff changeset
   456
		ifdef OSX
56f72f7838cc (svn r4197) reentered STATIC_ZLIB_PATH (removed in 4183) since it turned out that it's used after all
bjarni
parents: 3380
diff changeset
   457
		# OSX links dynamically to zlib, even in static builds since it's always present in the system
56f72f7838cc (svn r4197) reentered STATIC_ZLIB_PATH (removed in 4183) since it turned out that it's used after all
bjarni
parents: 3380
diff changeset
   458
			LIBS += -lz
56f72f7838cc (svn r4197) reentered STATIC_ZLIB_PATH (removed in 4183) since it turned out that it's used after all
bjarni
parents: 3380
diff changeset
   459
		else
56f72f7838cc (svn r4197) reentered STATIC_ZLIB_PATH (removed in 4183) since it turned out that it's used after all
bjarni
parents: 3380
diff changeset
   460
			LIBS += $(STATIC_ZLIB_PATH)
56f72f7838cc (svn r4197) reentered STATIC_ZLIB_PATH (removed in 4183) since it turned out that it's used after all
bjarni
parents: 3380
diff changeset
   461
		endif
56f72f7838cc (svn r4197) reentered STATIC_ZLIB_PATH (removed in 4183) since it turned out that it's used after all
bjarni
parents: 3380
diff changeset
   462
	else
56f72f7838cc (svn r4197) reentered STATIC_ZLIB_PATH (removed in 4183) since it turned out that it's used after all
bjarni
parents: 3380
diff changeset
   463
		LIBS += -lz
56f72f7838cc (svn r4197) reentered STATIC_ZLIB_PATH (removed in 4183) since it turned out that it's used after all
bjarni
parents: 3380
diff changeset
   464
	endif
0
29654efe3188 (svn r1) Import of revision 975 of old (crashed) SVN
truelight
parents:
diff changeset
   465
endif
29654efe3188 (svn r1) Import of revision 975 of old (crashed) SVN
truelight
parents:
diff changeset
   466
29654efe3188 (svn r1) Import of revision 975 of old (crashed) SVN
truelight
parents:
diff changeset
   467
# libpng config
29654efe3188 (svn r1) Import of revision 975 of old (crashed) SVN
truelight
parents:
diff changeset
   468
ifdef WITH_PNG
29654efe3188 (svn r1) Import of revision 975 of old (crashed) SVN
truelight
parents:
diff changeset
   469
CDEFS += -DWITH_PNG
3406
ee3af0f1932b (svn r4217) Replace SDL-CONFIG and LIBPNG-CONFIG with SDL_CONFIG and LIBPNG_CONFIG
peter1138
parents: 3389
diff changeset
   470
CFLAGS += $(shell $(LIBPNG_CONFIG) --cppflags --I_opts)
551
f69b4fc48d19 (svn r951) Makefile: fixed missing flag for libpng, which prevented lib detection if SDL was not used
bjarni
parents: 549
diff changeset
   471
0
29654efe3188 (svn r1) Import of revision 975 of old (crashed) SVN
truelight
parents:
diff changeset
   472
# seems like older libpng versions are broken and need this
29654efe3188 (svn r1) Import of revision 975 of old (crashed) SVN
truelight
parents:
diff changeset
   473
PNGCONFIG_FLAGS = --ldflags --libs
29654efe3188 (svn r1) Import of revision 975 of old (crashed) SVN
truelight
parents:
diff changeset
   474
ifdef STATIC
583
3762db489bb4 (svn r1003) Mac: reintroduced the static libpng hack in makefile since it appears to be needed in the nightly builds
bjarni
parents: 580
diff changeset
   475
ifdef OSX
3762db489bb4 (svn r1003) Mac: reintroduced the static libpng hack in makefile since it appears to be needed in the nightly builds
bjarni
parents: 580
diff changeset
   476
# Seems like we need a tiny hack for OSX static to work
3406
ee3af0f1932b (svn r4217) Replace SDL-CONFIG and LIBPNG-CONFIG with SDL_CONFIG and LIBPNG_CONFIG
peter1138
parents: 3389
diff changeset
   477
LIBS += $(shell $(LIBPNG_CONFIG) --prefix)/lib/libpng.a
583
3762db489bb4 (svn r1003) Mac: reintroduced the static libpng hack in makefile since it appears to be needed in the nightly builds
bjarni
parents: 580
diff changeset
   478
else
3406
ee3af0f1932b (svn r4217) Replace SDL-CONFIG and LIBPNG-CONFIG with SDL_CONFIG and LIBPNG_CONFIG
peter1138
parents: 3389
diff changeset
   479
LIBS += $(shell $(LIBPNG_CONFIG) --static $(PNGCONFIG_FLAGS))
583
3762db489bb4 (svn r1003) Mac: reintroduced the static libpng hack in makefile since it appears to be needed in the nightly builds
bjarni
parents: 580
diff changeset
   480
endif
0
29654efe3188 (svn r1) Import of revision 975 of old (crashed) SVN
truelight
parents:
diff changeset
   481
else
3406
ee3af0f1932b (svn r4217) Replace SDL-CONFIG and LIBPNG-CONFIG with SDL_CONFIG and LIBPNG_CONFIG
peter1138
parents: 3389
diff changeset
   482
LIBS += $(shell $(LIBPNG_CONFIG)  --L_opts $(PNGCONFIG_FLAGS))
0
29654efe3188 (svn r1) Import of revision 975 of old (crashed) SVN
truelight
parents:
diff changeset
   483
endif
29654efe3188 (svn r1) Import of revision 975 of old (crashed) SVN
truelight
parents:
diff changeset
   484
endif
29654efe3188 (svn r1) Import of revision 975 of old (crashed) SVN
truelight
parents:
diff changeset
   485
3900
2c84ed52709d (svn r4987) Feature: Merged YAPF into trunk. Thanks to devs for continuous support and users for testing.
KUDr
parents: 3866
diff changeset
   486
# use std C++ lib:
2c84ed52709d (svn r4987) Feature: Merged YAPF into trunk. Thanks to devs for continuous support and users for testing.
KUDr
parents: 3866
diff changeset
   487
LIBS += -lstdc++
2c84ed52709d (svn r4987) Feature: Merged YAPF into trunk. Thanks to devs for continuous support and users for testing.
KUDr
parents: 3866
diff changeset
   488
ifndef MINGW
2c84ed52709d (svn r4987) Feature: Merged YAPF into trunk. Thanks to devs for continuous support and users for testing.
KUDr
parents: 3866
diff changeset
   489
	LIBS += -lc
2c84ed52709d (svn r4987) Feature: Merged YAPF into trunk. Thanks to devs for continuous support and users for testing.
KUDr
parents: 3866
diff changeset
   490
endif
2c84ed52709d (svn r4987) Feature: Merged YAPF into trunk. Thanks to devs for continuous support and users for testing.
KUDr
parents: 3866
diff changeset
   491
3409
7b8a26e4c2f1 (svn r4220) - Fix (r4219): of course iconv is enabled on >= 10.3 not >; fixed comment (thanks Bjarni)
Darkvater
parents: 3408
diff changeset
   492
# iconv is enabled defaultly on OSX >= 10.3
3313
735b30b93dc2 (svn r4076) Back out r4074. It doesn't work and leads to make endlessly calling itself. NOTE: Delete Makefile.config to recover.
tron
parents: 3311
diff changeset
   493
ifdef OSX
3408
1da501b2eae1 (svn r4219) - Add support for WITH_ICONV. It is enabled by default for OSX > 10.3 for all others set it with WITH_ICONV in Makefile.config or with --with-iconv with configure. --with-config=/somedir will search for iconv include files somewhere (or in Makefile.config with WITH_ICONV_PATH). Custom library loading is not (yet) supported
Darkvater
parents: 3406
diff changeset
   494
	ifndef JAGUAR
1da501b2eae1 (svn r4219) - Add support for WITH_ICONV. It is enabled by default for OSX > 10.3 for all others set it with WITH_ICONV in Makefile.config or with --with-iconv with configure. --with-config=/somedir will search for iconv include files somewhere (or in Makefile.config with WITH_ICONV_PATH). Custom library loading is not (yet) supported
Darkvater
parents: 3406
diff changeset
   495
		WITH_ICONV=1
1da501b2eae1 (svn r4219) - Add support for WITH_ICONV. It is enabled by default for OSX > 10.3 for all others set it with WITH_ICONV in Makefile.config or with --with-iconv with configure. --with-config=/somedir will search for iconv include files somewhere (or in Makefile.config with WITH_ICONV_PATH). Custom library loading is not (yet) supported
Darkvater
parents: 3406
diff changeset
   496
		LIBS += -liconv
1da501b2eae1 (svn r4219) - Add support for WITH_ICONV. It is enabled by default for OSX > 10.3 for all others set it with WITH_ICONV in Makefile.config or with --with-iconv with configure. --with-config=/somedir will search for iconv include files somewhere (or in Makefile.config with WITH_ICONV_PATH). Custom library loading is not (yet) supported
Darkvater
parents: 3406
diff changeset
   497
	endif
3313
735b30b93dc2 (svn r4076) Back out r4074. It doesn't work and leads to make endlessly calling itself. NOTE: Delete Makefile.config to recover.
tron
parents: 3311
diff changeset
   498
endif
3408
1da501b2eae1 (svn r4219) - Add support for WITH_ICONV. It is enabled by default for OSX > 10.3 for all others set it with WITH_ICONV in Makefile.config or with --with-iconv with configure. --with-config=/somedir will search for iconv include files somewhere (or in Makefile.config with WITH_ICONV_PATH). Custom library loading is not (yet) supported
Darkvater
parents: 3406
diff changeset
   499
1da501b2eae1 (svn r4219) - Add support for WITH_ICONV. It is enabled by default for OSX > 10.3 for all others set it with WITH_ICONV in Makefile.config or with --with-iconv with configure. --with-config=/somedir will search for iconv include files somewhere (or in Makefile.config with WITH_ICONV_PATH). Custom library loading is not (yet) supported
Darkvater
parents: 3406
diff changeset
   500
ifdef WITH_ICONV
1da501b2eae1 (svn r4219) - Add support for WITH_ICONV. It is enabled by default for OSX > 10.3 for all others set it with WITH_ICONV in Makefile.config or with --with-iconv with configure. --with-config=/somedir will search for iconv include files somewhere (or in Makefile.config with WITH_ICONV_PATH). Custom library loading is not (yet) supported
Darkvater
parents: 3406
diff changeset
   501
	CDEFS += -DWITH_ICONV
1da501b2eae1 (svn r4219) - Add support for WITH_ICONV. It is enabled by default for OSX > 10.3 for all others set it with WITH_ICONV in Makefile.config or with --with-iconv with configure. --with-config=/somedir will search for iconv include files somewhere (or in Makefile.config with WITH_ICONV_PATH). Custom library loading is not (yet) supported
Darkvater
parents: 3406
diff changeset
   502
	ifdef WITH_ICONV_PATH
1da501b2eae1 (svn r4219) - Add support for WITH_ICONV. It is enabled by default for OSX > 10.3 for all others set it with WITH_ICONV in Makefile.config or with --with-iconv with configure. --with-config=/somedir will search for iconv include files somewhere (or in Makefile.config with WITH_ICONV_PATH). Custom library loading is not (yet) supported
Darkvater
parents: 3406
diff changeset
   503
		CFLAGS += -I$(WITH_ICONV_PATH)
1da501b2eae1 (svn r4219) - Add support for WITH_ICONV. It is enabled by default for OSX > 10.3 for all others set it with WITH_ICONV in Makefile.config or with --with-iconv with configure. --with-config=/somedir will search for iconv include files somewhere (or in Makefile.config with WITH_ICONV_PATH). Custom library loading is not (yet) supported
Darkvater
parents: 3406
diff changeset
   504
	endif
3294
6aab2bd8b924 (svn r4019) -Fix: [OSX] stopped using iconv for 10.2.8, since it was added in 10.3
bjarni
parents: 3260
diff changeset
   505
endif
3260
ed19f95eb4f7 (svn r3966) -Fix: [OSX and some linux] [ 1157244 ] Can't save game if name contains german umlauts
bjarni
parents: 3214
diff changeset
   506
347
8b6874b7ed27 (svn r530) Makefile: added ability to switch asserts on and off
bjarni
parents: 285
diff changeset
   507
# enables/disables assert()
348
3345a78d37e4 (svn r531) Makefile: made asserts enabled by default
bjarni
parents: 347
diff changeset
   508
ifdef DISABLE_ASSERTS
3345a78d37e4 (svn r531) Makefile: made asserts enabled by default
bjarni
parents: 347
diff changeset
   509
CFLAGS += -DNDEBUG
3345a78d37e4 (svn r531) Makefile: made asserts enabled by default
bjarni
parents: 347
diff changeset
   510
endif
3345a78d37e4 (svn r531) Makefile: made asserts enabled by default
bjarni
parents: 347
diff changeset
   511
4324
9682c016b892 (svn r5978) -Add: allow a switch in Makefile.config to disable threads in OpenTTD (no matter what system you are on). Only useful for testing.
truelight
parents: 4300
diff changeset
   512
ifdef NO_THREADS
9682c016b892 (svn r5978) -Add: allow a switch in Makefile.config to disable threads in OpenTTD (no matter what system you are on). Only useful for testing.
truelight
parents: 4300
diff changeset
   513
CFLAGS += -DNO_THREADS
9682c016b892 (svn r5978) -Add: allow a switch in Makefile.config to disable threads in OpenTTD (no matter what system you are on). Only useful for testing.
truelight
parents: 4300
diff changeset
   514
endif
9682c016b892 (svn r5978) -Add: allow a switch in Makefile.config to disable threads in OpenTTD (no matter what system you are on). Only useful for testing.
truelight
parents: 4300
diff changeset
   515
348
3345a78d37e4 (svn r531) Makefile: made asserts enabled by default
bjarni
parents: 347
diff changeset
   516
# automatically disables asserts for release
3345a78d37e4 (svn r531) Makefile: made asserts enabled by default
bjarni
parents: 347
diff changeset
   517
ifdef RELEASE
347
8b6874b7ed27 (svn r530) Makefile: added ability to switch asserts on and off
bjarni
parents: 285
diff changeset
   518
ifndef ENABLE_ASSERTS
8b6874b7ed27 (svn r530) Makefile: added ability to switch asserts on and off
bjarni
parents: 285
diff changeset
   519
CFLAGS += -DNDEBUG
8b6874b7ed27 (svn r530) Makefile: added ability to switch asserts on and off
bjarni
parents: 285
diff changeset
   520
endif
348
3345a78d37e4 (svn r531) Makefile: made asserts enabled by default
bjarni
parents: 347
diff changeset
   521
endif
0
29654efe3188 (svn r1) Import of revision 975 of old (crashed) SVN
truelight
parents:
diff changeset
   522
29654efe3188 (svn r1) Import of revision 975 of old (crashed) SVN
truelight
parents:
diff changeset
   523
ifdef TRANSLATOR
29654efe3188 (svn r1) Import of revision 975 of old (crashed) SVN
truelight
parents:
diff changeset
   524
STRGEN_FLAGS=-t
29654efe3188 (svn r1) Import of revision 975 of old (crashed) SVN
truelight
parents:
diff changeset
   525
else
29654efe3188 (svn r1) Import of revision 975 of old (crashed) SVN
truelight
parents:
diff changeset
   526
STRGEN_FLAGS=
29654efe3188 (svn r1) Import of revision 975 of old (crashed) SVN
truelight
parents:
diff changeset
   527
endif
29654efe3188 (svn r1) Import of revision 975 of old (crashed) SVN
truelight
parents:
diff changeset
   528
2555
6ec2270f7ae7 (svn r3088) -Fix: [OSX] fixed issue where OSX could not dynamic link to quicktime [ 1334917 ]
bjarni
parents: 2505
diff changeset
   529
# OSX specific setup
0
29654efe3188 (svn r1) Import of revision 975 of old (crashed) SVN
truelight
parents:
diff changeset
   530
ifdef OSX
2719
75b0750edccf (svn r3264) -Codechange: [OSX] OSX targets will now always use the preprocessor to determine endianess
bjarni
parents: 2717
diff changeset
   531
	# set the endian flag for OSX, that can't fail
75b0750edccf (svn r3264) -Codechange: [OSX] OSX targets will now always use the preprocessor to determine endianess
bjarni
parents: 2717
diff changeset
   532
	ENDIAN_FORCE:=PREPROCESSOR
75b0750edccf (svn r3264) -Codechange: [OSX] OSX targets will now always use the preprocessor to determine endianess
bjarni
parents: 2717
diff changeset
   533
3900
2c84ed52709d (svn r4987) Feature: Merged YAPF into trunk. Thanks to devs for continuous support and users for testing.
KUDr
parents: 3866
diff changeset
   534
	# -lrt fails on OSX, so we disable it
2c84ed52709d (svn r4987) Feature: Merged YAPF into trunk. Thanks to devs for continuous support and users for testing.
KUDr
parents: 3866
diff changeset
   535
	LRT:=
2c84ed52709d (svn r4987) Feature: Merged YAPF into trunk. Thanks to devs for continuous support and users for testing.
KUDr
parents: 3866
diff changeset
   536
2555
6ec2270f7ae7 (svn r3088) -Fix: [OSX] fixed issue where OSX could not dynamic link to quicktime [ 1334917 ]
bjarni
parents: 2505
diff changeset
   537
	ifndef DEDICATED
6ec2270f7ae7 (svn r3088) -Fix: [OSX] fixed issue where OSX could not dynamic link to quicktime [ 1334917 ]
bjarni
parents: 2505
diff changeset
   538
		LIBS += -framework QuickTime
6ec2270f7ae7 (svn r3088) -Fix: [OSX] fixed issue where OSX could not dynamic link to quicktime [ 1334917 ]
bjarni
parents: 2505
diff changeset
   539
	endif
6ec2270f7ae7 (svn r3088) -Fix: [OSX] fixed issue where OSX could not dynamic link to quicktime [ 1334917 ]
bjarni
parents: 2505
diff changeset
   540
2736
3d6487cbbb69 (svn r3281) -Feature: [OSX] added native cocoa sound and video drivers (egladil)
bjarni
parents: 2735
diff changeset
   541
	ifdef WITH_COCOA
3d6487cbbb69 (svn r3281) -Feature: [OSX] added native cocoa sound and video drivers (egladil)
bjarni
parents: 2735
diff changeset
   542
		CDEFS += -DWITH_COCOA
3d6487cbbb69 (svn r3281) -Feature: [OSX] added native cocoa sound and video drivers (egladil)
bjarni
parents: 2735
diff changeset
   543
		LIBS += -F/System/Library/Frameworks -framework Cocoa -framework Carbon -framework AudioUnit
3d6487cbbb69 (svn r3281) -Feature: [OSX] added native cocoa sound and video drivers (egladil)
bjarni
parents: 2735
diff changeset
   544
	endif
3d6487cbbb69 (svn r3281) -Feature: [OSX] added native cocoa sound and video drivers (egladil)
bjarni
parents: 2735
diff changeset
   545
2555
6ec2270f7ae7 (svn r3088) -Fix: [OSX] fixed issue where OSX could not dynamic link to quicktime [ 1334917 ]
bjarni
parents: 2505
diff changeset
   546
	# OSX path setup
6ec2270f7ae7 (svn r3088) -Fix: [OSX] fixed issue where OSX could not dynamic link to quicktime [ 1334917 ]
bjarni
parents: 2505
diff changeset
   547
	ifndef SECOND_DATA_PATH
6ec2270f7ae7 (svn r3088) -Fix: [OSX] fixed issue where OSX could not dynamic link to quicktime [ 1334917 ]
bjarni
parents: 2505
diff changeset
   548
		SECOND_DATA_PATH:="$(OSXAPP)/Contents/Data/"
6ec2270f7ae7 (svn r3088) -Fix: [OSX] fixed issue where OSX could not dynamic link to quicktime [ 1334917 ]
bjarni
parents: 2505
diff changeset
   549
	endif
6ec2270f7ae7 (svn r3088) -Fix: [OSX] fixed issue where OSX could not dynamic link to quicktime [ 1334917 ]
bjarni
parents: 2505
diff changeset
   550
6ec2270f7ae7 (svn r3088) -Fix: [OSX] fixed issue where OSX could not dynamic link to quicktime [ 1334917 ]
bjarni
parents: 2505
diff changeset
   551
	ifndef CUSTOM_LANG_DIR
6ec2270f7ae7 (svn r3088) -Fix: [OSX] fixed issue where OSX could not dynamic link to quicktime [ 1334917 ]
bjarni
parents: 2505
diff changeset
   552
		ifndef DEDICATED
6ec2270f7ae7 (svn r3088) -Fix: [OSX] fixed issue where OSX could not dynamic link to quicktime [ 1334917 ]
bjarni
parents: 2505
diff changeset
   553
		CUSTOM_LANG_DIR:="$(OSXAPP)/Contents/Lang/"
6ec2270f7ae7 (svn r3088) -Fix: [OSX] fixed issue where OSX could not dynamic link to quicktime [ 1334917 ]
bjarni
parents: 2505
diff changeset
   554
		endif
6ec2270f7ae7 (svn r3088) -Fix: [OSX] fixed issue where OSX could not dynamic link to quicktime [ 1334917 ]
bjarni
parents: 2505
diff changeset
   555
	endif
2500
92bc404b86ca (svn r3026) -Fix: [OSX] fixed bug that prevented dedicated servers from compiling (introduced in r3022)
bjarni
parents: 2497
diff changeset
   556
endif
0
29654efe3188 (svn r1) Import of revision 975 of old (crashed) SVN
truelight
parents:
diff changeset
   557
29654efe3188 (svn r1) Import of revision 975 of old (crashed) SVN
truelight
parents:
diff changeset
   558
ifdef MIDI
29654efe3188 (svn r1) Import of revision 975 of old (crashed) SVN
truelight
parents:
diff changeset
   559
CDEFS += -DEXTERNAL_PLAYER=\"$(MIDI)\"
29654efe3188 (svn r1) Import of revision 975 of old (crashed) SVN
truelight
parents:
diff changeset
   560
ifdef MIDI_ARG
29654efe3188 (svn r1) Import of revision 975 of old (crashed) SVN
truelight
parents:
diff changeset
   561
CDEFS += -DMIDI_ARG=\"$(MIDI_ARG)\"
29654efe3188 (svn r1) Import of revision 975 of old (crashed) SVN
truelight
parents:
diff changeset
   562
endif
29654efe3188 (svn r1) Import of revision 975 of old (crashed) SVN
truelight
parents:
diff changeset
   563
endif
29654efe3188 (svn r1) Import of revision 975 of old (crashed) SVN
truelight
parents:
diff changeset
   564
29654efe3188 (svn r1) Import of revision 975 of old (crashed) SVN
truelight
parents:
diff changeset
   565
ifdef WITH_NETWORK
29654efe3188 (svn r1) Import of revision 975 of old (crashed) SVN
truelight
parents:
diff changeset
   566
CDEFS += -DENABLE_NETWORK
543
946badd71033 (svn r942) -Merged branch/network back into the trunk
truelight
parents: 532
diff changeset
   567
ifdef QNX
946badd71033 (svn r942) -Merged branch/network back into the trunk
truelight
parents: 532
diff changeset
   568
LIBS += -lsocket
946badd71033 (svn r942) -Merged branch/network back into the trunk
truelight
parents: 532
diff changeset
   569
endif
0
29654efe3188 (svn r1) Import of revision 975 of old (crashed) SVN
truelight
parents:
diff changeset
   570
endif
29654efe3188 (svn r1) Import of revision 975 of old (crashed) SVN
truelight
parents:
diff changeset
   571
561
9a0c469a251c (svn r970) Added 2nd data path for all non-windows OSes
bjarni
parents: 551
diff changeset
   572
9a0c469a251c (svn r970) Added 2nd data path for all non-windows OSes
bjarni
parents: 551
diff changeset
   573
ifdef SECOND_DATA_PATH
9a0c469a251c (svn r970) Added 2nd data path for all non-windows OSes
bjarni
parents: 551
diff changeset
   574
CDEFS += -DSECOND_DATA_DIR=\"$(SECOND_DATA_PATH)/\"
9a0c469a251c (svn r970) Added 2nd data path for all non-windows OSes
bjarni
parents: 551
diff changeset
   575
endif
9a0c469a251c (svn r970) Added 2nd data path for all non-windows OSes
bjarni
parents: 551
diff changeset
   576
9a0c469a251c (svn r970) Added 2nd data path for all non-windows OSes
bjarni
parents: 551
diff changeset
   577
ifdef CUSTOM_LANG_DIR
9a0c469a251c (svn r970) Added 2nd data path for all non-windows OSes
bjarni
parents: 551
diff changeset
   578
CDEFS += -DCUSTOM_LANG_DIR=\"$(CUSTOM_LANG_DIR)/\"
9a0c469a251c (svn r970) Added 2nd data path for all non-windows OSes
bjarni
parents: 551
diff changeset
   579
endif
9a0c469a251c (svn r970) Added 2nd data path for all non-windows OSes
bjarni
parents: 551
diff changeset
   580
0
29654efe3188 (svn r1) Import of revision 975 of old (crashed) SVN
truelight
parents:
diff changeset
   581
ifdef WITH_DIRECTMUSIC
29654efe3188 (svn r1) Import of revision 975 of old (crashed) SVN
truelight
parents:
diff changeset
   582
CDEFS += -DWIN32_ENABLE_DIRECTMUSIC_SUPPORT
29654efe3188 (svn r1) Import of revision 975 of old (crashed) SVN
truelight
parents:
diff changeset
   583
endif
29654efe3188 (svn r1) Import of revision 975 of old (crashed) SVN
truelight
parents:
diff changeset
   584
29654efe3188 (svn r1) Import of revision 975 of old (crashed) SVN
truelight
parents:
diff changeset
   585
ifdef WIN32
1692
0b52df38cabc (svn r2196) -Change: updated the Makefile, now it works for crossplatform compiling
TrueLight
parents: 1629
diff changeset
   586
LIBS += -lws2_32 -lwinmm -lgdi32 -ldxguid -lole32
0b52df38cabc (svn r2196) -Change: updated the Makefile, now it works for crossplatform compiling
TrueLight
parents: 1629
diff changeset
   587
ifdef WITH_DIRECTMUSIC
0b52df38cabc (svn r2196) -Change: updated the Makefile, now it works for crossplatform compiling
TrueLight
parents: 1629
diff changeset
   588
LIBS += -lstdc++
0b52df38cabc (svn r2196) -Change: updated the Makefile, now it works for crossplatform compiling
TrueLight
parents: 1629
diff changeset
   589
endif
0
29654efe3188 (svn r1) Import of revision 975 of old (crashed) SVN
truelight
parents:
diff changeset
   590
TTDLDFLAGS += -Wl,--subsystem,windows
29654efe3188 (svn r1) Import of revision 975 of old (crashed) SVN
truelight
parents:
diff changeset
   591
endif
29654efe3188 (svn r1) Import of revision 975 of old (crashed) SVN
truelight
parents:
diff changeset
   592
1476
c1e4ba7193db (svn r1980) Check $DESTDIR if $DEST_DIR was not set.
pasky
parents: 1435
diff changeset
   593
ifndef DEST_DIR
c1e4ba7193db (svn r1980) Check $DESTDIR if $DEST_DIR was not set.
pasky
parents: 1435
diff changeset
   594
DEST_DIR = $(DESTDIR)
c1e4ba7193db (svn r1980) Check $DESTDIR if $DEST_DIR was not set.
pasky
parents: 1435
diff changeset
   595
endif
c1e4ba7193db (svn r1980) Check $DESTDIR if $DEST_DIR was not set.
pasky
parents: 1435
diff changeset
   596
0
29654efe3188 (svn r1) Import of revision 975 of old (crashed) SVN
truelight
parents:
diff changeset
   597
# sets up the paths for use for make install
285
cf5213c8a919 (svn r291) Minor fix to english.txt
bjarni
parents: 222
diff changeset
   598
ifdef INSTALL
cf5213c8a919 (svn r291) Minor fix to english.txt
bjarni
parents: 222
diff changeset
   599
# We use _PREFIXED vars here, so the paths are recalculated every time, and
cf5213c8a919 (svn r291) Minor fix to english.txt
bjarni
parents: 222
diff changeset
   600
# the prefix is not prepended in the makefile config
cf5213c8a919 (svn r291) Minor fix to english.txt
bjarni
parents: 222
diff changeset
   601
BINARY_DIR_PREFIXED:=$(PREFIX)/$(BINARY_DIR)
cf5213c8a919 (svn r291) Minor fix to english.txt
bjarni
parents: 222
diff changeset
   602
DATA_DIR_PREFIXED:=$(PREFIX)/$(DATA_DIR)
2901
c9a1a969b017 (svn r3456) - Feature: [Makefile] Icons can now be installed in a seperate directory.
matthijs
parents: 2835
diff changeset
   603
ICON_DIR_PREFIXED:=$(PREFIX)/$(ICON_DIR)
285
cf5213c8a919 (svn r291) Minor fix to english.txt
bjarni
parents: 222
diff changeset
   604
# We use _INSTALL vars here, these vars are the locations where the files will
cf5213c8a919 (svn r291) Minor fix to english.txt
bjarni
parents: 222
diff changeset
   605
# be installed
cf5213c8a919 (svn r291) Minor fix to english.txt
bjarni
parents: 222
diff changeset
   606
DATA_DIR_INSTALL=$(DEST_DIR)/$(DATA_DIR_PREFIXED)
cf5213c8a919 (svn r291) Minor fix to english.txt
bjarni
parents: 222
diff changeset
   607
BINARY_DIR_INSTALL=$(DEST_DIR)/$(BINARY_DIR_PREFIXED)
2901
c9a1a969b017 (svn r3456) - Feature: [Makefile] Icons can now be installed in a seperate directory.
matthijs
parents: 2835
diff changeset
   608
ICON_DIR_INSTALL=$(DEST_DIR)/$(ICON_DIR_PREFIXED)
285
cf5213c8a919 (svn r291) Minor fix to english.txt
bjarni
parents: 222
diff changeset
   609
# Let the code know where to find stuff
cf5213c8a919 (svn r291) Minor fix to english.txt
bjarni
parents: 222
diff changeset
   610
ifdef DATA_DIR_PREFIXED
cf5213c8a919 (svn r291) Minor fix to english.txt
bjarni
parents: 222
diff changeset
   611
CDEFS += -DGAME_DATA_DIR=\"$(DATA_DIR_PREFIXED)/\"
0
29654efe3188 (svn r1) Import of revision 975 of old (crashed) SVN
truelight
parents:
diff changeset
   612
endif
285
cf5213c8a919 (svn r291) Minor fix to english.txt
bjarni
parents: 222
diff changeset
   613
cf5213c8a919 (svn r291) Minor fix to english.txt
bjarni
parents: 222
diff changeset
   614
ifdef PERSONAL_DIR
cf5213c8a919 (svn r291) Minor fix to english.txt
bjarni
parents: 222
diff changeset
   615
CDEFS += -DPERSONAL_DIR=\"$(PERSONAL_DIR)/\"
cf5213c8a919 (svn r291) Minor fix to english.txt
bjarni
parents: 222
diff changeset
   616
endif
cf5213c8a919 (svn r291) Minor fix to english.txt
bjarni
parents: 222
diff changeset
   617
cf5213c8a919 (svn r291) Minor fix to english.txt
bjarni
parents: 222
diff changeset
   618
ifdef USE_HOMEDIR
cf5213c8a919 (svn r291) Minor fix to english.txt
bjarni
parents: 222
diff changeset
   619
CDEFS += -DUSE_HOMEDIR
cf5213c8a919 (svn r291) Minor fix to english.txt
bjarni
parents: 222
diff changeset
   620
endif
4256
5e29191a88a1 (svn r5872) - Feature: Add an icon to the SDL openttd executable.
Darkvater
parents: 4220
diff changeset
   621
5e29191a88a1 (svn r5872) - Feature: Add an icon to the SDL openttd executable.
Darkvater
parents: 4220
diff changeset
   622
ifdef ICON_DIR
5e29191a88a1 (svn r5872) - Feature: Add an icon to the SDL openttd executable.
Darkvater
parents: 4220
diff changeset
   623
CDEFS += -DICON_DIR=\"$(ICON_DIR_PREFIXED)/\"
5e29191a88a1 (svn r5872) - Feature: Add an icon to the SDL openttd executable.
Darkvater
parents: 4220
diff changeset
   624
endif
0
29654efe3188 (svn r1) Import of revision 975 of old (crashed) SVN
truelight
parents:
diff changeset
   625
endif
29654efe3188 (svn r1) Import of revision 975 of old (crashed) SVN
truelight
parents:
diff changeset
   626
29654efe3188 (svn r1) Import of revision 975 of old (crashed) SVN
truelight
parents:
diff changeset
   627
##############################################################################
29654efe3188 (svn r1) Import of revision 975 of old (crashed) SVN
truelight
parents:
diff changeset
   628
#
29654efe3188 (svn r1) Import of revision 975 of old (crashed) SVN
truelight
parents:
diff changeset
   629
# What to compile
29654efe3188 (svn r1) Import of revision 975 of old (crashed) SVN
truelight
parents:
diff changeset
   630
# (users do not want to modify anything below)
29654efe3188 (svn r1) Import of revision 975 of old (crashed) SVN
truelight
parents:
diff changeset
   631
#
29654efe3188 (svn r1) Import of revision 975 of old (crashed) SVN
truelight
parents:
diff changeset
   632
29654efe3188 (svn r1) Import of revision 975 of old (crashed) SVN
truelight
parents:
diff changeset
   633
29654efe3188 (svn r1) Import of revision 975 of old (crashed) SVN
truelight
parents:
diff changeset
   634
### Sources
29654efe3188 (svn r1) Import of revision 975 of old (crashed) SVN
truelight
parents:
diff changeset
   635
2713
9c42385e4f41 (svn r3258) -Feature: [OSX] added support for universal binaries
bjarni
parents: 2712
diff changeset
   636
# clean up C_SOURCES first. Needed since building universal binaries on OSX calls the makefile recursively (just one time)
2735
07adb417aa05 (svn r3280) Merge the seperate (C|CXX|OBJC)_SOURCES variables into a single variable SRCS
tron
parents: 2731
diff changeset
   637
SRCS :=
2713
9c42385e4f41 (svn r3258) -Feature: [OSX] added support for universal binaries
bjarni
parents: 2712
diff changeset
   638
2735
07adb417aa05 (svn r3280) Merge the seperate (C|CXX|OBJC)_SOURCES variables into a single variable SRCS
tron
parents: 2731
diff changeset
   639
SRCS += aircraft_cmd.c
07adb417aa05 (svn r3280) Merge the seperate (C|CXX|OBJC)_SOURCES variables into a single variable SRCS
tron
parents: 2731
diff changeset
   640
SRCS += aircraft_gui.c
07adb417aa05 (svn r3280) Merge the seperate (C|CXX|OBJC)_SOURCES variables into a single variable SRCS
tron
parents: 2731
diff changeset
   641
SRCS += airport.c
07adb417aa05 (svn r3280) Merge the seperate (C|CXX|OBJC)_SOURCES variables into a single variable SRCS
tron
parents: 2731
diff changeset
   642
SRCS += airport_gui.c
07adb417aa05 (svn r3280) Merge the seperate (C|CXX|OBJC)_SOURCES variables into a single variable SRCS
tron
parents: 2731
diff changeset
   643
SRCS += aystar.c
4300
c7e43c47a2b9 (svn r5946) -Add: merged the TGP branch to mainline. TGP adds:
truelight
parents: 4290
diff changeset
   644
SRCS += bmp.c
2735
07adb417aa05 (svn r3280) Merge the seperate (C|CXX|OBJC)_SOURCES variables into a single variable SRCS
tron
parents: 2731
diff changeset
   645
SRCS += bridge_gui.c
3214
dd744119dfac (svn r3887) Add a function to get the other bridge end when you're at a bridge ramp
tron
parents: 3212
diff changeset
   646
SRCS += bridge_map.c
2735
07adb417aa05 (svn r3280) Merge the seperate (C|CXX|OBJC)_SOURCES variables into a single variable SRCS
tron
parents: 2731
diff changeset
   647
SRCS += callback_table.c
07adb417aa05 (svn r3280) Merge the seperate (C|CXX|OBJC)_SOURCES variables into a single variable SRCS
tron
parents: 2731
diff changeset
   648
SRCS += clear_cmd.c
07adb417aa05 (svn r3280) Merge the seperate (C|CXX|OBJC)_SOURCES variables into a single variable SRCS
tron
parents: 2731
diff changeset
   649
SRCS += command.c
07adb417aa05 (svn r3280) Merge the seperate (C|CXX|OBJC)_SOURCES variables into a single variable SRCS
tron
parents: 2731
diff changeset
   650
SRCS += console.c
07adb417aa05 (svn r3280) Merge the seperate (C|CXX|OBJC)_SOURCES variables into a single variable SRCS
tron
parents: 2731
diff changeset
   651
SRCS += console_cmds.c
07adb417aa05 (svn r3280) Merge the seperate (C|CXX|OBJC)_SOURCES variables into a single variable SRCS
tron
parents: 2731
diff changeset
   652
SRCS += currency.c
4261
28670f743746 (svn r5887) -Cleanup: move date related functions, defines and variables to date.[ch]
rubidium
parents: 4256
diff changeset
   653
SRCS += date.c
2735
07adb417aa05 (svn r3280) Merge the seperate (C|CXX|OBJC)_SOURCES variables into a single variable SRCS
tron
parents: 2731
diff changeset
   654
SRCS += debug.c
07adb417aa05 (svn r3280) Merge the seperate (C|CXX|OBJC)_SOURCES variables into a single variable SRCS
tron
parents: 2731
diff changeset
   655
SRCS += dedicated.c
07adb417aa05 (svn r3280) Merge the seperate (C|CXX|OBJC)_SOURCES variables into a single variable SRCS
tron
parents: 2731
diff changeset
   656
SRCS += depot.c
4638
05955c6cb536 (svn r6513) -Codechange: unified the code to draw depot windows
bjarni
parents: 4562
diff changeset
   657
SRCS += depot_gui.c
2735
07adb417aa05 (svn r3280) Merge the seperate (C|CXX|OBJC)_SOURCES variables into a single variable SRCS
tron
parents: 2731
diff changeset
   658
SRCS += disaster_cmd.c
07adb417aa05 (svn r3280) Merge the seperate (C|CXX|OBJC)_SOURCES variables into a single variable SRCS
tron
parents: 2731
diff changeset
   659
SRCS += dock_gui.c
07adb417aa05 (svn r3280) Merge the seperate (C|CXX|OBJC)_SOURCES variables into a single variable SRCS
tron
parents: 2731
diff changeset
   660
SRCS += driver.c
07adb417aa05 (svn r3280) Merge the seperate (C|CXX|OBJC)_SOURCES variables into a single variable SRCS
tron
parents: 2731
diff changeset
   661
SRCS += dummy_land.c
07adb417aa05 (svn r3280) Merge the seperate (C|CXX|OBJC)_SOURCES variables into a single variable SRCS
tron
parents: 2731
diff changeset
   662
SRCS += economy.c
3355
e414a0b104a6 (svn r4150) -Feature: Merged elrails into trunk. Thanks to Tron for lots of code and proofreading, thanks to peter1138 for another lot of code and ideas.
celestar
parents: 3354
diff changeset
   663
SRCS += elrail.c
2735
07adb417aa05 (svn r3280) Merge the seperate (C|CXX|OBJC)_SOURCES variables into a single variable SRCS
tron
parents: 2731
diff changeset
   664
SRCS += engine.c
07adb417aa05 (svn r3280) Merge the seperate (C|CXX|OBJC)_SOURCES variables into a single variable SRCS
tron
parents: 2731
diff changeset
   665
SRCS += engine_gui.c
07adb417aa05 (svn r3280) Merge the seperate (C|CXX|OBJC)_SOURCES variables into a single variable SRCS
tron
parents: 2731
diff changeset
   666
SRCS += fileio.c
4220
e3bee34c9076 (svn r5764) - Cleanup: - Cleanup: Move the now unified FiosAlloc, compare_FiosItems, FiosFreeSavegameList, FiosMakeSavegameName, FiosDelete and FileExists to newly created file fios.c where it belongs.
Darkvater
parents: 4135
diff changeset
   667
SRCS += fios.c
4300
c7e43c47a2b9 (svn r5946) -Add: merged the TGP branch to mainline. TGP adds:
truelight
parents: 4290
diff changeset
   668
SRCS += genworld.c
c7e43c47a2b9 (svn r5946) -Add: merged the TGP branch to mainline. TGP adds:
truelight
parents: 4290
diff changeset
   669
SRCS += genworld_gui.c
2735
07adb417aa05 (svn r3280) Merge the seperate (C|CXX|OBJC)_SOURCES variables into a single variable SRCS
tron
parents: 2731
diff changeset
   670
SRCS += gfx.c
07adb417aa05 (svn r3280) Merge the seperate (C|CXX|OBJC)_SOURCES variables into a single variable SRCS
tron
parents: 2731
diff changeset
   671
SRCS += gfxinit.c
07adb417aa05 (svn r3280) Merge the seperate (C|CXX|OBJC)_SOURCES variables into a single variable SRCS
tron
parents: 2731
diff changeset
   672
SRCS += graph_gui.c
4300
c7e43c47a2b9 (svn r5946) -Add: merged the TGP branch to mainline. TGP adds:
truelight
parents: 4290
diff changeset
   673
SRCS += heightmap.c
2735
07adb417aa05 (svn r3280) Merge the seperate (C|CXX|OBJC)_SOURCES variables into a single variable SRCS
tron
parents: 2731
diff changeset
   674
SRCS += industry_cmd.c
07adb417aa05 (svn r3280) Merge the seperate (C|CXX|OBJC)_SOURCES variables into a single variable SRCS
tron
parents: 2731
diff changeset
   675
SRCS += industry_gui.c
07adb417aa05 (svn r3280) Merge the seperate (C|CXX|OBJC)_SOURCES variables into a single variable SRCS
tron
parents: 2731
diff changeset
   676
SRCS += intro_gui.c
07adb417aa05 (svn r3280) Merge the seperate (C|CXX|OBJC)_SOURCES variables into a single variable SRCS
tron
parents: 2731
diff changeset
   677
SRCS += landscape.c
07adb417aa05 (svn r3280) Merge the seperate (C|CXX|OBJC)_SOURCES variables into a single variable SRCS
tron
parents: 2731
diff changeset
   678
SRCS += main_gui.c
07adb417aa05 (svn r3280) Merge the seperate (C|CXX|OBJC)_SOURCES variables into a single variable SRCS
tron
parents: 2731
diff changeset
   679
SRCS += map.c
07adb417aa05 (svn r3280) Merge the seperate (C|CXX|OBJC)_SOURCES variables into a single variable SRCS
tron
parents: 2731
diff changeset
   680
SRCS += md5.c
07adb417aa05 (svn r3280) Merge the seperate (C|CXX|OBJC)_SOURCES variables into a single variable SRCS
tron
parents: 2731
diff changeset
   681
SRCS += mersenne.c
07adb417aa05 (svn r3280) Merge the seperate (C|CXX|OBJC)_SOURCES variables into a single variable SRCS
tron
parents: 2731
diff changeset
   682
SRCS += minilzo.c
07adb417aa05 (svn r3280) Merge the seperate (C|CXX|OBJC)_SOURCES variables into a single variable SRCS
tron
parents: 2731
diff changeset
   683
SRCS += misc.c
07adb417aa05 (svn r3280) Merge the seperate (C|CXX|OBJC)_SOURCES variables into a single variable SRCS
tron
parents: 2731
diff changeset
   684
SRCS += misc_cmd.c
07adb417aa05 (svn r3280) Merge the seperate (C|CXX|OBJC)_SOURCES variables into a single variable SRCS
tron
parents: 2731
diff changeset
   685
SRCS += misc_gui.c
07adb417aa05 (svn r3280) Merge the seperate (C|CXX|OBJC)_SOURCES variables into a single variable SRCS
tron
parents: 2731
diff changeset
   686
SRCS += mixer.c
4120
b21fda0c260a (svn r5464) [Behaviour Fix] : When starting the game, the system will now verify the presence of music files in gm forlder.
belugas
parents: 4113
diff changeset
   687
SRCS += music.c
2735
07adb417aa05 (svn r3280) Merge the seperate (C|CXX|OBJC)_SOURCES variables into a single variable SRCS
tron
parents: 2731
diff changeset
   688
SRCS += music_gui.c
07adb417aa05 (svn r3280) Merge the seperate (C|CXX|OBJC)_SOURCES variables into a single variable SRCS
tron
parents: 2731
diff changeset
   689
SRCS += namegen.c
07adb417aa05 (svn r3280) Merge the seperate (C|CXX|OBJC)_SOURCES variables into a single variable SRCS
tron
parents: 2731
diff changeset
   690
SRCS += network.c
07adb417aa05 (svn r3280) Merge the seperate (C|CXX|OBJC)_SOURCES variables into a single variable SRCS
tron
parents: 2731
diff changeset
   691
SRCS += network_client.c
07adb417aa05 (svn r3280) Merge the seperate (C|CXX|OBJC)_SOURCES variables into a single variable SRCS
tron
parents: 2731
diff changeset
   692
SRCS += network_data.c
07adb417aa05 (svn r3280) Merge the seperate (C|CXX|OBJC)_SOURCES variables into a single variable SRCS
tron
parents: 2731
diff changeset
   693
SRCS += network_gamelist.c
07adb417aa05 (svn r3280) Merge the seperate (C|CXX|OBJC)_SOURCES variables into a single variable SRCS
tron
parents: 2731
diff changeset
   694
SRCS += network_gui.c
07adb417aa05 (svn r3280) Merge the seperate (C|CXX|OBJC)_SOURCES variables into a single variable SRCS
tron
parents: 2731
diff changeset
   695
SRCS += network_server.c
07adb417aa05 (svn r3280) Merge the seperate (C|CXX|OBJC)_SOURCES variables into a single variable SRCS
tron
parents: 2731
diff changeset
   696
SRCS += network_udp.c
07adb417aa05 (svn r3280) Merge the seperate (C|CXX|OBJC)_SOURCES variables into a single variable SRCS
tron
parents: 2731
diff changeset
   697
SRCS += newgrf.c
3866
b13553406a0a (svn r4902) Newgrf : Introduction of the newgrf_cargo files.
belugas
parents: 3745
diff changeset
   698
SRCS += newgrf_cargo.c
2962
f0a49b646c48 (svn r3524) - Split newgrf features from engine.[ch] into newgrf_engine.[ch], and add the new files to project files.
peter1138
parents: 2948
diff changeset
   699
SRCS += newgrf_engine.c
4656
9c1d8c4d3e60 (svn r6532) - Feature: Add support for NewGRF sound effects. Currently sound priority isn't supported.
peter1138
parents: 4638
diff changeset
   700
SRCS += newgrf_sound.c
3595
a0acdb23e662 (svn r4486) - NewGRF: Create and use a memory pool to manage sprite groups. This
peter1138
parents: 3409
diff changeset
   701
SRCS += newgrf_spritegroup.c
2963
f28ce0549513 (svn r3525) - Rename station_newgrf.[ch] to newgrf_station.[ch], and update project files.
peter1138
parents: 2962
diff changeset
   702
SRCS += newgrf_station.c
3601
138bf309cf27 (svn r4493) Newgrf : Action 04. Beginning of implementation.
belugas
parents: 3595
diff changeset
   703
SRCS += newgrf_text.c
2735
07adb417aa05 (svn r3280) Merge the seperate (C|CXX|OBJC)_SOURCES variables into a single variable SRCS
tron
parents: 2731
diff changeset
   704
SRCS += news_gui.c
07adb417aa05 (svn r3280) Merge the seperate (C|CXX|OBJC)_SOURCES variables into a single variable SRCS
tron
parents: 2731
diff changeset
   705
SRCS += npf.c
07adb417aa05 (svn r3280) Merge the seperate (C|CXX|OBJC)_SOURCES variables into a single variable SRCS
tron
parents: 2731
diff changeset
   706
SRCS += oldloader.c
07adb417aa05 (svn r3280) Merge the seperate (C|CXX|OBJC)_SOURCES variables into a single variable SRCS
tron
parents: 2731
diff changeset
   707
SRCS += openttd.c
07adb417aa05 (svn r3280) Merge the seperate (C|CXX|OBJC)_SOURCES variables into a single variable SRCS
tron
parents: 2731
diff changeset
   708
SRCS += order_cmd.c
07adb417aa05 (svn r3280) Merge the seperate (C|CXX|OBJC)_SOURCES variables into a single variable SRCS
tron
parents: 2731
diff changeset
   709
SRCS += order_gui.c
3341
b20541ef8945 (svn r4125) - Feature: Add a general TIC() TOC() mechanism using rdtsc or something similar on non-i386 architectures to performance-tune (critical) code. Some systems are probably missing, but those can be added later.
Darkvater
parents: 3334
diff changeset
   710
SRCS += os_timer.c
2735
07adb417aa05 (svn r3280) Merge the seperate (C|CXX|OBJC)_SOURCES variables into a single variable SRCS
tron
parents: 2731
diff changeset
   711
SRCS += pathfind.c
07adb417aa05 (svn r3280) Merge the seperate (C|CXX|OBJC)_SOURCES variables into a single variable SRCS
tron
parents: 2731
diff changeset
   712
SRCS += player_gui.c
07adb417aa05 (svn r3280) Merge the seperate (C|CXX|OBJC)_SOURCES variables into a single variable SRCS
tron
parents: 2731
diff changeset
   713
SRCS += players.c
07adb417aa05 (svn r3280) Merge the seperate (C|CXX|OBJC)_SOURCES variables into a single variable SRCS
tron
parents: 2731
diff changeset
   714
SRCS += pool.c
07adb417aa05 (svn r3280) Merge the seperate (C|CXX|OBJC)_SOURCES variables into a single variable SRCS
tron
parents: 2731
diff changeset
   715
SRCS += queue.c
07adb417aa05 (svn r3280) Merge the seperate (C|CXX|OBJC)_SOURCES variables into a single variable SRCS
tron
parents: 2731
diff changeset
   716
SRCS += rail.c
07adb417aa05 (svn r3280) Merge the seperate (C|CXX|OBJC)_SOURCES variables into a single variable SRCS
tron
parents: 2731
diff changeset
   717
SRCS += rail_cmd.c
07adb417aa05 (svn r3280) Merge the seperate (C|CXX|OBJC)_SOURCES variables into a single variable SRCS
tron
parents: 2731
diff changeset
   718
SRCS += rail_gui.c
07adb417aa05 (svn r3280) Merge the seperate (C|CXX|OBJC)_SOURCES variables into a single variable SRCS
tron
parents: 2731
diff changeset
   719
SRCS += rev.c
07adb417aa05 (svn r3280) Merge the seperate (C|CXX|OBJC)_SOURCES variables into a single variable SRCS
tron
parents: 2731
diff changeset
   720
SRCS += road_cmd.c
07adb417aa05 (svn r3280) Merge the seperate (C|CXX|OBJC)_SOURCES variables into a single variable SRCS
tron
parents: 2731
diff changeset
   721
SRCS += road_gui.c
3146
8d95593c5ff0 (svn r3766) Add a function to get the RoadBits from an arbitrary tile
tron
parents: 3141
diff changeset
   722
SRCS += road_map.c
2735
07adb417aa05 (svn r3280) Merge the seperate (C|CXX|OBJC)_SOURCES variables into a single variable SRCS
tron
parents: 2731
diff changeset
   723
SRCS += roadveh_cmd.c
07adb417aa05 (svn r3280) Merge the seperate (C|CXX|OBJC)_SOURCES variables into a single variable SRCS
tron
parents: 2731
diff changeset
   724
SRCS += roadveh_gui.c
07adb417aa05 (svn r3280) Merge the seperate (C|CXX|OBJC)_SOURCES variables into a single variable SRCS
tron
parents: 2731
diff changeset
   725
SRCS += saveload.c
07adb417aa05 (svn r3280) Merge the seperate (C|CXX|OBJC)_SOURCES variables into a single variable SRCS
tron
parents: 2731
diff changeset
   726
SRCS += screenshot.c
07adb417aa05 (svn r3280) Merge the seperate (C|CXX|OBJC)_SOURCES variables into a single variable SRCS
tron
parents: 2731
diff changeset
   727
SRCS += settings.c
07adb417aa05 (svn r3280) Merge the seperate (C|CXX|OBJC)_SOURCES variables into a single variable SRCS
tron
parents: 2731
diff changeset
   728
SRCS += settings_gui.c
07adb417aa05 (svn r3280) Merge the seperate (C|CXX|OBJC)_SOURCES variables into a single variable SRCS
tron
parents: 2731
diff changeset
   729
SRCS += ship_cmd.c
07adb417aa05 (svn r3280) Merge the seperate (C|CXX|OBJC)_SOURCES variables into a single variable SRCS
tron
parents: 2731
diff changeset
   730
SRCS += ship_gui.c
07adb417aa05 (svn r3280) Merge the seperate (C|CXX|OBJC)_SOURCES variables into a single variable SRCS
tron
parents: 2731
diff changeset
   731
SRCS += signs.c
07adb417aa05 (svn r3280) Merge the seperate (C|CXX|OBJC)_SOURCES variables into a single variable SRCS
tron
parents: 2731
diff changeset
   732
SRCS += smallmap_gui.c
07adb417aa05 (svn r3280) Merge the seperate (C|CXX|OBJC)_SOURCES variables into a single variable SRCS
tron
parents: 2731
diff changeset
   733
SRCS += sound.c
07adb417aa05 (svn r3280) Merge the seperate (C|CXX|OBJC)_SOURCES variables into a single variable SRCS
tron
parents: 2731
diff changeset
   734
SRCS += spritecache.c
07adb417aa05 (svn r3280) Merge the seperate (C|CXX|OBJC)_SOURCES variables into a single variable SRCS
tron
parents: 2731
diff changeset
   735
SRCS += station_cmd.c
07adb417aa05 (svn r3280) Merge the seperate (C|CXX|OBJC)_SOURCES variables into a single variable SRCS
tron
parents: 2731
diff changeset
   736
SRCS += station_gui.c
3334
2999d2ddc0f9 (svn r4113) Moved all relevant map functions for stations to station_map.[ch]
celestar
parents: 3313
diff changeset
   737
SRCS += station_map.c
2735
07adb417aa05 (svn r3280) Merge the seperate (C|CXX|OBJC)_SOURCES variables into a single variable SRCS
tron
parents: 2731
diff changeset
   738
SRCS += string.c
07adb417aa05 (svn r3280) Merge the seperate (C|CXX|OBJC)_SOURCES variables into a single variable SRCS
tron
parents: 2731
diff changeset
   739
SRCS += strings.c
07adb417aa05 (svn r3280) Merge the seperate (C|CXX|OBJC)_SOURCES variables into a single variable SRCS
tron
parents: 2731
diff changeset
   740
SRCS += subsidy_gui.c
07adb417aa05 (svn r3280) Merge the seperate (C|CXX|OBJC)_SOURCES variables into a single variable SRCS
tron
parents: 2731
diff changeset
   741
SRCS += terraform_gui.c
07adb417aa05 (svn r3280) Merge the seperate (C|CXX|OBJC)_SOURCES variables into a single variable SRCS
tron
parents: 2731
diff changeset
   742
SRCS += texteff.c
4300
c7e43c47a2b9 (svn r5946) -Add: merged the TGP branch to mainline. TGP adds:
truelight
parents: 4290
diff changeset
   743
SRCS += tgp.c
2735
07adb417aa05 (svn r3280) Merge the seperate (C|CXX|OBJC)_SOURCES variables into a single variable SRCS
tron
parents: 2731
diff changeset
   744
SRCS += thread.c
07adb417aa05 (svn r3280) Merge the seperate (C|CXX|OBJC)_SOURCES variables into a single variable SRCS
tron
parents: 2731
diff changeset
   745
SRCS += tile.c
07adb417aa05 (svn r3280) Merge the seperate (C|CXX|OBJC)_SOURCES variables into a single variable SRCS
tron
parents: 2731
diff changeset
   746
SRCS += town_cmd.c
07adb417aa05 (svn r3280) Merge the seperate (C|CXX|OBJC)_SOURCES variables into a single variable SRCS
tron
parents: 2731
diff changeset
   747
SRCS += town_gui.c
07adb417aa05 (svn r3280) Merge the seperate (C|CXX|OBJC)_SOURCES variables into a single variable SRCS
tron
parents: 2731
diff changeset
   748
SRCS += train_cmd.c
07adb417aa05 (svn r3280) Merge the seperate (C|CXX|OBJC)_SOURCES variables into a single variable SRCS
tron
parents: 2731
diff changeset
   749
SRCS += train_gui.c
07adb417aa05 (svn r3280) Merge the seperate (C|CXX|OBJC)_SOURCES variables into a single variable SRCS
tron
parents: 2731
diff changeset
   750
SRCS += tree_cmd.c
3154
6ab0cb6b7ab3 (svn r3777) Add some functions to handle tunnels
tron
parents: 3146
diff changeset
   751
SRCS += tunnel_map.c
2735
07adb417aa05 (svn r3280) Merge the seperate (C|CXX|OBJC)_SOURCES variables into a single variable SRCS
tron
parents: 2731
diff changeset
   752
SRCS += tunnelbridge_cmd.c
07adb417aa05 (svn r3280) Merge the seperate (C|CXX|OBJC)_SOURCES variables into a single variable SRCS
tron
parents: 2731
diff changeset
   753
SRCS += unmovable_cmd.c
07adb417aa05 (svn r3280) Merge the seperate (C|CXX|OBJC)_SOURCES variables into a single variable SRCS
tron
parents: 2731
diff changeset
   754
SRCS += vehicle.c
07adb417aa05 (svn r3280) Merge the seperate (C|CXX|OBJC)_SOURCES variables into a single variable SRCS
tron
parents: 2731
diff changeset
   755
SRCS += vehicle_gui.c
07adb417aa05 (svn r3280) Merge the seperate (C|CXX|OBJC)_SOURCES variables into a single variable SRCS
tron
parents: 2731
diff changeset
   756
SRCS += viewport.c
07adb417aa05 (svn r3280) Merge the seperate (C|CXX|OBJC)_SOURCES variables into a single variable SRCS
tron
parents: 2731
diff changeset
   757
SRCS += water_cmd.c
07adb417aa05 (svn r3280) Merge the seperate (C|CXX|OBJC)_SOURCES variables into a single variable SRCS
tron
parents: 2731
diff changeset
   758
SRCS += waypoint.c
07adb417aa05 (svn r3280) Merge the seperate (C|CXX|OBJC)_SOURCES variables into a single variable SRCS
tron
parents: 2731
diff changeset
   759
SRCS += widget.c
07adb417aa05 (svn r3280) Merge the seperate (C|CXX|OBJC)_SOURCES variables into a single variable SRCS
tron
parents: 2731
diff changeset
   760
SRCS += window.c
07adb417aa05 (svn r3280) Merge the seperate (C|CXX|OBJC)_SOURCES variables into a single variable SRCS
tron
parents: 2731
diff changeset
   761
SRCS += music/null_m.c
07adb417aa05 (svn r3280) Merge the seperate (C|CXX|OBJC)_SOURCES variables into a single variable SRCS
tron
parents: 2731
diff changeset
   762
SRCS += sound/null_s.c
07adb417aa05 (svn r3280) Merge the seperate (C|CXX|OBJC)_SOURCES variables into a single variable SRCS
tron
parents: 2731
diff changeset
   763
SRCS += video/dedicated_v.c
07adb417aa05 (svn r3280) Merge the seperate (C|CXX|OBJC)_SOURCES variables into a single variable SRCS
tron
parents: 2731
diff changeset
   764
SRCS += video/null_v.c
3900
2c84ed52709d (svn r4987) Feature: Merged YAPF into trunk. Thanks to devs for continuous support and users for testing.
KUDr
parents: 3866
diff changeset
   765
SRCS += yapf/follow_track.cpp
2c84ed52709d (svn r4987) Feature: Merged YAPF into trunk. Thanks to devs for continuous support and users for testing.
KUDr
parents: 3866
diff changeset
   766
SRCS += yapf/yapf_common.cpp
2c84ed52709d (svn r4987) Feature: Merged YAPF into trunk. Thanks to devs for continuous support and users for testing.
KUDr
parents: 3866
diff changeset
   767
SRCS += yapf/yapf_rail.cpp
2c84ed52709d (svn r4987) Feature: Merged YAPF into trunk. Thanks to devs for continuous support and users for testing.
KUDr
parents: 3866
diff changeset
   768
SRCS += yapf/yapf_road.cpp
2c84ed52709d (svn r4987) Feature: Merged YAPF into trunk. Thanks to devs for continuous support and users for testing.
KUDr
parents: 3866
diff changeset
   769
SRCS += yapf/yapf_ship.cpp
677
e3c1348781b1 (svn r1115) Put every source file on an extra line
tron
parents: 615
diff changeset
   770
2395
d1629f64d157 (svn r2921) -Codechange: moved all AI-code to 1 central place (ai/ai.c)
truelight
parents: 2381
diff changeset
   771
# AI related files
2735
07adb417aa05 (svn r3280) Merge the seperate (C|CXX|OBJC)_SOURCES variables into a single variable SRCS
tron
parents: 2731
diff changeset
   772
SRCS += ai/ai.c
07adb417aa05 (svn r3280) Merge the seperate (C|CXX|OBJC)_SOURCES variables into a single variable SRCS
tron
parents: 2731
diff changeset
   773
SRCS += ai/default/default.c
07adb417aa05 (svn r3280) Merge the seperate (C|CXX|OBJC)_SOURCES variables into a single variable SRCS
tron
parents: 2731
diff changeset
   774
SRCS += ai/trolly/build.c
07adb417aa05 (svn r3280) Merge the seperate (C|CXX|OBJC)_SOURCES variables into a single variable SRCS
tron
parents: 2731
diff changeset
   775
SRCS += ai/trolly/pathfinder.c
07adb417aa05 (svn r3280) Merge the seperate (C|CXX|OBJC)_SOURCES variables into a single variable SRCS
tron
parents: 2731
diff changeset
   776
SRCS += ai/trolly/shared.c
07adb417aa05 (svn r3280) Merge the seperate (C|CXX|OBJC)_SOURCES variables into a single variable SRCS
tron
parents: 2731
diff changeset
   777
SRCS += ai/trolly/trolly.c
2188
640a0a5f77ea (svn r2703) - Feature: [OSX] Added a native alert window to show whatever error() needs to print (Tobin made this, while I fixed some issued in it)
bjarni
parents: 2185
diff changeset
   778
1829
e90fe433fa7d (svn r2334) - Fix (regression): moved togglefullscreen into the video-driver, now windows works, dedicated works and sdl works. Also reverted the change to the makefile.
Darkvater
parents: 1825
diff changeset
   779
ifdef WITH_SDL
2735
07adb417aa05 (svn r3280) Merge the seperate (C|CXX|OBJC)_SOURCES variables into a single variable SRCS
tron
parents: 2731
diff changeset
   780
  SRCS += sdl.c
07adb417aa05 (svn r3280) Merge the seperate (C|CXX|OBJC)_SOURCES variables into a single variable SRCS
tron
parents: 2731
diff changeset
   781
  SRCS += sound/sdl_s.c
07adb417aa05 (svn r3280) Merge the seperate (C|CXX|OBJC)_SOURCES variables into a single variable SRCS
tron
parents: 2731
diff changeset
   782
  SRCS += video/sdl_v.c
1829
e90fe433fa7d (svn r2334) - Fix (regression): moved togglefullscreen into the video-driver, now windows works, dedicated works and sdl works. Also reverted the change to the makefile.
Darkvater
parents: 1825
diff changeset
   783
endif
e90fe433fa7d (svn r2334) - Fix (regression): moved togglefullscreen into the video-driver, now windows works, dedicated works and sdl works. Also reverted the change to the makefile.
Darkvater
parents: 1825
diff changeset
   784
0
29654efe3188 (svn r1) Import of revision 975 of old (crashed) SVN
truelight
parents:
diff changeset
   785
ifdef WIN32
2735
07adb417aa05 (svn r3280) Merge the seperate (C|CXX|OBJC)_SOURCES variables into a single variable SRCS
tron
parents: 2731
diff changeset
   786
  SRCS += win32.c
07adb417aa05 (svn r3280) Merge the seperate (C|CXX|OBJC)_SOURCES variables into a single variable SRCS
tron
parents: 2731
diff changeset
   787
  SRCS += music/win32_m.c
07adb417aa05 (svn r3280) Merge the seperate (C|CXX|OBJC)_SOURCES variables into a single variable SRCS
tron
parents: 2731
diff changeset
   788
  SRCS += sound/win32_s.c
07adb417aa05 (svn r3280) Merge the seperate (C|CXX|OBJC)_SOURCES variables into a single variable SRCS
tron
parents: 2731
diff changeset
   789
  SRCS += video/win32_v.c
0
29654efe3188 (svn r1) Import of revision 975 of old (crashed) SVN
truelight
parents:
diff changeset
   790
else
2735
07adb417aa05 (svn r3280) Merge the seperate (C|CXX|OBJC)_SOURCES variables into a single variable SRCS
tron
parents: 2731
diff changeset
   791
  SRCS += unix.c
07adb417aa05 (svn r3280) Merge the seperate (C|CXX|OBJC)_SOURCES variables into a single variable SRCS
tron
parents: 2731
diff changeset
   792
  SRCS += music/extmidi.c
0
29654efe3188 (svn r1) Import of revision 975 of old (crashed) SVN
truelight
parents:
diff changeset
   793
endif
29654efe3188 (svn r1) Import of revision 975 of old (crashed) SVN
truelight
parents:
diff changeset
   794
2188
640a0a5f77ea (svn r2703) - Feature: [OSX] Added a native alert window to show whatever error() needs to print (Tobin made this, while I fixed some issued in it)
bjarni
parents: 2185
diff changeset
   795
ifdef OSX
2736
3d6487cbbb69 (svn r3281) -Feature: [OSX] added native cocoa sound and video drivers (egladil)
bjarni
parents: 2735
diff changeset
   796
	SRCS += os/macosx/macos.m
3d6487cbbb69 (svn r3281) -Feature: [OSX] added native cocoa sound and video drivers (egladil)
bjarni
parents: 2735
diff changeset
   797
	ifndef DEDICATED
3d6487cbbb69 (svn r3281) -Feature: [OSX] added native cocoa sound and video drivers (egladil)
bjarni
parents: 2735
diff changeset
   798
		SRCS += music/qtmidi.c
3d6487cbbb69 (svn r3281) -Feature: [OSX] added native cocoa sound and video drivers (egladil)
bjarni
parents: 2735
diff changeset
   799
	endif
3d6487cbbb69 (svn r3281) -Feature: [OSX] added native cocoa sound and video drivers (egladil)
bjarni
parents: 2735
diff changeset
   800
	ifdef WITH_COCOA
3d6487cbbb69 (svn r3281) -Feature: [OSX] added native cocoa sound and video drivers (egladil)
bjarni
parents: 2735
diff changeset
   801
		SRCS += video/cocoa_v.m
3d6487cbbb69 (svn r3281) -Feature: [OSX] added native cocoa sound and video drivers (egladil)
bjarni
parents: 2735
diff changeset
   802
		SRCS += sound/cocoa_s.c
3d6487cbbb69 (svn r3281) -Feature: [OSX] added native cocoa sound and video drivers (egladil)
bjarni
parents: 2735
diff changeset
   803
		SRCS += os/macosx/splash.c
3d6487cbbb69 (svn r3281) -Feature: [OSX] added native cocoa sound and video drivers (egladil)
bjarni
parents: 2735
diff changeset
   804
	endif
2500
92bc404b86ca (svn r3026) -Fix: [OSX] fixed bug that prevented dedicated servers from compiling (introduced in r3022)
bjarni
parents: 2497
diff changeset
   805
endif
2188
640a0a5f77ea (svn r2703) - Feature: [OSX] Added a native alert window to show whatever error() needs to print (Tobin made this, while I fixed some issued in it)
bjarni
parents: 2185
diff changeset
   806
421
3dd9b5a439af (svn r619) Add the necessary bits to make building under BeOS using GNU Make work
tron
parents: 413
diff changeset
   807
ifdef BEOS
2735
07adb417aa05 (svn r3280) Merge the seperate (C|CXX|OBJC)_SOURCES variables into a single variable SRCS
tron
parents: 2731
diff changeset
   808
  SRCS += music/bemidi.cpp
421
3dd9b5a439af (svn r619) Add the necessary bits to make building under BeOS using GNU Make work
tron
parents: 413
diff changeset
   809
endif
0
29654efe3188 (svn r1) Import of revision 975 of old (crashed) SVN
truelight
parents:
diff changeset
   810
29654efe3188 (svn r1) Import of revision 975 of old (crashed) SVN
truelight
parents:
diff changeset
   811
ifdef WIN32
2742
a85da8a7fac8 (svn r3287) Turn the winres.o: openttd.rc special case into a normal %.o: %.rc rule
tron
parents: 2736
diff changeset
   812
  SRCS += ottdres.rc
0
29654efe3188 (svn r1) Import of revision 975 of old (crashed) SVN
truelight
parents:
diff changeset
   813
endif
29654efe3188 (svn r1) Import of revision 975 of old (crashed) SVN
truelight
parents:
diff changeset
   814
29654efe3188 (svn r1) Import of revision 975 of old (crashed) SVN
truelight
parents:
diff changeset
   815
ifdef WITH_DIRECTMUSIC
2735
07adb417aa05 (svn r3280) Merge the seperate (C|CXX|OBJC)_SOURCES variables into a single variable SRCS
tron
parents: 2731
diff changeset
   816
  SRCS += music/dmusic.cpp
0
29654efe3188 (svn r1) Import of revision 975 of old (crashed) SVN
truelight
parents:
diff changeset
   817
endif
29654efe3188 (svn r1) Import of revision 975 of old (crashed) SVN
truelight
parents:
diff changeset
   818
2735
07adb417aa05 (svn r3280) Merge the seperate (C|CXX|OBJC)_SOURCES variables into a single variable SRCS
tron
parents: 2731
diff changeset
   819
OBJS += $(filter %.o, $(SRCS:%.cpp=%.o) $(SRCS:%.m=%.o) $(SRCS:%.c=%.o) $(SRCS:%.rc=%.o))
1170
f55fbc6b3fce (svn r1672) Simplify dependency tracking and actually implement it for C++ files, too.
tron
parents: 1169
diff changeset
   820
DEPS = $(OBJS:%.o=.deps/%.d)
0
29654efe3188 (svn r1) Import of revision 975 of old (crashed) SVN
truelight
parents:
diff changeset
   821
29654efe3188 (svn r1) Import of revision 975 of old (crashed) SVN
truelight
parents:
diff changeset
   822
LANG_TXT = $(filter-out %.unfinished.txt,$(wildcard lang/*.txt))
29654efe3188 (svn r1) Import of revision 975 of old (crashed) SVN
truelight
parents:
diff changeset
   823
LANGS = $(LANG_TXT:%.txt=%.lng)
29654efe3188 (svn r1) Import of revision 975 of old (crashed) SVN
truelight
parents:
diff changeset
   824
162
565551f829e9 (svn r163) Makefile: made compileroutput nicer and added NOVERBOSE to supress all warnings/errors if wanted(default off) (sign_de)
bjarni
parents: 157
diff changeset
   825
0
29654efe3188 (svn r1) Import of revision 975 of old (crashed) SVN
truelight
parents:
diff changeset
   826
##############################################################################
29654efe3188 (svn r1) Import of revision 975 of old (crashed) SVN
truelight
parents:
diff changeset
   827
#
1413
5b907273606d (svn r1917) - Makefile: Revamped VERBOSE support, build mechanics changed.
pasky
parents: 1411
diff changeset
   828
# Build commands
5b907273606d (svn r1917) - Makefile: Revamped VERBOSE support, build mechanics changed.
pasky
parents: 1411
diff changeset
   829
#
5b907273606d (svn r1917) - Makefile: Revamped VERBOSE support, build mechanics changed.
pasky
parents: 1411
diff changeset
   830
2369
80ca2ba71384 (svn r2895) Remove unused variables and bring a comment closer to reality
tron
parents: 2356
diff changeset
   831
# If we are verbose, we will show commands prefixed by $(Q).
80ca2ba71384 (svn r2895) Remove unused variables and bring a comment closer to reality
tron
parents: 2356
diff changeset
   832
# The $(Q)s get replaced by @ in non-verbose mode.
1413
5b907273606d (svn r1917) - Makefile: Revamped VERBOSE support, build mechanics changed.
pasky
parents: 1411
diff changeset
   833
# Inspired by the Linux kernel build system.
5b907273606d (svn r1917) - Makefile: Revamped VERBOSE support, build mechanics changed.
pasky
parents: 1411
diff changeset
   834
ifdef VERBOSE
5b907273606d (svn r1917) - Makefile: Revamped VERBOSE support, build mechanics changed.
pasky
parents: 1411
diff changeset
   835
	Q =
5b907273606d (svn r1917) - Makefile: Revamped VERBOSE support, build mechanics changed.
pasky
parents: 1411
diff changeset
   836
else
5b907273606d (svn r1917) - Makefile: Revamped VERBOSE support, build mechanics changed.
pasky
parents: 1411
diff changeset
   837
	Q = @
5b907273606d (svn r1917) - Makefile: Revamped VERBOSE support, build mechanics changed.
pasky
parents: 1411
diff changeset
   838
endif
5b907273606d (svn r1917) - Makefile: Revamped VERBOSE support, build mechanics changed.
pasky
parents: 1411
diff changeset
   839
5b907273606d (svn r1917) - Makefile: Revamped VERBOSE support, build mechanics changed.
pasky
parents: 1411
diff changeset
   840
5b907273606d (svn r1917) - Makefile: Revamped VERBOSE support, build mechanics changed.
pasky
parents: 1411
diff changeset
   841
##############################################################################
5b907273606d (svn r1917) - Makefile: Revamped VERBOSE support, build mechanics changed.
pasky
parents: 1411
diff changeset
   842
#
0
29654efe3188 (svn r1) Import of revision 975 of old (crashed) SVN
truelight
parents:
diff changeset
   843
# Targets
29654efe3188 (svn r1) Import of revision 975 of old (crashed) SVN
truelight
parents:
diff changeset
   844
#
29654efe3188 (svn r1) Import of revision 975 of old (crashed) SVN
truelight
parents:
diff changeset
   845
29654efe3188 (svn r1) Import of revision 975 of old (crashed) SVN
truelight
parents:
diff changeset
   846
29654efe3188 (svn r1) Import of revision 975 of old (crashed) SVN
truelight
parents:
diff changeset
   847
### Normal build rules
29654efe3188 (svn r1) Import of revision 975 of old (crashed) SVN
truelight
parents:
diff changeset
   848
29654efe3188 (svn r1) Import of revision 975 of old (crashed) SVN
truelight
parents:
diff changeset
   849
29654efe3188 (svn r1) Import of revision 975 of old (crashed) SVN
truelight
parents:
diff changeset
   850
ifdef OSX
2713
9c42385e4f41 (svn r3258) -Feature: [OSX] added support for universal binaries
bjarni
parents: 2712
diff changeset
   851
# needs to be before all
0
29654efe3188 (svn r1) Import of revision 975 of old (crashed) SVN
truelight
parents:
diff changeset
   852
OSX:=OSX
29654efe3188 (svn r1) Import of revision 975 of old (crashed) SVN
truelight
parents:
diff changeset
   853
endif
29654efe3188 (svn r1) Import of revision 975 of old (crashed) SVN
truelight
parents:
diff changeset
   854
29654efe3188 (svn r1) Import of revision 975 of old (crashed) SVN
truelight
parents:
diff changeset
   855
3903
224d77e00330 (svn r4991) -Fix: don't compile UNITTEST by default, it isn't needed
truelight
parents: 3901
diff changeset
   856
all: endian_target.h endian_host.h $(UPDATECONFIG) $(LANGS) $(TTD) $(OSX)
0
29654efe3188 (svn r1) Import of revision 975 of old (crashed) SVN
truelight
parents:
diff changeset
   857
2714
2d0366113f47 (svn r3259) -Fix: [OSX] fixed that universal binaries did not make a bundle
bjarni
parents: 2713
diff changeset
   858
ifdef OSX
2d0366113f47 (svn r3259) -Fix: [OSX] fixed that universal binaries did not make a bundle
bjarni
parents: 2713
diff changeset
   859
-include os/macosx/Makefile
2d0366113f47 (svn r3259) -Fix: [OSX] fixed that universal binaries did not make a bundle
bjarni
parents: 2713
diff changeset
   860
endif
2d0366113f47 (svn r3259) -Fix: [OSX] fixed that universal binaries did not make a bundle
bjarni
parents: 2713
diff changeset
   861
1721
e2887b445ac0 (svn r2225) -Fix: split the endian-detection to target/host. Now cross-compiling
truelight
parents: 1720
diff changeset
   862
endian_host.h: $(ENDIAN_CHECK)
e2887b445ac0 (svn r2225) -Fix: split the endian-detection to target/host. Now cross-compiling
truelight
parents: 1720
diff changeset
   863
	@echo '===> Testing endianness for host'
e2887b445ac0 (svn r2225) -Fix: split the endian-detection to target/host. Now cross-compiling
truelight
parents: 1720
diff changeset
   864
	$(Q)./$(ENDIAN_CHECK) > $@
e2887b445ac0 (svn r2225) -Fix: split the endian-detection to target/host. Now cross-compiling
truelight
parents: 1720
diff changeset
   865
e2887b445ac0 (svn r2225) -Fix: split the endian-detection to target/host. Now cross-compiling
truelight
parents: 1720
diff changeset
   866
endian_target.h: $(ENDIAN_CHECK)
e2887b445ac0 (svn r2225) -Fix: split the endian-detection to target/host. Now cross-compiling
truelight
parents: 1720
diff changeset
   867
	@echo '===> Testing endianness for target'
1692
0b52df38cabc (svn r2196) -Change: updated the Makefile, now it works for crossplatform compiling
TrueLight
parents: 1629
diff changeset
   868
	$(Q)./$(ENDIAN_CHECK) $(ENDIAN_FORCE) > $@
157
dd017fa3bad8 (svn r158) -Fix: make endianess check 100% accurate (hopefully ;))
truelight
parents: 126
diff changeset
   869
dd017fa3bad8 (svn r158) -Fix: make endianess check 100% accurate (hopefully ;))
truelight
parents: 126
diff changeset
   870
$(ENDIAN_CHECK): endian_check.c
2315
63124f563f89 (svn r2841) Pimp the Makefile: Determining the header dependencies is now a separate step.
tron
parents: 2302
diff changeset
   871
	@echo '===> Compiling and Linking $@'
63124f563f89 (svn r2841) Pimp the Makefile: Determining the header dependencies is now a separate step.
tron
parents: 2302
diff changeset
   872
	$(Q)$(CC_HOST) $(CFLAGS_HOST) $(CDEFS) $< -o $@
222
b88456001397 (svn r223) -Fix: Const correctness and miscellaneous fixes. Thank you Tron for your diligent fixing of warnings (and some possibly bugs) (Tron)
darkvater
parents: 221
diff changeset
   873
0
29654efe3188 (svn r1) Import of revision 975 of old (crashed) SVN
truelight
parents:
diff changeset
   874
3901
88d50f8030ce (svn r4989) -Fix: make the OSX Makefile stuff to work with the compile-farm
truelight
parents: 3900
diff changeset
   875
ifndef MACOSX_BUILD
3354
245157a5eafe (svn r4149) -Codechange: [OSX] rewrite of how universal binaries are compiled
bjarni
parents: 3341
diff changeset
   876
# OSX links in os/macosx/Makefile to handle universal binaries better
2315
63124f563f89 (svn r2841) Pimp the Makefile: Determining the header dependencies is now a separate step.
tron
parents: 2302
diff changeset
   877
$(TTD): $(OBJS) $(MAKE_CONFIG)
63124f563f89 (svn r2841) Pimp the Makefile: Determining the header dependencies is now a separate step.
tron
parents: 2302
diff changeset
   878
	@echo '===> Linking $@'
4094
333c7cf842a7 (svn r5426) - Makefile: Make the configure script work properly for setting target compilers; Set CC_TARGET / CXX_TARGET
peter1138
parents: 3994
diff changeset
   879
	$(Q)$(CXX_TARGET) $(LDFLAGS) $(TTDLDFLAGS) $(OBJS) $(LIBS) -o $@
3354
245157a5eafe (svn r4149) -Codechange: [OSX] rewrite of how universal binaries are compiled
bjarni
parents: 3341
diff changeset
   880
endif
0
29654efe3188 (svn r1) Import of revision 975 of old (crashed) SVN
truelight
parents:
diff changeset
   881
4370
5beb8896ae3d (svn r6089) -Backport r6088: added -s (source) and -d (destination) to strgen (Darkvater)
truelight
parents: 4324
diff changeset
   882
$(STRGEN): strgen/strgen.c string.c endian_host.h
2315
63124f563f89 (svn r2841) Pimp the Makefile: Determining the header dependencies is now a separate step.
tron
parents: 2302
diff changeset
   883
	@echo '===> Compiling and Linking $@'
4370
5beb8896ae3d (svn r6089) -Backport r6088: added -s (source) and -d (destination) to strgen (Darkvater)
truelight
parents: 4324
diff changeset
   884
	$(Q)$(CC_HOST) $(CFLAGS_HOST) -DSTRGEN strgen/strgen.c string.c -o $@
0
29654efe3188 (svn r1) Import of revision 975 of old (crashed) SVN
truelight
parents:
diff changeset
   885
474
211d24b41a53 (svn r725) Fix language file dependencies
tron
parents: 462
diff changeset
   886
table/strings.h: lang/english.txt $(STRGEN)
1118
9156318143d5 (svn r1619) Fight bit rot in the Makefile:
tron
parents: 1115
diff changeset
   887
	@echo '===> Generating $@'
4370
5beb8896ae3d (svn r6089) -Backport r6088: added -s (source) and -d (destination) to strgen (Darkvater)
truelight
parents: 4324
diff changeset
   888
	$(Q)$(STRGEN) -s lang -d table
222
b88456001397 (svn r223) -Fix: Const correctness and miscellaneous fixes. Thank you Tron for your diligent fixing of warnings (and some possibly bugs) (Tron)
darkvater
parents: 221
diff changeset
   889
476
68e6469a3c91 (svn r727) The langauge files depend on english.txt, not strings.h
tron
parents: 475
diff changeset
   890
lang/%.lng: lang/%.txt $(STRGEN) lang/english.txt
1118
9156318143d5 (svn r1619) Fight bit rot in the Makefile:
tron
parents: 1115
diff changeset
   891
	@echo '===> Compiling language $(*F)'
4370
5beb8896ae3d (svn r6089) -Backport r6088: added -s (source) and -d (destination) to strgen (Darkvater)
truelight
parents: 4324
diff changeset
   892
	$(Q)$(STRGEN) $(STRGEN_FLAGS) -s lang -d lang $< $(LANG_ERRORS) || rm -f $@
0
29654efe3188 (svn r1) Import of revision 975 of old (crashed) SVN
truelight
parents:
diff changeset
   893
770
c2eacca29601 (svn r1236) MorphOS: added make release like in OSX (tokai)
bjarni
parents: 730
diff changeset
   894
ifdef MORPHOS
3900
2c84ed52709d (svn r4987) Feature: Merged YAPF into trunk. Thanks to devs for continuous support and users for testing.
KUDr
parents: 3866
diff changeset
   895
770
c2eacca29601 (svn r1236) MorphOS: added make release like in OSX (tokai)
bjarni
parents: 730
diff changeset
   896
release: all
1413
5b907273606d (svn r1917) - Makefile: Revamped VERBOSE support, build mechanics changed.
pasky
parents: 1411
diff changeset
   897
	$(Q)rm -fr "/t/openttd-$(RELEASE)-morphos.lha"
5b907273606d (svn r1917) - Makefile: Revamped VERBOSE support, build mechanics changed.
pasky
parents: 1411
diff changeset
   898
	$(Q)mkdir -p "/t/"
5b907273606d (svn r1917) - Makefile: Revamped VERBOSE support, build mechanics changed.
pasky
parents: 1411
diff changeset
   899
	$(Q)mkdir -p "/t/openttd-$(RELEASE)-morphos"
5b907273606d (svn r1917) - Makefile: Revamped VERBOSE support, build mechanics changed.
pasky
parents: 1411
diff changeset
   900
	$(Q)mkdir -p "/t/openttd-$(RELEASE)-morphos/docs"
5b907273606d (svn r1917) - Makefile: Revamped VERBOSE support, build mechanics changed.
pasky
parents: 1411
diff changeset
   901
	$(Q)mkdir -p "/t/openttd-$(RELEASE)-morphos/data"
5b907273606d (svn r1917) - Makefile: Revamped VERBOSE support, build mechanics changed.
pasky
parents: 1411
diff changeset
   902
	$(Q)mkdir -p "/t/openttd-$(RELEASE)-morphos/lang"
5b907273606d (svn r1917) - Makefile: Revamped VERBOSE support, build mechanics changed.
pasky
parents: 1411
diff changeset
   903
	$(Q)mkdir -p "/t/openttd-$(RELEASE)-morphos/scenario"
5b907273606d (svn r1917) - Makefile: Revamped VERBOSE support, build mechanics changed.
pasky
parents: 1411
diff changeset
   904
	$(Q)cp -R $(TTD)                      "/t/openttd-$(RELEASE)-morphos/"
5b907273606d (svn r1917) - Makefile: Revamped VERBOSE support, build mechanics changed.
pasky
parents: 1411
diff changeset
   905
	$(Q)cp data/*                         "/t/openttd-$(RELEASE)-morphos/data/"
5b907273606d (svn r1917) - Makefile: Revamped VERBOSE support, build mechanics changed.
pasky
parents: 1411
diff changeset
   906
	$(Q)cp lang/*.lng                     "/t/openttd-$(RELEASE)-morphos/lang/"
5b907273606d (svn r1917) - Makefile: Revamped VERBOSE support, build mechanics changed.
pasky
parents: 1411
diff changeset
   907
	$(Q)cp scenario/*                     "/t/openttd-$(RELEASE)-morphos/scenario/"
5b907273606d (svn r1917) - Makefile: Revamped VERBOSE support, build mechanics changed.
pasky
parents: 1411
diff changeset
   908
	$(Q)cp readme.txt                     "/t/openttd-$(RELEASE)-morphos/docs/ReadMe"
5b907273606d (svn r1917) - Makefile: Revamped VERBOSE support, build mechanics changed.
pasky
parents: 1411
diff changeset
   909
	$(Q)cp docs/console.txt               "/t/openttd-$(RELEASE)-morphos/docs/Console"
5b907273606d (svn r1917) - Makefile: Revamped VERBOSE support, build mechanics changed.
pasky
parents: 1411
diff changeset
   910
	$(Q)cp COPYING                        "/t/openttd-$(RELEASE)-morphos/docs/"
5b907273606d (svn r1917) - Makefile: Revamped VERBOSE support, build mechanics changed.
pasky
parents: 1411
diff changeset
   911
	$(Q)cp changelog.txt                  "/t/openttd-$(RELEASE)-morphos/docs/ChangeLog"
5b907273606d (svn r1917) - Makefile: Revamped VERBOSE support, build mechanics changed.
pasky
parents: 1411
diff changeset
   912
	$(Q)cp known-bugs.txt				   "/t/openttd-$(RELEASE)-morphos/docs/known-bugs.txt"
5b907273606d (svn r1917) - Makefile: Revamped VERBOSE support, build mechanics changed.
pasky
parents: 1411
diff changeset
   913
	$(Q)cp os/morphos/icons/openttd.info  "/t/openttd-$(RELEASE)-morphos/$(TTD).info"
5b907273606d (svn r1917) - Makefile: Revamped VERBOSE support, build mechanics changed.
pasky
parents: 1411
diff changeset
   914
	$(Q)cp os/morphos/icons/docs.info     "/t/openttd-$(RELEASE)-morphos/docs.info"
5b907273606d (svn r1917) - Makefile: Revamped VERBOSE support, build mechanics changed.
pasky
parents: 1411
diff changeset
   915
	$(Q)cp os/morphos/icons/drawer.info   "/t/openttd-$(RELEASE)-morphos.info"
5b907273606d (svn r1917) - Makefile: Revamped VERBOSE support, build mechanics changed.
pasky
parents: 1411
diff changeset
   916
	$(Q)cp os/morphos/icons/document.info "/t/openttd-$(RELEASE)-morphos/docs/ReadMe.info"
5b907273606d (svn r1917) - Makefile: Revamped VERBOSE support, build mechanics changed.
pasky
parents: 1411
diff changeset
   917
	$(Q)cp os/morphos/icons/document.info "/t/openttd-$(RELEASE)-morphos/docs/Console.info"
5b907273606d (svn r1917) - Makefile: Revamped VERBOSE support, build mechanics changed.
pasky
parents: 1411
diff changeset
   918
	$(Q)cp os/morphos/icons/document.info "/t/openttd-$(RELEASE)-morphos/docs/COPYING.info"
5b907273606d (svn r1917) - Makefile: Revamped VERBOSE support, build mechanics changed.
pasky
parents: 1411
diff changeset
   919
	$(Q)cp os/morphos/icons/document.info "/t/openttd-$(RELEASE)-morphos/docs/ChangeLog.info"
5b907273606d (svn r1917) - Makefile: Revamped VERBOSE support, build mechanics changed.
pasky
parents: 1411
diff changeset
   920
	$(Q)strip --strip-all --strip-unneeded --remove-section .comment "/t/openttd-$(RELEASE)-morphos/$(TTD)"
5b907273606d (svn r1917) - Makefile: Revamped VERBOSE support, build mechanics changed.
pasky
parents: 1411
diff changeset
   921
	$(Q)lha a -r "t:openttd-$(RELEASE)-morphos.lha" "t:openttd-$(RELEASE)-morphos"
5b907273606d (svn r1917) - Makefile: Revamped VERBOSE support, build mechanics changed.
pasky
parents: 1411
diff changeset
   922
	$(Q)lha a    "t:openttd-$(RELEASE)-morphos.lha" "t:openttd-$(RELEASE)-morphos.info"
5b907273606d (svn r1917) - Makefile: Revamped VERBOSE support, build mechanics changed.
pasky
parents: 1411
diff changeset
   923
	$(Q)rm -fr "/t/openttd-$(RELEASE)-morphos"
5b907273606d (svn r1917) - Makefile: Revamped VERBOSE support, build mechanics changed.
pasky
parents: 1411
diff changeset
   924
	$(Q)rm -fr "/t/openttd-$(RELEASE)-morphos.info"
770
c2eacca29601 (svn r1236) MorphOS: added make release like in OSX (tokai)
bjarni
parents: 730
diff changeset
   925
	@echo "Release archive can be found in RAM:t/ now."
c2eacca29601 (svn r1236) MorphOS: added make release like in OSX (tokai)
bjarni
parents: 730
diff changeset
   926
1251
c833ce273512 (svn r1755) Trim trailing whitespace
tron
parents: 1247
diff changeset
   927
.PHONY: release
770
c2eacca29601 (svn r1236) MorphOS: added make release like in OSX (tokai)
bjarni
parents: 730
diff changeset
   928
endif
c2eacca29601 (svn r1236) MorphOS: added make release like in OSX (tokai)
bjarni
parents: 730
diff changeset
   929
0
29654efe3188 (svn r1) Import of revision 975 of old (crashed) SVN
truelight
parents:
diff changeset
   930
rev.c: FORCE
29654efe3188 (svn r1) Import of revision 975 of old (crashed) SVN
truelight
parents:
diff changeset
   931
	@# setting the revision number in a place, there the binary can read it
615
fc0771d6a26c (svn r1039) Makefile: now RELEASE flag can contain () too
bjarni
parents: 610
diff changeset
   932
	@echo 'const char _openttd_revision[] = "$(REV)";' >>rev.c.new
0
29654efe3188 (svn r1) Import of revision 975 of old (crashed) SVN
truelight
parents:
diff changeset
   933
	@# some additions for MorphOS versions tag
29654efe3188 (svn r1) Import of revision 975 of old (crashed) SVN
truelight
parents:
diff changeset
   934
	@echo '#ifdef __MORPHOS__'  >>rev.c.new
2378
708a7d1c653d (svn r2904) Stupid editors, and renaming files with the same name just different casing is not really possible, so here comes another commit
Darkvater
parents: 2377
diff changeset
   935
	@echo 'const char morphos_versions_tag[] = "\\0$$VER: OpenTTD $(REV) ('${BUILDDATE}') © OpenTTD Team [MorphOS, PowerPC]";'  >>rev.c.new
0
29654efe3188 (svn r1) Import of revision 975 of old (crashed) SVN
truelight
parents:
diff changeset
   936
	@echo '#endif' >>rev.c.new
29654efe3188 (svn r1) Import of revision 975 of old (crashed) SVN
truelight
parents:
diff changeset
   937
	@# Only update the real rev.c if it actually changed, to prevent
29654efe3188 (svn r1) Import of revision 975 of old (crashed) SVN
truelight
parents:
diff changeset
   938
	@# useless rebuilds.
29654efe3188 (svn r1) Import of revision 975 of old (crashed) SVN
truelight
parents:
diff changeset
   939
	@cmp -s rev.c rev.c.new 2>/dev/null || mv rev.c.new rev.c
29654efe3188 (svn r1) Import of revision 975 of old (crashed) SVN
truelight
parents:
diff changeset
   940
	@rm -f rev.c.new
29654efe3188 (svn r1) Import of revision 975 of old (crashed) SVN
truelight
parents:
diff changeset
   941
29654efe3188 (svn r1) Import of revision 975 of old (crashed) SVN
truelight
parents:
diff changeset
   942
FORCE:
29654efe3188 (svn r1) Import of revision 975 of old (crashed) SVN
truelight
parents:
diff changeset
   943
29654efe3188 (svn r1) Import of revision 975 of old (crashed) SVN
truelight
parents:
diff changeset
   944
29654efe3188 (svn r1) Import of revision 975 of old (crashed) SVN
truelight
parents:
diff changeset
   945
clean:
1118
9156318143d5 (svn r1619) Fight bit rot in the Makefile:
tron
parents: 1115
diff changeset
   946
	@echo '===> Cleaning up'
1721
e2887b445ac0 (svn r2225) -Fix: split the endian-detection to target/host. Now cross-compiling
truelight
parents: 1720
diff changeset
   947
# endian.h is out-dated and no longer in use, so it can be removed soon
4562
48ab394a84e8 (svn r6410) -remove unittest
glx
parents: 4374
diff changeset
   948
	$(Q)rm -rf .deps *~ $(TTD) $(STRGEN) core table/strings.h $(LANGS) $(OBJS) $(OSX_MIDI_PLAYER_FILE) endian.h endian_host.h endian_target.h $(ENDIAN_CHECK) .OSX
0
29654efe3188 (svn r1) Import of revision 975 of old (crashed) SVN
truelight
parents:
diff changeset
   949
29654efe3188 (svn r1) Import of revision 975 of old (crashed) SVN
truelight
parents:
diff changeset
   950
mrproper: clean
1413
5b907273606d (svn r1917) - Makefile: Revamped VERBOSE support, build mechanics changed.
pasky
parents: 1411
diff changeset
   951
	$(Q)rm -rf $(MAKE_CONFIG)
0
29654efe3188 (svn r1) Import of revision 975 of old (crashed) SVN
truelight
parents:
diff changeset
   952
29654efe3188 (svn r1) Import of revision 975 of old (crashed) SVN
truelight
parents:
diff changeset
   953
ifndef OSX
29654efe3188 (svn r1) Import of revision 975 of old (crashed) SVN
truelight
parents:
diff changeset
   954
ifndef MORPHOS
29654efe3188 (svn r1) Import of revision 975 of old (crashed) SVN
truelight
parents:
diff changeset
   955
install:
285
cf5213c8a919 (svn r291) Minor fix to english.txt
bjarni
parents: 222
diff changeset
   956
ifeq ($(INSTALL),)
cf5213c8a919 (svn r291) Minor fix to english.txt
bjarni
parents: 222
diff changeset
   957
	$(error make install is highly experimental at his state and not\
1492
311c5770360e (svn r1996) makefile.config -> Makefile.config, that's its name.
pasky
parents: 1491
diff changeset
   958
	tested very much - use at your own risk - to use run \"make install INSTALL:=1\" - make sure Makefile.config\
0
29654efe3188 (svn r1) Import of revision 975 of old (crashed) SVN
truelight
parents:
diff changeset
   959
	is set correctly up - run \"make upgradeconf\")
285
cf5213c8a919 (svn r291) Minor fix to english.txt
bjarni
parents: 222
diff changeset
   960
endif
cf5213c8a919 (svn r291) Minor fix to english.txt
bjarni
parents: 222
diff changeset
   961
543
946badd71033 (svn r942) -Merged branch/network back into the trunk
truelight
parents: 532
diff changeset
   962
ifeq ($(PREFIX), )
1492
311c5770360e (svn r1996) makefile.config -> Makefile.config, that's its name.
pasky
parents: 1491
diff changeset
   963
	$(error no prefix set - check Makefile.config)
285
cf5213c8a919 (svn r291) Minor fix to english.txt
bjarni
parents: 222
diff changeset
   964
endif
cf5213c8a919 (svn r291) Minor fix to english.txt
bjarni
parents: 222
diff changeset
   965
#	We compare against the non prefixed version here, so we won't install
cf5213c8a919 (svn r291) Minor fix to english.txt
bjarni
parents: 222
diff changeset
   966
#	if only the prefix has been set
cf5213c8a919 (svn r291) Minor fix to english.txt
bjarni
parents: 222
diff changeset
   967
ifeq ($(DATA_DIR),)
1492
311c5770360e (svn r1996) makefile.config -> Makefile.config, that's its name.
pasky
parents: 1491
diff changeset
   968
	$(error no data path set - check Makefile.config)
285
cf5213c8a919 (svn r291) Minor fix to english.txt
bjarni
parents: 222
diff changeset
   969
endif
cf5213c8a919 (svn r291) Minor fix to english.txt
bjarni
parents: 222
diff changeset
   970
ifeq ($(BINARY_DIR),)
1492
311c5770360e (svn r1996) makefile.config -> Makefile.config, that's its name.
pasky
parents: 1491
diff changeset
   971
	$(error no binary path set - check Makefile.config)
285
cf5213c8a919 (svn r291) Minor fix to english.txt
bjarni
parents: 222
diff changeset
   972
endif
cf5213c8a919 (svn r291) Minor fix to english.txt
bjarni
parents: 222
diff changeset
   973
# We'll install in $DEST_DIR instead of root if it is set (we don't
cf5213c8a919 (svn r291) Minor fix to english.txt
bjarni
parents: 222
diff changeset
   974
# care about extra /'s
1491
72850e1c2ca4 (svn r1995) Makefile: Use the install tool instead of mkdir+cp for installing the system-wide stuff, more secure. Based on Peter Brett's patch 1152428.
pasky
parents: 1479
diff changeset
   975
	install -d $(DATA_DIR_INSTALL)/lang \
72850e1c2ca4 (svn r1995) Makefile: Use the install tool instead of mkdir+cp for installing the system-wide stuff, more secure. Based on Peter Brett's patch 1152428.
pasky
parents: 1479
diff changeset
   976
	           $(DATA_DIR_INSTALL)/data \
72850e1c2ca4 (svn r1995) Makefile: Use the install tool instead of mkdir+cp for installing the system-wide stuff, more secure. Based on Peter Brett's patch 1152428.
pasky
parents: 1479
diff changeset
   977
	           $(DATA_DIR_INSTALL)/gm \
2948
c81b70eb539a (svn r3507) - Fix: [Makefile] Make sure the ICON_DIR gets created before copying files there.
matthijs
parents: 2918
diff changeset
   978
						 $(ICON_DIR_INSTALL) \
1491
72850e1c2ca4 (svn r1995) Makefile: Use the install tool instead of mkdir+cp for installing the system-wide stuff, more secure. Based on Peter Brett's patch 1152428.
pasky
parents: 1479
diff changeset
   979
	           $(BINARY_DIR_INSTALL)
1865
739183b1243a (svn r2371) - Fix: [ 1144510 ] make install tries to install scenarios in the (non-existing) personal dir when USE_HOMEDIR is specified.
matthijs
parents: 1829
diff changeset
   980
ifndef USE_HOMEDIR
739183b1243a (svn r2371) - Fix: [ 1144510 ] make install tries to install scenarios in the (non-existing) personal dir when USE_HOMEDIR is specified.
matthijs
parents: 1829
diff changeset
   981
	mkdir -p $(PERSONAL_DIR)/scenario
4374
f155d5943625 (svn r6104) -Fix: make install did not create a directory for the heightmaps
rubidium
parents: 4370
diff changeset
   982
	mkdir -p $(PERSONAL_DIR)/scenario/heightmap
1865
739183b1243a (svn r2371) - Fix: [ 1144510 ] make install tries to install scenarios in the (non-existing) personal dir when USE_HOMEDIR is specified.
matthijs
parents: 1829
diff changeset
   983
else
739183b1243a (svn r2371) - Fix: [ 1144510 ] make install tries to install scenarios in the (non-existing) personal dir when USE_HOMEDIR is specified.
matthijs
parents: 1829
diff changeset
   984
	mkdir -p $(DATA_DIR_INSTALL)/scenario
4374
f155d5943625 (svn r6104) -Fix: make install did not create a directory for the heightmaps
rubidium
parents: 4370
diff changeset
   985
	mkdir -p $(DATA_DIR_INSTALL)/scenario/heightmap
1865
739183b1243a (svn r2371) - Fix: [ 1144510 ] make install tries to install scenarios in the (non-existing) personal dir when USE_HOMEDIR is specified.
matthijs
parents: 1829
diff changeset
   986
endif
1491
72850e1c2ca4 (svn r1995) Makefile: Use the install tool instead of mkdir+cp for installing the system-wide stuff, more secure. Based on Peter Brett's patch 1152428.
pasky
parents: 1479
diff changeset
   987
	install $(TTD) $(BINARY_DIR_INSTALL)
72850e1c2ca4 (svn r1995) Makefile: Use the install tool instead of mkdir+cp for installing the system-wide stuff, more secure. Based on Peter Brett's patch 1152428.
pasky
parents: 1479
diff changeset
   988
	install -m 644 lang/*.lng $(DATA_DIR_INSTALL)/lang
72850e1c2ca4 (svn r1995) Makefile: Use the install tool instead of mkdir+cp for installing the system-wide stuff, more secure. Based on Peter Brett's patch 1152428.
pasky
parents: 1479
diff changeset
   989
	install -m 644 data/*.grf $(DATA_DIR_INSTALL)/data
72850e1c2ca4 (svn r1995) Makefile: Use the install tool instead of mkdir+cp for installing the system-wide stuff, more secure. Based on Peter Brett's patch 1152428.
pasky
parents: 1479
diff changeset
   990
	install -m 644 data/opntitle.dat $(DATA_DIR_INSTALL)/data
2901
c9a1a969b017 (svn r3456) - Feature: [Makefile] Icons can now be installed in a seperate directory.
matthijs
parents: 2835
diff changeset
   991
	install -m 644 media/openttd.64.png $(ICON_DIR_INSTALL)
c9a1a969b017 (svn r3456) - Feature: [Makefile] Icons can now be installed in a seperate directory.
matthijs
parents: 2835
diff changeset
   992
	install -m 644 media/openttd.32.xpm $(ICON_DIR_INSTALL)
0
29654efe3188 (svn r1) Import of revision 975 of old (crashed) SVN
truelight
parents:
diff changeset
   993
else	#MorphOS
29654efe3188 (svn r1) Import of revision 975 of old (crashed) SVN
truelight
parents:
diff changeset
   994
install:
29654efe3188 (svn r1) Import of revision 975 of old (crashed) SVN
truelight
parents:
diff changeset
   995
	$(error make install is not supported on MorphOS)
29654efe3188 (svn r1) Import of revision 975 of old (crashed) SVN
truelight
parents:
diff changeset
   996
endif
29654efe3188 (svn r1) Import of revision 975 of old (crashed) SVN
truelight
parents:
diff changeset
   997
else	# OSX
29654efe3188 (svn r1) Import of revision 975 of old (crashed) SVN
truelight
parents:
diff changeset
   998
install:
29654efe3188 (svn r1) Import of revision 975 of old (crashed) SVN
truelight
parents:
diff changeset
   999
	$(error make install is not supported on MacOSX)
29654efe3188 (svn r1) Import of revision 975 of old (crashed) SVN
truelight
parents:
diff changeset
  1000
endif
29654efe3188 (svn r1) Import of revision 975 of old (crashed) SVN
truelight
parents:
diff changeset
  1001
29654efe3188 (svn r1) Import of revision 975 of old (crashed) SVN
truelight
parents:
diff changeset
  1002
29654efe3188 (svn r1) Import of revision 975 of old (crashed) SVN
truelight
parents:
diff changeset
  1003
love:
29654efe3188 (svn r1) Import of revision 975 of old (crashed) SVN
truelight
parents:
diff changeset
  1004
	@echo "YES! I thought you would never ask. We will have a great time. You can keep me turned on all night"
29654efe3188 (svn r1) Import of revision 975 of old (crashed) SVN
truelight
parents:
diff changeset
  1005
2576
5df466ff00c6 (svn r3113) -Fix: The Makefile had 64bit code which was obsolete, not to say wrong.
truelight
parents: 2555
diff changeset
  1006
.PHONY: clean all $(OSX) install love
0
29654efe3188 (svn r1) Import of revision 975 of old (crashed) SVN
truelight
parents:
diff changeset
  1007
29654efe3188 (svn r1) Import of revision 975 of old (crashed) SVN
truelight
parents:
diff changeset
  1008
29654efe3188 (svn r1) Import of revision 975 of old (crashed) SVN
truelight
parents:
diff changeset
  1009
### Automatic configuration
29654efe3188 (svn r1) Import of revision 975 of old (crashed) SVN
truelight
parents:
diff changeset
  1010
-include $(CONFIG_WRITER)
222
b88456001397 (svn r223) -Fix: Const correctness and miscellaneous fixes. Thank you Tron for your diligent fixing of warnings (and some possibly bugs) (Tron)
darkvater
parents: 221
diff changeset
  1011
0
29654efe3188 (svn r1) Import of revision 975 of old (crashed) SVN
truelight
parents:
diff changeset
  1012
29654efe3188 (svn r1) Import of revision 975 of old (crashed) SVN
truelight
parents:
diff changeset
  1013
# Export all variables set to subprocesses (a bit dirty)
29654efe3188 (svn r1) Import of revision 975 of old (crashed) SVN
truelight
parents:
diff changeset
  1014
.EXPORT_ALL_VARIABLES:
29654efe3188 (svn r1) Import of revision 975 of old (crashed) SVN
truelight
parents:
diff changeset
  1015
upgradeconf: $(MAKE_CONFIG)
1413
5b907273606d (svn r1917) - Makefile: Revamped VERBOSE support, build mechanics changed.
pasky
parents: 1411
diff changeset
  1016
	$(Q)rm $(MAKE_CONFIG)
5b907273606d (svn r1917) - Makefile: Revamped VERBOSE support, build mechanics changed.
pasky
parents: 1411
diff changeset
  1017
	$(Q)$(MAKE) $(MAKE_CONFIG)
0
29654efe3188 (svn r1) Import of revision 975 of old (crashed) SVN
truelight
parents:
diff changeset
  1018
29654efe3188 (svn r1) Import of revision 975 of old (crashed) SVN
truelight
parents:
diff changeset
  1019
.PHONY: upgradeconf
29654efe3188 (svn r1) Import of revision 975 of old (crashed) SVN
truelight
parents:
diff changeset
  1020
29654efe3188 (svn r1) Import of revision 975 of old (crashed) SVN
truelight
parents:
diff changeset
  1021
29654efe3188 (svn r1) Import of revision 975 of old (crashed) SVN
truelight
parents:
diff changeset
  1022
### Internal build rules
29654efe3188 (svn r1) Import of revision 975 of old (crashed) SVN
truelight
parents:
diff changeset
  1023
29654efe3188 (svn r1) Import of revision 975 of old (crashed) SVN
truelight
parents:
diff changeset
  1024
# This makes sure the .deps dir is always around.
2792
b04a77d57628 (svn r3340) Fix dependency calculation: dependencies didn't get recalculated if a header file changed
tron
parents: 2779
diff changeset
  1025
DEPS_MAGIC := $(shell mkdir -p $(sort $(dir $(DEPS))))
b04a77d57628 (svn r3340) Fix dependency calculation: dependencies didn't get recalculated if a header file changed
tron
parents: 2779
diff changeset
  1026
b04a77d57628 (svn r3340) Fix dependency calculation: dependencies didn't get recalculated if a header file changed
tron
parents: 2779
diff changeset
  1027
depend:
b04a77d57628 (svn r3340) Fix dependency calculation: dependencies didn't get recalculated if a header file changed
tron
parents: 2779
diff changeset
  1028
	@true # The include handles this automagically
0
29654efe3188 (svn r1) Import of revision 975 of old (crashed) SVN
truelight
parents:
diff changeset
  1029
29654efe3188 (svn r1) Import of revision 975 of old (crashed) SVN
truelight
parents:
diff changeset
  1030
# Introduce the dependencies
4562
48ab394a84e8 (svn r6410) -remove unittest
glx
parents: 4374
diff changeset
  1031
ifeq ($(findstring $(MAKECMDGOALS), clean info mrproper upgradeconf $(MAKE_CONFIG)),)
1167
507a33e75007 (svn r1669) Rename all ttd_XXX to just XXX, because we already know who we are (;
tron
parents: 1164
diff changeset
  1032
-include $(DEPS)
2315
63124f563f89 (svn r2841) Pimp the Makefile: Determining the header dependencies is now a separate step.
tron
parents: 2302
diff changeset
  1033
endif
0
29654efe3188 (svn r1) Import of revision 975 of old (crashed) SVN
truelight
parents:
diff changeset
  1034
2792
b04a77d57628 (svn r3340) Fix dependency calculation: dependencies didn't get recalculated if a header file changed
tron
parents: 2779
diff changeset
  1035
# Silence stale header dependency errors
b04a77d57628 (svn r3340) Fix dependency calculation: dependencies didn't get recalculated if a header file changed
tron
parents: 2779
diff changeset
  1036
%.h:
b04a77d57628 (svn r3340) Fix dependency calculation: dependencies didn't get recalculated if a header file changed
tron
parents: 2779
diff changeset
  1037
	@true
1170
f55fbc6b3fce (svn r1672) Simplify dependency tracking and actually implement it for C++ files, too.
tron
parents: 1169
diff changeset
  1038
2327
69493bdce1ae (svn r2853) Add missing dependencies and flags to the dependency targets and make the info target more informative
tron
parents: 2317
diff changeset
  1039
.deps/%.d: %.c $(MAKE_CONFIG) table/strings.h endian_target.h
2792
b04a77d57628 (svn r3340) Fix dependency calculation: dependencies didn't get recalculated if a header file changed
tron
parents: 2779
diff changeset
  1040
	@echo '===> DEP $<'
4094
333c7cf842a7 (svn r5426) - Makefile: Make the configure script work properly for setting target compilers; Set CC_TARGET / CXX_TARGET
peter1138
parents: 3994
diff changeset
  1041
	$(Q)$(CC_TARGET) $(CFLAGS) $(CDEFS) -MM $< | sed 's#^$(@F:%.d=%.o):#$@ $(@:.deps/%.d=%.o):#' > $@
2188
640a0a5f77ea (svn r2703) - Feature: [OSX] Added a native alert window to show whatever error() needs to print (Tobin made this, while I fixed some issued in it)
bjarni
parents: 2185
diff changeset
  1042
2327
69493bdce1ae (svn r2853) Add missing dependencies and flags to the dependency targets and make the info target more informative
tron
parents: 2317
diff changeset
  1043
.deps/%.d: %.cpp $(MAKE_CONFIG) table/strings.h endian_target.h
2792
b04a77d57628 (svn r3340) Fix dependency calculation: dependencies didn't get recalculated if a header file changed
tron
parents: 2779
diff changeset
  1044
	@echo '===> DEP $<'
4094
333c7cf842a7 (svn r5426) - Makefile: Make the configure script work properly for setting target compilers; Set CC_TARGET / CXX_TARGET
peter1138
parents: 3994
diff changeset
  1045
	$(Q)$(CXX_TARGET) $(CFLAGS) $(CDEFS) -MM $< | sed 's#^$(@F:%.d=%.o):#$@ $(@:.deps/%.d=%.o):#' > $@
2315
63124f563f89 (svn r2841) Pimp the Makefile: Determining the header dependencies is now a separate step.
tron
parents: 2302
diff changeset
  1046
2327
69493bdce1ae (svn r2853) Add missing dependencies and flags to the dependency targets and make the info target more informative
tron
parents: 2317
diff changeset
  1047
.deps/%.d: %.m $(MAKE_CONFIG) table/strings.h endian_target.h
2792
b04a77d57628 (svn r3340) Fix dependency calculation: dependencies didn't get recalculated if a header file changed
tron
parents: 2779
diff changeset
  1048
	@echo '===> DEP $<'
4094
333c7cf842a7 (svn r5426) - Makefile: Make the configure script work properly for setting target compilers; Set CC_TARGET / CXX_TARGET
peter1138
parents: 3994
diff changeset
  1049
	$(Q)$(CC_TARGET) $(OBJCFLAGS) $(CDEFS) -MM $< | sed 's#^$(@F:%.d=%.o):#$@ $(@:.deps/%.d=%.o):#' > $@
2315
63124f563f89 (svn r2841) Pimp the Makefile: Determining the header dependencies is now a separate step.
tron
parents: 2302
diff changeset
  1050
63124f563f89 (svn r2841) Pimp the Makefile: Determining the header dependencies is now a separate step.
tron
parents: 2302
diff changeset
  1051
3901
88d50f8030ce (svn r4989) -Fix: make the OSX Makefile stuff to work with the compile-farm
truelight
parents: 3900
diff changeset
  1052
ifndef MACOSX_BUILD
3354
245157a5eafe (svn r4149) -Codechange: [OSX] rewrite of how universal binaries are compiled
bjarni
parents: 3341
diff changeset
  1053
# OSX uses os/macosx/Makefile to compile files
2315
63124f563f89 (svn r2841) Pimp the Makefile: Determining the header dependencies is now a separate step.
tron
parents: 2302
diff changeset
  1054
%.o: %.c $(MAKE_CONFIG)
63124f563f89 (svn r2841) Pimp the Makefile: Determining the header dependencies is now a separate step.
tron
parents: 2302
diff changeset
  1055
	@echo '===> Compiling $<'
4094
333c7cf842a7 (svn r5426) - Makefile: Make the configure script work properly for setting target compilers; Set CC_TARGET / CXX_TARGET
peter1138
parents: 3994
diff changeset
  1056
	$(Q)$(CC_TARGET) $(CC_CFLAGS) $(CFLAGS) $(CDEFS) -c -o $@ $<
2315
63124f563f89 (svn r2841) Pimp the Makefile: Determining the header dependencies is now a separate step.
tron
parents: 2302
diff changeset
  1057
63124f563f89 (svn r2841) Pimp the Makefile: Determining the header dependencies is now a separate step.
tron
parents: 2302
diff changeset
  1058
%.o: %.cpp  $(MAKE_CONFIG)
63124f563f89 (svn r2841) Pimp the Makefile: Determining the header dependencies is now a separate step.
tron
parents: 2302
diff changeset
  1059
	@echo '===> Compiling $<'
4094
333c7cf842a7 (svn r5426) - Makefile: Make the configure script work properly for setting target compilers; Set CC_TARGET / CXX_TARGET
peter1138
parents: 3994
diff changeset
  1060
	$(Q)$(CXX_TARGET) $(CFLAGS) $(CDEFS) -c -o $@ $<
2315
63124f563f89 (svn r2841) Pimp the Makefile: Determining the header dependencies is now a separate step.
tron
parents: 2302
diff changeset
  1061
63124f563f89 (svn r2841) Pimp the Makefile: Determining the header dependencies is now a separate step.
tron
parents: 2302
diff changeset
  1062
%.o: %.m  $(MAKE_CONFIG)
63124f563f89 (svn r2841) Pimp the Makefile: Determining the header dependencies is now a separate step.
tron
parents: 2302
diff changeset
  1063
	@echo '===> Compiling $<'
4094
333c7cf842a7 (svn r5426) - Makefile: Make the configure script work properly for setting target compilers; Set CC_TARGET / CXX_TARGET
peter1138
parents: 3994
diff changeset
  1064
	$(Q)$(CC_TARGET) $(CC_CFLAGS) $(CFLAGS) $(CDEFS) -c -o $@ $<
3211
a0f00b66cfad (svn r3882) -Codechange: [OSX] changed the way universal and tripple binaries are build
bjarni
parents: 3197
diff changeset
  1065
endif
1163
66ce158ef5ed (svn r1665) Remove VERBOSE flag, because it was only partially implemented
tron
parents: 1162
diff changeset
  1066
2742
a85da8a7fac8 (svn r3287) Turn the winres.o: openttd.rc special case into a normal %.o: %.rc rule
tron
parents: 2736
diff changeset
  1067
%.o: %.rc
a85da8a7fac8 (svn r3287) Turn the winres.o: openttd.rc special case into a normal %.o: %.rc rule
tron
parents: 2736
diff changeset
  1068
	@echo '===> Compiling resource $<'
a85da8a7fac8 (svn r3287) Turn the winres.o: openttd.rc special case into a normal %.o: %.rc rule
tron
parents: 2736
diff changeset
  1069
	$(Q)$(WINDRES) -o $@ $<
a85da8a7fac8 (svn r3287) Turn the winres.o: openttd.rc special case into a normal %.o: %.rc rule
tron
parents: 2736
diff changeset
  1070
1163
66ce158ef5ed (svn r1665) Remove VERBOSE flag, because it was only partially implemented
tron
parents: 1162
diff changeset
  1071
66ce158ef5ed (svn r1665) Remove VERBOSE flag, because it was only partially implemented
tron
parents: 1162
diff changeset
  1072
info:
1435
16111425d676 (svn r1939) Revert part of r1938 which accidently crept in
tron
parents: 1434
diff changeset
  1073
	@echo 'CFLAGS  = $(CFLAGS)'
1163
66ce158ef5ed (svn r1665) Remove VERBOSE flag, because it was only partially implemented
tron
parents: 1162
diff changeset
  1074
	@echo 'LDFLAGS = $(LDFLAGS)'
66ce158ef5ed (svn r1665) Remove VERBOSE flag, because it was only partially implemented
tron
parents: 1162
diff changeset
  1075
	@echo 'LIBS    = $(LIBS)'
2327
69493bdce1ae (svn r2853) Add missing dependencies and flags to the dependency targets and make the info target more informative
tron
parents: 2317
diff changeset
  1076
	@echo 'CDEFS   = $(CDEFS)'