author | celestar |
Wed, 22 Mar 2006 11:23:22 +0000 | |
branch | 0.4.5 |
changeset 9946 | d3cb7e05c5a6 |
parent 9915 | b023e71a2008 |
child 9951 | 7a623ae69d11 |
permissions | -rw-r--r-- |
2185 | 1 |
# $Id$ |
2 |
||
0 | 3 |
############################################################################## |
4 |
# |
|
5 |
# Usage |
|
6 |
# |
|
7 |
||
8 |
# Synopsis: |
|
9 |
# |
|
10 |
# make WITH_ZLIB=1 UNIX=1 MANUAL_CONFIG=1 |
|
11 |
# |
|
12 |
# (See below for the list of possible options.) |
|
13 |
# |
|
14 |
# Alternately, you can run make without the MANUAL_CONFIG part. It then |
|
15 |
# generates Makefile.config, where you can customize all the options. |
|
16 |
# However beware that for all subsequent calls the option values from |
|
17 |
# Makefile.config take precedence to the commandline options. |
|
18 |
# |
|
19 |
# (That means that you probably want to either specify the options on command |
|
20 |
# line together with MANUAL_CONFIG=1 or you want to specify no commandline |
|
21 |
# options at all.) |
|
22 |
||
23 |
# Targets: |
|
24 |
# |
|
25 |
# Defaults to building binary |
|
26 |
# clean: remove intermediate build files |
|
27 |
# mrproper: remove intermediate files and makefile configuration |
|
28 |
# upgradeconf: add new options to old Makefile.config |
|
29 |
# osx: OS X application |
|
563
f60fe5a7d56f
(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 | 31 |
|
32 |
# Options: |
|
33 |
# |
|
34 |
# Summary of OS choice defines |
|
35 |
# WIN32: building on Windows |
|
36 |
# UNIX: building on *nix derivate (Linux, FreeBSD) |
|
37 |
# OSX: building on Mac OS X |
|
38 |
# MORPHOS: building on MorphOS |
|
421
0b9bdcdfe0c5
(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
20304ea8e94e
(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 | 41 |
# |
42 |
# Summary of library choice defines |
|
43 |
# WITH_ZLIB: savegames using zlib |
|
44 |
# WITH_PNG: screenshots using PNG |
|
45 |
# WITH_SDL: SDL video driver support |
|
2736
1ea068235989
(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 | 47 |
# |
48 |
# Summary of other defines: |
|
49 |
# MANUAL_CONFIG: do not use Makefile.config, config options set manually |
|
50 |
# DEBUG: build in debug mode |
|
51 |
# PROFILE: build in profile mode, disables -s and -fomit-frame-pointer |
|
52 |
# TRANSLATOR: build in translator mode (untranslated strings are prepended by |
|
53 |
# a <TODO> mark) |
|
54 |
# RELEASE: this will be the released version number. It replaces all places |
|
55 |
# 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
|
56 |
# MIDI: if set, it will use it as custom path to midi player. |
1584
aa7fe51c4368
(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 |
# If unset, it will use the hardcoded path in the c code |
aa7fe51c4368
(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
|
58 |
# This can still be overriden by the music.extmidi openttd.cfg option. |
2197 | 59 |
# WITH_DIRECTMUSIC: enable DirectMusic MIDI support |
804
06aaddf6742b
(svn r1274) Makefile: networking is not longer experimental
bjarni
parents:
798
diff
changeset
|
60 |
# WITH_NETWORK: enable networking |
06aaddf6742b
(svn r1274) Makefile: networking is not longer experimental
bjarni
parents:
798
diff
changeset
|
61 |
# DEDICATED: allows compilation on UNIX without SDL. Useful for dedicated servers |
2672
ea469d7b34ff
(svn r3214) -Feature: openttd.cfg can now set how many autosaves to keep before starting to overwrite old ones
bjarni
parents:
2625
diff
changeset
|
62 |
# MAX_NUM_AUTOSAVES: sets the number of autosaves the games will make before starting |
ea469d7b34ff
(svn r3214) -Feature: openttd.cfg can now set how many autosaves to keep before starting to overwrite old ones
bjarni
parents:
2625
diff
changeset
|
63 |
# to overwrite the old ones. If not set, the game will use 16. |
ea469d7b34ff
(svn r3214) -Feature: openttd.cfg can now set how many autosaves to keep before starting to overwrite old ones
bjarni
parents:
2625
diff
changeset
|
64 |
# NOTE: assign a number, not a string of a number |
0 | 65 |
# |
285 | 66 |
# Paths: |
67 |
# INSTALL: If not set, the game uses the directory of the binary to |
|
543
e3b43338096b
(svn r942) -Merged branch/network back into the trunk
truelight
parents:
532
diff
changeset
|
68 |
# store everything (lang, data, gm, save and openttd.cfg), this is the `old' behaviour. |
285 | 69 |
# In this case, none of the following paths are used, you also should _not_ |
70 |
# use `make install', but copy the required stuff yourself (or just play out |
|
71 |
# of you source directory, which should work fine). |
|
72 |
# If you want to use `make install' to install the game globally, you should |
|
73 |
# define it _before_ you build the game. If you only define INSTALL when you |
|
74 |
# do `make install', the game won't be able to find it's files (so you should |
|
75 |
# also define all the following paths before building). |
|
76 |
# |
|
77 |
# So, the following paths should be defined if INSTALL is defined. |
|
78 |
# None of these paths have to end with / |
|
79 |
# PREFIX: Normally /usr/local |
|
80 |
# BINARY_DIR: The location of the binary, normally games. (Will be prefixed |
|
81 |
# with $PREFIX) |
|
1865
8f237a5b1a5f
(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
|
82 |
# DATA_DIR: The location of the data (lang, data, gm and scenario), normally |
8f237a5b1a5f
(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
|
83 |
# share/games/openttd. (Will be prefixed with $PREFIX) Note that scenarios |
8f237a5b1a5f
(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
|
84 |
# are only put here if USE_HOMEDIR is true, otherwise they are placed in |
8f237a5b1a5f
(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
|
85 |
# PERSONAL_DIR/scenario |
2901
6adc1bdca953
(svn r3456) - Feature: [Makefile] Icons can now be installed in a seperate directory.
matthijs
parents:
2835
diff
changeset
|
86 |
# ICON_DIR: The location of the openttd icon. (Will be prefixed with |
6adc1bdca953
(svn r3456) - Feature: [Makefile] Icons can now be installed in a seperate directory.
matthijs
parents:
2835
diff
changeset
|
87 |
# $PREFIX). |
285 | 88 |
# PERSONAL_DIR: The directory where openttd.cfg and the save folder will be |
89 |
# stored. You cannot use ~ here, define USE_HOMEDIR for that. |
|
90 |
# USE_HOMEDIR: If this variable is set, PERSONAL_DIR will be prefixed with |
|
91 |
# ~/ at runtime (the user's homedir) |
|
561
e3b9689745ab
(svn r970) Added 2nd data path for all non-windows OSes
bjarni
parents:
551
diff
changeset
|
92 |
# SECOND_DATA_PATH Use this data dir if a file is not found in the data dir in the data path |
1251 | 93 |
# CUSTOM_LANG_PATH If this is set, it will use the path given to search for lng files |
561
e3b9689745ab
(svn r970) Added 2nd data path for all non-windows OSes
bjarni
parents:
551
diff
changeset
|
94 |
# instead of the lang dir in the data path |
e3b9689745ab
(svn r970) Added 2nd data path for all non-windows OSes
bjarni
parents:
551
diff
changeset
|
95 |
# NOTE: both SECOND_DATA_PATH and CUSTOM_LANG_PATH uses paths relative to where OTTD is opened |
285 | 96 |
# |
97 |
# DEST_DIR: make install will use this directory instead of the filesystem |
|
98 |
# root to install its files. This should normally not be used by |
|
99 |
# ordinary users, currently it is only used for the debian |
|
100 |
# packaging. This value should only be set when calling `make |
|
101 |
# install' and is not saved in Makefile.config |
|
1476
abbcea18a01c
(svn r1980) Check $DESTDIR if $DEST_DIR was not set.
pasky
parents:
1435
diff
changeset
|
102 |
# (Note that DESTDIR is checked if DEST_DIR is not set.) |
0 | 103 |
# |
104 |
# STATIC: link statically |
|
105 |
# CYGWIN: build in Cygwin environment |
|
106 |
# MINGW: build with MingW compiler, link with MingW libraries |
|
107 |
# |
|
1411
53935a3bcea0
(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
|
108 |
# VERBOSE: show full compiler invocations instead of brief progress messages |
53935a3bcea0
(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
|
109 |
# |
1692
2587eee1c632
(svn r2196) -Change: updated the Makefile, now it works for crossplatform compiling
TrueLight
parents:
1629
diff
changeset
|
110 |
# Special for crosscompiling there are some commands available: |
2587eee1c632
(svn r2196) -Change: updated the Makefile, now it works for crossplatform compiling
TrueLight
parents:
1629
diff
changeset
|
111 |
# |
2834
6c29ece4f24b
(svn r3382) -Feature: [OSX] added the flag JAGUAR to crosscompile for OSX 10.2.8 on 10.4
bjarni
parents:
2800
diff
changeset
|
112 |
# FAT_BINARY: builds a universal binary for OSX. Make sure you got both PPC and x86 libs. Only works with GCC 4 or newer |
6c29ece4f24b
(svn r3382) -Feature: [OSX] added the flag JAGUAR to crosscompile for OSX 10.2.8 on 10.4
bjarni
parents:
2800
diff
changeset
|
113 |
# |
6c29ece4f24b
(svn r3382) -Feature: [OSX] added the flag JAGUAR to crosscompile for OSX 10.2.8 on 10.4
bjarni
parents:
2800
diff
changeset
|
114 |
# JAGUAR: Crosscompiling for OSX 1.2.8 (codenamed Jaguar). Only works if OSX is defined too. Only works with GCC 4 or newer |
6c29ece4f24b
(svn r3382) -Feature: [OSX] added the flag JAGUAR to crosscompile for OSX 10.2.8 on 10.4
bjarni
parents:
2800
diff
changeset
|
115 |
# This can be changed to any PPC version of OSX by changing the ppc flags in Makefile.config |
2713
9f06e1f94ce9
(svn r3258) -Feature: [OSX] added support for universal binaries
bjarni
parents:
2712
diff
changeset
|
116 |
# |
2719
146eaa0ec83c
(svn r3264) -Codechange: [OSX] OSX targets will now always use the preprocessor to determine endianess
bjarni
parents:
2717
diff
changeset
|
117 |
# ENDIAN_FORCE: forces the endian-check to give a certain result. Can be BE, LE or PREPROCESSOR. |
146eaa0ec83c
(svn r3264) -Codechange: [OSX] OSX targets will now always use the preprocessor to determine endianess
bjarni
parents:
2717
diff
changeset
|
118 |
# PREPROCESSOR is always used on all OSX targets and will make the preprocessor pick the right endian. |
146eaa0ec83c
(svn r3264) -Codechange: [OSX] OSX targets will now always use the preprocessor to determine endianess
bjarni
parents:
2717
diff
changeset
|
119 |
# this means that you don't have to think about endianess when compiling for OSX. |
146eaa0ec83c
(svn r3264) -Codechange: [OSX] OSX targets will now always use the preprocessor to determine endianess
bjarni
parents:
2717
diff
changeset
|
120 |
# Very useful for universal binaries and crosscompilers. Not sure if it works on non OSX targets |
1692
2587eee1c632
(svn r2196) -Change: updated the Makefile, now it works for crossplatform compiling
TrueLight
parents:
1629
diff
changeset
|
121 |
# WINDRES: the location of your windres |
2587eee1c632
(svn r2196) -Change: updated the Makefile, now it works for crossplatform compiling
TrueLight
parents:
1629
diff
changeset
|
122 |
# CC_HOST: the gcc of your localhost if you are making a target that produces incompatible executables |
2587eee1c632
(svn r2196) -Change: updated the Makefile, now it works for crossplatform compiling
TrueLight
parents:
1629
diff
changeset
|
123 |
# CFLAGS_HOST: cflags used for CC_HOST. Make it something if you are getting errors when you try to compi |
2587eee1c632
(svn r2196) -Change: updated the Makefile, now it works for crossplatform compiling
TrueLight
parents:
1629
diff
changeset
|
124 |
# windows executables on linux. (just: CFLAGS_HOST:='-I' or something) |
0 | 125 |
|
126 |
||
127 |
############################################################################## |
|
128 |
# |
|
129 |
# Configuration |
|
130 |
# |
|
131 |
||
1148
c7925e9e1182
(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
|
132 |
|
180
47ee14fe2b35
(svn r181) Makefile: enabled ability to supress output of missing strings in lng files
bjarni
parents:
164
diff
changeset
|
133 |
# Makefile version tag |
1492
e03a8c6f7efd
(svn r1996) makefile.config -> Makefile.config, that's its name.
pasky
parents:
1491
diff
changeset
|
134 |
# it checks if the version tag in Makefile.config is the same and force update outdated config files |
2672
ea469d7b34ff
(svn r3214) -Feature: openttd.cfg can now set how many autosaves to keep before starting to overwrite old ones
bjarni
parents:
2625
diff
changeset
|
135 |
MAKEFILE_VERSION:=8 |
180
47ee14fe2b35
(svn r181) Makefile: enabled ability to supress output of missing strings in lng files
bjarni
parents:
164
diff
changeset
|
136 |
|
1146 | 137 |
# CONFIG_WRITER has to be found even for manual configuration |
0 | 138 |
CONFIG_WRITER=makefiledir/Makefile.config_writer |
139 |
||
140 |
ifndef MANUAL_CONFIG |
|
141 |
# Automatic configuration |
|
142 |
MAKE_CONFIG:=Makefile.config |
|
143 |
MAKEFILE:=Makefile |
|
144 |
LIB_DETECTION=makefiledir/Makefile.libdetection |
|
145 |
CONFIG_WRITER=makefiledir/Makefile.config_writer |
|
146 |
||
147 |
# Apply automatic configuration |
|
148 |
# See target section for how this is built, suppress errors |
|
149 |
# since first time it isn't found but make reads this twice |
|
150 |
-include $(MAKE_CONFIG) |
|
151 |
else |
|
152 |
CONFIG_INCLUDED:=1 |
|
153 |
endif |
|
154 |
||
1955
52a84e880864
(svn r2461) -Feature [Makefile] libpng-config can now be called something else in Makefile.config
bjarni
parents:
1952
diff
changeset
|
155 |
ifndef LIBPNG-CONFIG |
52a84e880864
(svn r2461) -Feature [Makefile] libpng-config can now be called something else in Makefile.config
bjarni
parents:
1952
diff
changeset
|
156 |
LIBPNG-CONFIG :=libpng-config |
52a84e880864
(svn r2461) -Feature [Makefile] libpng-config can now be called something else in Makefile.config
bjarni
parents:
1952
diff
changeset
|
157 |
endif |
52a84e880864
(svn r2461) -Feature [Makefile] libpng-config can now be called something else in Makefile.config
bjarni
parents:
1952
diff
changeset
|
158 |
|
1492
e03a8c6f7efd
(svn r1996) makefile.config -> Makefile.config, that's its name.
pasky
parents:
1491
diff
changeset
|
159 |
# 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
|
160 |
ifneq ($(MAKEFILE_VERSION),$(CONFIG_VERSION)) |
189
4d133909845a
(svn r190) Makefile: fixed bug, that prevented compilation with MANUAL_CONFIG enabled
bjarni
parents:
180
diff
changeset
|
161 |
ifndef MANUAL_CONFIG # manual config should not check this |
4d133909845a
(svn r190) Makefile: fixed bug, that prevented compilation with MANUAL_CONFIG enabled
bjarni
parents:
180
diff
changeset
|
162 |
UPDATECONFIG:=upgradeconf |
4d133909845a
(svn r190) Makefile: fixed bug, that prevented compilation with MANUAL_CONFIG enabled
bjarni
parents:
180
diff
changeset
|
163 |
CONFIG_INCLUDED:= |
4d133909845a
(svn r190) Makefile: fixed bug, that prevented compilation with MANUAL_CONFIG enabled
bjarni
parents:
180
diff
changeset
|
164 |
else |
4d133909845a
(svn r190) Makefile: fixed bug, that prevented compilation with MANUAL_CONFIG enabled
bjarni
parents:
180
diff
changeset
|
165 |
# this should define SDL-CONFIG for manual configuration |
4d133909845a
(svn r190) Makefile: fixed bug, that prevented compilation with MANUAL_CONFIG enabled
bjarni
parents:
180
diff
changeset
|
166 |
ifeq ($(shell uname),FreeBSD) |
4d133909845a
(svn r190) Makefile: fixed bug, that prevented compilation with MANUAL_CONFIG enabled
bjarni
parents:
180
diff
changeset
|
167 |
SDL-CONFIG:=sdl11-config |
4d133909845a
(svn r190) Makefile: fixed bug, that prevented compilation with MANUAL_CONFIG enabled
bjarni
parents:
180
diff
changeset
|
168 |
else |
4d133909845a
(svn r190) Makefile: fixed bug, that prevented compilation with MANUAL_CONFIG enabled
bjarni
parents:
180
diff
changeset
|
169 |
SDL-CONFIG:=sdl-config |
4d133909845a
(svn r190) Makefile: fixed bug, that prevented compilation with MANUAL_CONFIG enabled
bjarni
parents:
180
diff
changeset
|
170 |
endif |
4d133909845a
(svn r190) Makefile: fixed bug, that prevented compilation with MANUAL_CONFIG enabled
bjarni
parents:
180
diff
changeset
|
171 |
endif |
1693
e3a6eedee876
(svn r2197) -fix [Makefile]: SDL_CONFIG from makefile.config is now not always overwritten
bjarni
parents:
1692
diff
changeset
|
172 |
endif |
e3a6eedee876
(svn r2197) -fix [Makefile]: SDL_CONFIG from makefile.config is now not always overwritten
bjarni
parents:
1692
diff
changeset
|
173 |
|
e3a6eedee876
(svn r2197) -fix [Makefile]: SDL_CONFIG from makefile.config is now not always overwritten
bjarni
parents:
1692
diff
changeset
|
174 |
ifndef SDL-CONFIG |
e3a6eedee876
(svn r2197) -fix [Makefile]: SDL_CONFIG from makefile.config is now not always overwritten
bjarni
parents:
1692
diff
changeset
|
175 |
UPDATECONFIG:=upgradeconf |
e3a6eedee876
(svn r2197) -fix [Makefile]: SDL_CONFIG from makefile.config is now not always overwritten
bjarni
parents:
1692
diff
changeset
|
176 |
CONFIG_INCLUDED:= |
0 | 177 |
endif |
178 |
||
1492
e03a8c6f7efd
(svn r1996) makefile.config -> Makefile.config, that's its name.
pasky
parents:
1491
diff
changeset
|
179 |
# this is used if there aren't any Makefile.config |
0 | 180 |
ifndef CONFIG_INCLUDED |
285 | 181 |
# sets network on by default if there aren't any config file |
543
e3b43338096b
(svn r942) -Merged branch/network back into the trunk
truelight
parents:
532
diff
changeset
|
182 |
ENABLE_NETWORK:=1 |
285 | 183 |
|
184 |
# paths for make install |
|
185 |
# disabled as they would break it for some (many?) people if they were default |
|
186 |
#PREFIX:=/usr/local |
|
187 |
#DATA_DIR:=share/games/openttd |
|
188 |
#BINARY_DIR:=games |
|
189 |
#PERSONAL_DIR:=.openttd |
|
190 |
#USE_HOMEDIR:=1 |
|
191 |
||
0 | 192 |
-include $(LIB_DETECTION) |
193 |
endif |
|
194 |
||
180
47ee14fe2b35
(svn r181) Makefile: enabled ability to supress output of missing strings in lng files
bjarni
parents:
164
diff
changeset
|
195 |
ifdef SUPRESS_LANG_ERRORS |
47ee14fe2b35
(svn r181) Makefile: enabled ability to supress output of missing strings in lng files
bjarni
parents:
164
diff
changeset
|
196 |
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
|
197 |
endif |
47ee14fe2b35
(svn r181) Makefile: enabled ability to supress output of missing strings in lng files
bjarni
parents:
164
diff
changeset
|
198 |
|
2722
dcbf94a5ad1a
(svn r3267) -Codechange: [OSX] universal binary makefile code cleanup
bjarni
parents:
2719
diff
changeset
|
199 |
ifdef OSX |
dcbf94a5ad1a
(svn r3267) -Codechange: [OSX] universal binary makefile code cleanup
bjarni
parents:
2719
diff
changeset
|
200 |
-include os/MacOSX/Makefile.setup |
dcbf94a5ad1a
(svn r3267) -Codechange: [OSX] universal binary makefile code cleanup
bjarni
parents:
2719
diff
changeset
|
201 |
endif |
dcbf94a5ad1a
(svn r3267) -Codechange: [OSX] universal binary makefile code cleanup
bjarni
parents:
2719
diff
changeset
|
202 |
|
0 | 203 |
ifdef STATIC |
204 |
ifndef WIN32 |
|
205 |
ifndef OSX |
|
206 |
ifndef MORPHOS |
|
207 |
ifndef SKIP_STATIC_CHECK |
|
1492
e03a8c6f7efd
(svn r1996) makefile.config -> Makefile.config, that's its name.
pasky
parents:
1491
diff
changeset
|
208 |
$(error Static is only known to work on MorphOS and MacOSX!!! --- Check Makefile.config for more info and howto bypass this check) |
0 | 209 |
endif |
210 |
endif |
|
211 |
endif |
|
212 |
endif |
|
213 |
endif |
|
214 |
||
2736
1ea068235989
(svn r3281) -Feature: [OSX] added native cocoa sound and video drivers (egladil)
bjarni
parents:
2735
diff
changeset
|
215 |
ifdef WITH_COCOA |
1ea068235989
(svn r3281) -Feature: [OSX] added native cocoa sound and video drivers (egladil)
bjarni
parents:
2735
diff
changeset
|
216 |
ifdef WITH_SDL |
1ea068235989
(svn r3281) -Feature: [OSX] added native cocoa sound and video drivers (egladil)
bjarni
parents:
2735
diff
changeset
|
217 |
$(error You can not use both the SDL video driver and the Cocoa video driver at the same time) |
1ea068235989
(svn r3281) -Feature: [OSX] added native cocoa sound and video drivers (egladil)
bjarni
parents:
2735
diff
changeset
|
218 |
endif |
1ea068235989
(svn r3281) -Feature: [OSX] added native cocoa sound and video drivers (egladil)
bjarni
parents:
2735
diff
changeset
|
219 |
ifdef DEDICATED |
1ea068235989
(svn r3281) -Feature: [OSX] added native cocoa sound and video drivers (egladil)
bjarni
parents:
2735
diff
changeset
|
220 |
$(error You can not use the Cocoa video driver in a dedicated server) |
1ea068235989
(svn r3281) -Feature: [OSX] added native cocoa sound and video drivers (egladil)
bjarni
parents:
2735
diff
changeset
|
221 |
endif |
1ea068235989
(svn r3281) -Feature: [OSX] added native cocoa sound and video drivers (egladil)
bjarni
parents:
2735
diff
changeset
|
222 |
else |
0 | 223 |
# Force SDL on UNIX platforms |
224 |
ifndef WITH_SDL |
|
225 |
ifdef UNIX |
|
549
004bcc2b1033
(svn r949) Makefile: added DEDICATED flag to allow complilation of dedicated servers without linking to SDL. Request by Jezral
bjarni
parents:
543
diff
changeset
|
226 |
ifndef DEDICATED |
004bcc2b1033
(svn r949) Makefile: added DEDICATED flag to allow complilation of dedicated servers without linking to SDL. Request by Jezral
bjarni
parents:
543
diff
changeset
|
227 |
$(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 | 228 |
endif |
229 |
endif |
|
549
004bcc2b1033
(svn r949) Makefile: added DEDICATED flag to allow complilation of dedicated servers without linking to SDL. Request by Jezral
bjarni
parents:
543
diff
changeset
|
230 |
endif |
2736
1ea068235989
(svn r3281) -Feature: [OSX] added native cocoa sound and video drivers (egladil)
bjarni
parents:
2735
diff
changeset
|
231 |
endif |
549
004bcc2b1033
(svn r949) Makefile: added DEDICATED flag to allow complilation of dedicated servers without linking to SDL. Request by Jezral
bjarni
parents:
543
diff
changeset
|
232 |
|
1029
c6bbfed6fc26
(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
|
233 |
# remove the dependancy for sdl if DEDICALTED is used |
c6bbfed6fc26
(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
|
234 |
ifdef DEDICATED |
2779
699ddeb79adf
(svn r3326) - Fix: [ 1226832 ] Build fails if SDL is built without pthread support (dst)
Darkvater
parents:
2767
diff
changeset
|
235 |
WITH_SDL:= |
699ddeb79adf
(svn r3326) - Fix: [ 1226832 ] Build fails if SDL is built without pthread support (dst)
Darkvater
parents:
2767
diff
changeset
|
236 |
endif |
699ddeb79adf
(svn r3326) - Fix: [ 1226832 ] Build fails if SDL is built without pthread support (dst)
Darkvater
parents:
2767
diff
changeset
|
237 |
|
699ddeb79adf
(svn r3326) - Fix: [ 1226832 ] Build fails if SDL is built without pthread support (dst)
Darkvater
parents:
2767
diff
changeset
|
238 |
# add -lpthread to LDFLAGS |
2298
64a87da01248
(svn r2822) -Fix: don't compile pthread for win32 dedicated servers
truelight
parents:
2291
diff
changeset
|
239 |
ifndef WIN32 |
2779
699ddeb79adf
(svn r3326) - Fix: [ 1226832 ] Build fails if SDL is built without pthread support (dst)
Darkvater
parents:
2767
diff
changeset
|
240 |
ifndef MORPHOS |
699ddeb79adf
(svn r3326) - Fix: [ 1226832 ] Build fails if SDL is built without pthread support (dst)
Darkvater
parents:
2767
diff
changeset
|
241 |
ifndef OSX |
699ddeb79adf
(svn r3326) - Fix: [ 1226832 ] Build fails if SDL is built without pthread support (dst)
Darkvater
parents:
2767
diff
changeset
|
242 |
LDFLAGS+=-lpthread |
699ddeb79adf
(svn r3326) - Fix: [ 1226832 ] Build fails if SDL is built without pthread support (dst)
Darkvater
parents:
2767
diff
changeset
|
243 |
endif |
699ddeb79adf
(svn r3326) - Fix: [ 1226832 ] Build fails if SDL is built without pthread support (dst)
Darkvater
parents:
2767
diff
changeset
|
244 |
endif |
1029
c6bbfed6fc26
(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
|
245 |
endif |
2779
699ddeb79adf
(svn r3326) - Fix: [ 1226832 ] Build fails if SDL is built without pthread support (dst)
Darkvater
parents:
2767
diff
changeset
|
246 |
|
2300
d85dbbd78fd5
(svn r2824) -Fix: OSX can now also produce dedicated servers
truelight
parents:
2299
diff
changeset
|
247 |
ifdef OSX |
2779
699ddeb79adf
(svn r3326) - Fix: [ 1226832 ] Build fails if SDL is built without pthread support (dst)
Darkvater
parents:
2767
diff
changeset
|
248 |
LDFLAGS+=-framework Cocoa |
2300
d85dbbd78fd5
(svn r2824) -Fix: OSX can now also produce dedicated servers
truelight
parents:
2299
diff
changeset
|
249 |
endif |
0 | 250 |
|
251 |
||
252 |
############################################################################## |
|
253 |
# |
|
254 |
# Compiler configuration |
|
255 |
# |
|
256 |
||
257 |
# Executable file extension |
|
258 |
ifdef WIN32 |
|
259 |
EXE=.exe |
|
260 |
else |
|
261 |
EXE= |
|
262 |
endif |
|
263 |
||
264 |
# Set output executable names |
|
32 | 265 |
TTD=openttd$(EXE) |
157
dd017fa3bad8
(svn r158) -Fix: make endianess check 100% accurate (hopefully ;))
truelight
parents:
126
diff
changeset
|
266 |
ENDIAN_CHECK=endian_check$(EXE) |
0 | 267 |
STRGEN=strgen/strgen$(EXE) |
268 |
OSXAPP="OpenTTD.app" |
|
269 |
||
9915
b023e71a2008
(svn r3518) - Add proper revision numbers for bugfixing branch
Darkvater
parents:
2918
diff
changeset
|
270 |
REV := 0.4.5-$(shell if test -d .svn; then svnversion . | awk '{ print "r"$$0 }'; fi) |
0 | 271 |
|
272 |
# MorphOS needs builddate |
|
1289
93edd9c4e1b6
(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 | 274 |
|
1692
2587eee1c632
(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 |
2587eee1c632
(svn r2196) -Change: updated the Makefile, now it works for crossplatform compiling
TrueLight
parents:
1629
diff
changeset
|
276 |
ifndef WINDRES |
2587eee1c632
(svn r2196) -Change: updated the Makefile, now it works for crossplatform compiling
TrueLight
parents:
1629
diff
changeset
|
277 |
WINDRES = windres |
2587eee1c632
(svn r2196) -Change: updated the Makefile, now it works for crossplatform compiling
TrueLight
parents:
1629
diff
changeset
|
278 |
endif |
2587eee1c632
(svn r2196) -Change: updated the Makefile, now it works for crossplatform compiling
TrueLight
parents:
1629
diff
changeset
|
279 |
|
2587eee1c632
(svn r2196) -Change: updated the Makefile, now it works for crossplatform compiling
TrueLight
parents:
1629
diff
changeset
|
280 |
# Check if we have a new target |
2587eee1c632
(svn r2196) -Change: updated the Makefile, now it works for crossplatform compiling
TrueLight
parents:
1629
diff
changeset
|
281 |
ifdef CC_TARGET |
2587eee1c632
(svn r2196) -Change: updated the Makefile, now it works for crossplatform compiling
TrueLight
parents:
1629
diff
changeset
|
282 |
CC = $(CC_TARGET) |
2587eee1c632
(svn r2196) -Change: updated the Makefile, now it works for crossplatform compiling
TrueLight
parents:
1629
diff
changeset
|
283 |
endif |
2587eee1c632
(svn r2196) -Change: updated the Makefile, now it works for crossplatform compiling
TrueLight
parents:
1629
diff
changeset
|
284 |
|
2587eee1c632
(svn r2196) -Change: updated the Makefile, now it works for crossplatform compiling
TrueLight
parents:
1629
diff
changeset
|
285 |
# Check if CC_HOST is defined. If not, it is CC |
2587eee1c632
(svn r2196) -Change: updated the Makefile, now it works for crossplatform compiling
TrueLight
parents:
1629
diff
changeset
|
286 |
ifndef CC_HOST |
2587eee1c632
(svn r2196) -Change: updated the Makefile, now it works for crossplatform compiling
TrueLight
parents:
1629
diff
changeset
|
287 |
CC_HOST = $(CC) |
2587eee1c632
(svn r2196) -Change: updated the Makefile, now it works for crossplatform compiling
TrueLight
parents:
1629
diff
changeset
|
288 |
endif |
2587eee1c632
(svn r2196) -Change: updated the Makefile, now it works for crossplatform compiling
TrueLight
parents:
1629
diff
changeset
|
289 |
ifndef CFLAGS_HOST |
2587eee1c632
(svn r2196) -Change: updated the Makefile, now it works for crossplatform compiling
TrueLight
parents:
1629
diff
changeset
|
290 |
CFLAGS_HOST = $(BASECFLAGS) |
2587eee1c632
(svn r2196) -Change: updated the Makefile, now it works for crossplatform compiling
TrueLight
parents:
1629
diff
changeset
|
291 |
endif |
0 | 292 |
|
293 |
||
1069
922f5c7be173
(svn r1570) Make the gcc version test work with old versions of test (i.e. don't use the < operator)
tron
parents:
1052
diff
changeset
|
294 |
CC_VERSION = $(shell $(CC) -dumpversion | cut -c 1,3) |
1052
53e669371277
(svn r1553) Check which gcc version is present and only set availible compiler flags
tron
parents:
1051
diff
changeset
|
295 |
|
53e669371277
(svn r1553) Check which gcc version is present and only set availible compiler flags
tron
parents:
1051
diff
changeset
|
296 |
# GNU make can only test for (in)equality |
53e669371277
(svn r1553) Check which gcc version is present and only set availible compiler flags
tron
parents:
1051
diff
changeset
|
297 |
# this is a workaround to test for >= |
2240
8f18d87a4b5c
(svn r2760) Remove stale comments, long unused stuff and simplify some checks
tron
parents:
2236
diff
changeset
|
298 |
ifeq ($(shell expr $(CC_VERSION) \>= 29), 1) |
2751
4ee82551f3f7
(svn r3296) Warn about testing an undefined macro with #if - should most probably be #ifdef
tron
parents:
2742
diff
changeset
|
299 |
CFLAGS += -O -Wall -Wno-multichar -Wsign-compare -Wstrict-prototypes -Wundef |
1324
ff8b7799b44f
(svn r1828) New warning flag especially for truelight (:<
tron
parents:
1317
diff
changeset
|
300 |
CFLAGS += -Wwrite-strings -Wpointer-arith |
1052
53e669371277
(svn r1553) Check which gcc version is present and only set availible compiler flags
tron
parents:
1051
diff
changeset
|
301 |
endif |
2240
8f18d87a4b5c
(svn r2760) Remove stale comments, long unused stuff and simplify some checks
tron
parents:
2236
diff
changeset
|
302 |
ifeq ($(shell expr $(CC_VERSION) \>= 30), 1) |
1052
53e669371277
(svn r1553) Check which gcc version is present and only set availible compiler flags
tron
parents:
1051
diff
changeset
|
303 |
CFLAGS += -W -Wno-unused-parameter |
53e669371277
(svn r1553) Check which gcc version is present and only set availible compiler flags
tron
parents:
1051
diff
changeset
|
304 |
endif |
2240
8f18d87a4b5c
(svn r2760) Remove stale comments, long unused stuff and simplify some checks
tron
parents:
2236
diff
changeset
|
305 |
ifeq ($(shell expr $(CC_VERSION) \>= 34), 1) |
1093
e8d26c7dc42f
(svn r1594) Convert all undefined parameter lists to (void) and add the appropriate warning flags in the Makefile
tron
parents:
1069
diff
changeset
|
306 |
CFLAGS += -Wdeclaration-after-statement -Wold-style-definition |
1052
53e669371277
(svn r1553) Check which gcc version is present and only set availible compiler flags
tron
parents:
1051
diff
changeset
|
307 |
endif |
53e669371277
(svn r1553) Check which gcc version is present and only set availible compiler flags
tron
parents:
1051
diff
changeset
|
308 |
|
1240
90b225e69c23
(svn r1744) DEBUG and PROFILE can be used at the same time.
tron
parents:
1211
diff
changeset
|
309 |
ifdef DEBUG |
1479
3bb687fbe344
(svn r1983) Introduce multiple compile time debug levels
tron
parents:
1476
diff
changeset
|
310 |
ifeq ($(shell expr $(DEBUG) \>= 1), 1) |
3bb687fbe344
(svn r1983) Introduce multiple compile time debug levels
tron
parents:
1476
diff
changeset
|
311 |
CFLAGS += -g -D_DEBUG |
3bb687fbe344
(svn r1983) Introduce multiple compile time debug levels
tron
parents:
1476
diff
changeset
|
312 |
endif |
3bb687fbe344
(svn r1983) Introduce multiple compile time debug levels
tron
parents:
1476
diff
changeset
|
313 |
ifeq ($(shell expr $(DEBUG) \>= 2), 1) |
3bb687fbe344
(svn r1983) Introduce multiple compile time debug levels
tron
parents:
1476
diff
changeset
|
314 |
CFLAGS += -fno-inline |
3bb687fbe344
(svn r1983) Introduce multiple compile time debug levels
tron
parents:
1476
diff
changeset
|
315 |
endif |
3bb687fbe344
(svn r1983) Introduce multiple compile time debug levels
tron
parents:
1476
diff
changeset
|
316 |
ifeq ($(shell expr $(DEBUG) \>= 3), 1) |
3bb687fbe344
(svn r1983) Introduce multiple compile time debug levels
tron
parents:
1476
diff
changeset
|
317 |
CFLAGS += -O0 |
3bb687fbe344
(svn r1983) Introduce multiple compile time debug levels
tron
parents:
1476
diff
changeset
|
318 |
endif |
1240
90b225e69c23
(svn r1744) DEBUG and PROFILE can be used at the same time.
tron
parents:
1211
diff
changeset
|
319 |
endif |
90b225e69c23
(svn r1744) DEBUG and PROFILE can be used at the same time.
tron
parents:
1211
diff
changeset
|
320 |
|
90b225e69c23
(svn r1744) DEBUG and PROFILE can be used at the same time.
tron
parents:
1211
diff
changeset
|
321 |
ifdef PROFILE |
90b225e69c23
(svn r1744) DEBUG and PROFILE can be used at the same time.
tron
parents:
1211
diff
changeset
|
322 |
CFLAGS += -pg |
90b225e69c23
(svn r1744) DEBUG and PROFILE can be used at the same time.
tron
parents:
1211
diff
changeset
|
323 |
LDFLAGS += -pg |
90b225e69c23
(svn r1744) DEBUG and PROFILE can be used at the same time.
tron
parents:
1211
diff
changeset
|
324 |
endif |
90b225e69c23
(svn r1744) DEBUG and PROFILE can be used at the same time.
tron
parents:
1211
diff
changeset
|
325 |
|
0 | 326 |
CDEFS=-DWITH_REV |
327 |
||
1240
90b225e69c23
(svn r1744) DEBUG and PROFILE can be used at the same time.
tron
parents:
1211
diff
changeset
|
328 |
ifndef DEBUG |
90b225e69c23
(svn r1744) DEBUG and PROFILE can be used at the same time.
tron
parents:
1211
diff
changeset
|
329 |
ifndef PROFILE |
0 | 330 |
# Release mode |
331 |
ifndef MORPHOS |
|
1810
bf33a29287e5
(svn r2314) - Feature: [ 1187490 ] Patches for building on IRIX (jgilje)
Darkvater
parents:
1722
diff
changeset
|
332 |
ifndef IRIX |
0 | 333 |
# automatical strip breaks under morphos |
334 |
BASECFLAGS += -s |
|
335 |
LDFLAGS += -s |
|
336 |
endif |
|
337 |
endif |
|
1810
bf33a29287e5
(svn r2314) - Feature: [ 1187490 ] Patches for building on IRIX (jgilje)
Darkvater
parents:
1722
diff
changeset
|
338 |
endif |
0 | 339 |
|
340 |
ifdef OSX |
|
341 |
# these compilerflags makes the app run as fast as possible without making the app unstable. It works on G3 or newer |
|
2713
9f06e1f94ce9
(svn r3258) -Feature: [OSX] added support for universal binaries
bjarni
parents:
2712
diff
changeset
|
342 |
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 | 343 |
else |
344 |
ifdef MORPHOS |
|
2356 | 345 |
BASECFLAGS += -I/gg/os-include -O2 -noixemul -fstrict-aliasing -fexpensive-optimizations |
1291 | 346 |
BASECFLAGS += -mcpu=604 -fno-inline -mstring -mmultiple |
0 | 347 |
else |
1169
30e8657f61d0
(svn r1671) Remove WARNING_DISPLAY, because it contained no warning, but an optimization flag
tron
parents:
1168
diff
changeset
|
348 |
BASECFLAGS += -O2 |
0 | 349 |
endif |
350 |
ifndef PROFILE |
|
1810
bf33a29287e5
(svn r2314) - Feature: [ 1187490 ] Patches for building on IRIX (jgilje)
Darkvater
parents:
1722
diff
changeset
|
351 |
ifndef IRIX |
0 | 352 |
BASECFLAGS += -fomit-frame-pointer |
353 |
endif |
|
354 |
endif |
|
355 |
endif |
|
1810
bf33a29287e5
(svn r2314) - Feature: [ 1187490 ] Patches for building on IRIX (jgilje)
Darkvater
parents:
1722
diff
changeset
|
356 |
endif |
0 | 357 |
|
358 |
ifdef STATIC |
|
359 |
ifndef OSX # OSX can't build static if -static flag is used |
|
360 |
LDFLAGS += -static |
|
361 |
endif |
|
362 |
endif |
|
363 |
||
798 | 364 |
# If building on MingW don't link with Cygwin libs |
0 | 365 |
ifdef WIN32 |
798 | 366 |
ifdef CYGWIN |
367 |
BASECFLAGS += -mwin32 |
|
368 |
LDFLAGS += -mwin32 |
|
369 |
endif |
|
0 | 370 |
ifdef MINGW |
371 |
BASECFLAGS += -mno-cygwin |
|
372 |
LDFLAGS += -mno-cygwin |
|
373 |
endif |
|
374 |
endif |
|
375 |
||
376 |
CFLAGS += $(BASECFLAGS) |
|
377 |
||
378 |
ifdef UNIX |
|
379 |
CDEFS += -DUNIX |
|
380 |
endif |
|
381 |
||
421
0b9bdcdfe0c5
(svn r619) Add the necessary bits to make building under BeOS using GNU Make work
tron
parents:
413
diff
changeset
|
382 |
ifdef BEOS |
0b9bdcdfe0c5
(svn r619) Add the necessary bits to make building under BeOS using GNU Make work
tron
parents:
413
diff
changeset
|
383 |
CDEFS += -DBEOS |
2497
1c8460570c0d
(svn r3023) -Fix [BeOS] fixed compilation on BeOS R5 (MYOB)
bjarni
parents:
2496
diff
changeset
|
384 |
LDFLAGS += -lmidi -lbe -lpthread |
421
0b9bdcdfe0c5
(svn r619) Add the necessary bits to make building under BeOS using GNU Make work
tron
parents:
413
diff
changeset
|
385 |
ifdef WITH_NETWORK |
0b9bdcdfe0c5
(svn r619) Add the necessary bits to make building under BeOS using GNU Make work
tron
parents:
413
diff
changeset
|
386 |
ifdef BEOS_NET_SERVER |
1051 | 387 |
CDEFS += -DBEOS_NET_SERVER |
2497
1c8460570c0d
(svn r3023) -Fix [BeOS] fixed compilation on BeOS R5 (MYOB)
bjarni
parents:
2496
diff
changeset
|
388 |
LDFLAGS += -lnet |
1051 | 389 |
else |
2497
1c8460570c0d
(svn r3023) -Fix [BeOS] fixed compilation on BeOS R5 (MYOB)
bjarni
parents:
2496
diff
changeset
|
390 |
# BONE needs a few more libraries than R5 |
1051 | 391 |
LDFLAGS += -lbind -lsocket |
421
0b9bdcdfe0c5
(svn r619) Add the necessary bits to make building under BeOS using GNU Make work
tron
parents:
413
diff
changeset
|
392 |
endif |
0b9bdcdfe0c5
(svn r619) Add the necessary bits to make building under BeOS using GNU Make work
tron
parents:
413
diff
changeset
|
393 |
endif |
0b9bdcdfe0c5
(svn r619) Add the necessary bits to make building under BeOS using GNU Make work
tron
parents:
413
diff
changeset
|
394 |
endif |
0b9bdcdfe0c5
(svn r619) Add the necessary bits to make building under BeOS using GNU Make work
tron
parents:
413
diff
changeset
|
395 |
|
1164
01c12c2f1973
(svn r1666) Move some MorphOS compile flags to a place where they actually belong
tron
parents:
1163
diff
changeset
|
396 |
ifdef MORPHOS |
1291 | 397 |
# -Wstrict-prototypes generates much noise because of system headers |
398 |
CFLAGS += -Wno-strict-prototypes |
|
1164
01c12c2f1973
(svn r1666) Move some MorphOS compile flags to a place where they actually belong
tron
parents:
1163
diff
changeset
|
399 |
endif |
01c12c2f1973
(svn r1666) Move some MorphOS compile flags to a place where they actually belong
tron
parents:
1163
diff
changeset
|
400 |
|
446
20304ea8e94e
(svn r655) Add the necessary bits to make building on SunOS/Solaris work
tron
parents:
421
diff
changeset
|
401 |
ifdef SUNOS |
20304ea8e94e
(svn r655) Add the necessary bits to make building on SunOS/Solaris work
tron
parents:
421
diff
changeset
|
402 |
CDEFS += -DSUNOS |
20304ea8e94e
(svn r655) Add the necessary bits to make building on SunOS/Solaris work
tron
parents:
421
diff
changeset
|
403 |
ifdef WITH_NETWORK |
20304ea8e94e
(svn r655) Add the necessary bits to make building on SunOS/Solaris work
tron
parents:
421
diff
changeset
|
404 |
LDFLAGS += -lnsl -lsocket |
20304ea8e94e
(svn r655) Add the necessary bits to make building on SunOS/Solaris work
tron
parents:
421
diff
changeset
|
405 |
endif |
20304ea8e94e
(svn r655) Add the necessary bits to make building on SunOS/Solaris work
tron
parents:
421
diff
changeset
|
406 |
endif |
20304ea8e94e
(svn r655) Add the necessary bits to make building on SunOS/Solaris work
tron
parents:
421
diff
changeset
|
407 |
|
2500
e2b13f720a94
(svn r3026) -Fix: [OSX] fixed bug that prevented dedicated servers from compiling (introduced in r3022)
bjarni
parents:
2497
diff
changeset
|
408 |
# tell the source that we are building a dedicated server |
e2b13f720a94
(svn r3026) -Fix: [OSX] fixed bug that prevented dedicated servers from compiling (introduced in r3022)
bjarni
parents:
2497
diff
changeset
|
409 |
ifdef DEDICATED |
e2b13f720a94
(svn r3026) -Fix: [OSX] fixed bug that prevented dedicated servers from compiling (introduced in r3022)
bjarni
parents:
2497
diff
changeset
|
410 |
CDEFS += -DDEDICATED |
e2b13f720a94
(svn r3026) -Fix: [OSX] fixed bug that prevented dedicated servers from compiling (introduced in r3022)
bjarni
parents:
2497
diff
changeset
|
411 |
endif |
e2b13f720a94
(svn r3026) -Fix: [OSX] fixed bug that prevented dedicated servers from compiling (introduced in r3022)
bjarni
parents:
2497
diff
changeset
|
412 |
|
0 | 413 |
# SDL config |
414 |
ifdef WITH_SDL |
|
415 |
CDEFS += -DWITH_SDL |
|
1254
c3705f146d8a
(svn r1758) Replace `` with $(shell), because the latter is only evaluated once instead of over and over again
tron
parents:
1251
diff
changeset
|
416 |
CFLAGS += $(shell $(SDL-CONFIG) --cflags) |
0 | 417 |
ifdef STATIC |
1254
c3705f146d8a
(svn r1758) Replace `` with $(shell), because the latter is only evaluated once instead of over and over again
tron
parents:
1251
diff
changeset
|
418 |
LIBS += $(shell $(SDL-CONFIG) --static-libs) |
0 | 419 |
else |
1254
c3705f146d8a
(svn r1758) Replace `` with $(shell), because the latter is only evaluated once instead of over and over again
tron
parents:
1251
diff
changeset
|
420 |
LIBS += $(shell $(SDL-CONFIG) --libs) |
0 | 421 |
endif |
422 |
endif |
|
423 |
||
424 |
# zlib config |
|
425 |
ifdef WITH_ZLIB |
|
426 |
CDEFS += -DWITH_ZLIB |
|
427 |
ifdef STATIC |
|
428 |
ifdef OSX |
|
429 |
# zlib is default on OSX, so everybody have it. No need for static linking |
|
430 |
LIBS += -lz |
|
431 |
else |
|
432 |
ifndef STATIC_ZLIB_PATH |
|
433 |
ifndef MANUAL_CONFIG |
|
1492
e03a8c6f7efd
(svn r1996) makefile.config -> Makefile.config, that's its name.
pasky
parents:
1491
diff
changeset
|
434 |
# updates Makefile.config with the zlib path |
0 | 435 |
UPDATECONFIG:=upgradeconf |
436 |
endif |
|
437 |
TEMP:=$(shell ls /lib 2>/dev/null | grep "zlib.a")$(shell ls /lib 2>/dev/null | grep "libz.a") |
|
438 |
ifdef TEMP |
|
439 |
STATIC_ZLIB_PATH:=/lib/$(TEMP) |
|
440 |
else |
|
441 |
TEMP:=$(shell ls /usr/lib 2>/dev/null | grep "zlib.a")$(shell ls /usr/lib 2>/dev/null | grep "libz.a") |
|
442 |
ifdef TEMP |
|
443 |
STATIC_ZLIB_PATH:=/usr/lib/$(TEMP) |
|
444 |
else |
|
445 |
TEMP:=$(shell ls /usr/local/lib 2>/dev/null | grep "zlib.a")$(shell ls /usr/local/lib 2>/dev/null | grep "libz.a") |
|
446 |
ifdef TEMP |
|
447 |
STATIC_ZLIB_PATH:=/usr/local/lib/$(TEMP) |
|
448 |
endif |
|
449 |
endif |
|
450 |
endif |
|
451 |
endif |
|
452 |
LIBS += $(STATIC_ZLIB_PATH) |
|
453 |
endif |
|
454 |
else |
|
455 |
LIBS += -lz |
|
456 |
endif |
|
457 |
endif |
|
458 |
||
459 |
# libpng config |
|
460 |
ifdef WITH_PNG |
|
461 |
CDEFS += -DWITH_PNG |
|
2315
a6dc17991fa5
(svn r2841) Pimp the Makefile: Determining the header dependencies is now a separate step.
tron
parents:
2302
diff
changeset
|
462 |
CFLAGS += $(shell $(LIBPNG-CONFIG) --cppflags --I_opts) |
551
48dc69ef0e94
(svn r951) Makefile: fixed missing flag for libpng, which prevented lib detection if SDL was not used
bjarni
parents:
549
diff
changeset
|
463 |
|
0 | 464 |
# seems like older libpng versions are broken and need this |
465 |
PNGCONFIG_FLAGS = --ldflags --libs |
|
466 |
ifdef STATIC |
|
583
3bcdf7a0c2f7
(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
|
467 |
ifdef OSX |
3bcdf7a0c2f7
(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
|
468 |
# Seems like we need a tiny hack for OSX static to work |
1955
52a84e880864
(svn r2461) -Feature [Makefile] libpng-config can now be called something else in Makefile.config
bjarni
parents:
1952
diff
changeset
|
469 |
LIBS += $(shell $(LIBPNG-CONFIG) --prefix)/lib/libpng.a |
583
3bcdf7a0c2f7
(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
|
470 |
else |
1955
52a84e880864
(svn r2461) -Feature [Makefile] libpng-config can now be called something else in Makefile.config
bjarni
parents:
1952
diff
changeset
|
471 |
LIBS += $(shell $(LIBPNG-CONFIG) --static $(PNGCONFIG_FLAGS)) |
583
3bcdf7a0c2f7
(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
|
472 |
endif |
0 | 473 |
else |
1955
52a84e880864
(svn r2461) -Feature [Makefile] libpng-config can now be called something else in Makefile.config
bjarni
parents:
1952
diff
changeset
|
474 |
LIBS += $(shell $(LIBPNG-CONFIG) --L_opts $(PNGCONFIG_FLAGS)) |
0 | 475 |
endif |
476 |
endif |
|
477 |
||
347
892935295937
(svn r530) Makefile: added ability to switch asserts on and off
bjarni
parents:
285
diff
changeset
|
478 |
# enables/disables assert() |
348
959f425dc282
(svn r531) Makefile: made asserts enabled by default
bjarni
parents:
347
diff
changeset
|
479 |
ifdef DISABLE_ASSERTS |
959f425dc282
(svn r531) Makefile: made asserts enabled by default
bjarni
parents:
347
diff
changeset
|
480 |
CFLAGS += -DNDEBUG |
959f425dc282
(svn r531) Makefile: made asserts enabled by default
bjarni
parents:
347
diff
changeset
|
481 |
endif |
959f425dc282
(svn r531) Makefile: made asserts enabled by default
bjarni
parents:
347
diff
changeset
|
482 |
|
959f425dc282
(svn r531) Makefile: made asserts enabled by default
bjarni
parents:
347
diff
changeset
|
483 |
# automatically disables asserts for release |
959f425dc282
(svn r531) Makefile: made asserts enabled by default
bjarni
parents:
347
diff
changeset
|
484 |
ifdef RELEASE |
347
892935295937
(svn r530) Makefile: added ability to switch asserts on and off
bjarni
parents:
285
diff
changeset
|
485 |
ifndef ENABLE_ASSERTS |
892935295937
(svn r530) Makefile: added ability to switch asserts on and off
bjarni
parents:
285
diff
changeset
|
486 |
CFLAGS += -DNDEBUG |
892935295937
(svn r530) Makefile: added ability to switch asserts on and off
bjarni
parents:
285
diff
changeset
|
487 |
endif |
348
959f425dc282
(svn r531) Makefile: made asserts enabled by default
bjarni
parents:
347
diff
changeset
|
488 |
endif |
0 | 489 |
|
490 |
ifdef TRANSLATOR |
|
491 |
STRGEN_FLAGS=-t |
|
492 |
else |
|
493 |
STRGEN_FLAGS= |
|
494 |
endif |
|
495 |
||
2555
58ed3afaf3ab
(svn r3088) -Fix: [OSX] fixed issue where OSX could not dynamic link to quicktime [ 1334917 ]
bjarni
parents:
2505
diff
changeset
|
496 |
# OSX specific setup |
0 | 497 |
ifdef OSX |
2719
146eaa0ec83c
(svn r3264) -Codechange: [OSX] OSX targets will now always use the preprocessor to determine endianess
bjarni
parents:
2717
diff
changeset
|
498 |
# set the endian flag for OSX, that can't fail |
146eaa0ec83c
(svn r3264) -Codechange: [OSX] OSX targets will now always use the preprocessor to determine endianess
bjarni
parents:
2717
diff
changeset
|
499 |
ENDIAN_FORCE:=PREPROCESSOR |
146eaa0ec83c
(svn r3264) -Codechange: [OSX] OSX targets will now always use the preprocessor to determine endianess
bjarni
parents:
2717
diff
changeset
|
500 |
|
2555
58ed3afaf3ab
(svn r3088) -Fix: [OSX] fixed issue where OSX could not dynamic link to quicktime [ 1334917 ]
bjarni
parents:
2505
diff
changeset
|
501 |
ifndef DEDICATED |
58ed3afaf3ab
(svn r3088) -Fix: [OSX] fixed issue where OSX could not dynamic link to quicktime [ 1334917 ]
bjarni
parents:
2505
diff
changeset
|
502 |
LIBS += -framework QuickTime |
58ed3afaf3ab
(svn r3088) -Fix: [OSX] fixed issue where OSX could not dynamic link to quicktime [ 1334917 ]
bjarni
parents:
2505
diff
changeset
|
503 |
endif |
58ed3afaf3ab
(svn r3088) -Fix: [OSX] fixed issue where OSX could not dynamic link to quicktime [ 1334917 ]
bjarni
parents:
2505
diff
changeset
|
504 |
|
2736
1ea068235989
(svn r3281) -Feature: [OSX] added native cocoa sound and video drivers (egladil)
bjarni
parents:
2735
diff
changeset
|
505 |
ifdef WITH_COCOA |
1ea068235989
(svn r3281) -Feature: [OSX] added native cocoa sound and video drivers (egladil)
bjarni
parents:
2735
diff
changeset
|
506 |
CDEFS += -DWITH_COCOA |
1ea068235989
(svn r3281) -Feature: [OSX] added native cocoa sound and video drivers (egladil)
bjarni
parents:
2735
diff
changeset
|
507 |
LIBS += -F/System/Library/Frameworks -framework Cocoa -framework Carbon -framework AudioUnit |
1ea068235989
(svn r3281) -Feature: [OSX] added native cocoa sound and video drivers (egladil)
bjarni
parents:
2735
diff
changeset
|
508 |
endif |
1ea068235989
(svn r3281) -Feature: [OSX] added native cocoa sound and video drivers (egladil)
bjarni
parents:
2735
diff
changeset
|
509 |
|
2555
58ed3afaf3ab
(svn r3088) -Fix: [OSX] fixed issue where OSX could not dynamic link to quicktime [ 1334917 ]
bjarni
parents:
2505
diff
changeset
|
510 |
# OSX path setup |
58ed3afaf3ab
(svn r3088) -Fix: [OSX] fixed issue where OSX could not dynamic link to quicktime [ 1334917 ]
bjarni
parents:
2505
diff
changeset
|
511 |
ifndef SECOND_DATA_PATH |
58ed3afaf3ab
(svn r3088) -Fix: [OSX] fixed issue where OSX could not dynamic link to quicktime [ 1334917 ]
bjarni
parents:
2505
diff
changeset
|
512 |
SECOND_DATA_PATH:="$(OSXAPP)/Contents/Data/" |
58ed3afaf3ab
(svn r3088) -Fix: [OSX] fixed issue where OSX could not dynamic link to quicktime [ 1334917 ]
bjarni
parents:
2505
diff
changeset
|
513 |
endif |
58ed3afaf3ab
(svn r3088) -Fix: [OSX] fixed issue where OSX could not dynamic link to quicktime [ 1334917 ]
bjarni
parents:
2505
diff
changeset
|
514 |
|
58ed3afaf3ab
(svn r3088) -Fix: [OSX] fixed issue where OSX could not dynamic link to quicktime [ 1334917 ]
bjarni
parents:
2505
diff
changeset
|
515 |
ifndef CUSTOM_LANG_DIR |
58ed3afaf3ab
(svn r3088) -Fix: [OSX] fixed issue where OSX could not dynamic link to quicktime [ 1334917 ]
bjarni
parents:
2505
diff
changeset
|
516 |
ifndef DEDICATED |
58ed3afaf3ab
(svn r3088) -Fix: [OSX] fixed issue where OSX could not dynamic link to quicktime [ 1334917 ]
bjarni
parents:
2505
diff
changeset
|
517 |
CUSTOM_LANG_DIR:="$(OSXAPP)/Contents/Lang/" |
58ed3afaf3ab
(svn r3088) -Fix: [OSX] fixed issue where OSX could not dynamic link to quicktime [ 1334917 ]
bjarni
parents:
2505
diff
changeset
|
518 |
endif |
58ed3afaf3ab
(svn r3088) -Fix: [OSX] fixed issue where OSX could not dynamic link to quicktime [ 1334917 ]
bjarni
parents:
2505
diff
changeset
|
519 |
endif |
2500
e2b13f720a94
(svn r3026) -Fix: [OSX] fixed bug that prevented dedicated servers from compiling (introduced in r3022)
bjarni
parents:
2497
diff
changeset
|
520 |
endif |
0 | 521 |
|
522 |
ifdef MIDI |
|
523 |
CDEFS += -DEXTERNAL_PLAYER=\"$(MIDI)\" |
|
524 |
ifdef MIDI_ARG |
|
525 |
CDEFS += -DMIDI_ARG=\"$(MIDI_ARG)\" |
|
526 |
endif |
|
527 |
endif |
|
528 |
||
2672
ea469d7b34ff
(svn r3214) -Feature: openttd.cfg can now set how many autosaves to keep before starting to overwrite old ones
bjarni
parents:
2625
diff
changeset
|
529 |
ifdef MAX_NUM_AUTOSAVES |
ea469d7b34ff
(svn r3214) -Feature: openttd.cfg can now set how many autosaves to keep before starting to overwrite old ones
bjarni
parents:
2625
diff
changeset
|
530 |
CDEFS += -DMAX_NUM_AUTOSAVES=$(MAX_NUM_AUTOSAVES) |
ea469d7b34ff
(svn r3214) -Feature: openttd.cfg can now set how many autosaves to keep before starting to overwrite old ones
bjarni
parents:
2625
diff
changeset
|
531 |
endif |
ea469d7b34ff
(svn r3214) -Feature: openttd.cfg can now set how many autosaves to keep before starting to overwrite old ones
bjarni
parents:
2625
diff
changeset
|
532 |
|
0 | 533 |
ifdef WITH_NETWORK |
534 |
CDEFS += -DENABLE_NETWORK |
|
543
e3b43338096b
(svn r942) -Merged branch/network back into the trunk
truelight
parents:
532
diff
changeset
|
535 |
ifdef QNX |
e3b43338096b
(svn r942) -Merged branch/network back into the trunk
truelight
parents:
532
diff
changeset
|
536 |
LIBS += -lsocket |
e3b43338096b
(svn r942) -Merged branch/network back into the trunk
truelight
parents:
532
diff
changeset
|
537 |
endif |
0 | 538 |
endif |
539 |
||
561
e3b9689745ab
(svn r970) Added 2nd data path for all non-windows OSes
bjarni
parents:
551
diff
changeset
|
540 |
|
e3b9689745ab
(svn r970) Added 2nd data path for all non-windows OSes
bjarni
parents:
551
diff
changeset
|
541 |
ifdef SECOND_DATA_PATH |
e3b9689745ab
(svn r970) Added 2nd data path for all non-windows OSes
bjarni
parents:
551
diff
changeset
|
542 |
CDEFS += -DSECOND_DATA_DIR=\"$(SECOND_DATA_PATH)/\" |
e3b9689745ab
(svn r970) Added 2nd data path for all non-windows OSes
bjarni
parents:
551
diff
changeset
|
543 |
endif |
e3b9689745ab
(svn r970) Added 2nd data path for all non-windows OSes
bjarni
parents:
551
diff
changeset
|
544 |
|
e3b9689745ab
(svn r970) Added 2nd data path for all non-windows OSes
bjarni
parents:
551
diff
changeset
|
545 |
ifdef CUSTOM_LANG_DIR |
e3b9689745ab
(svn r970) Added 2nd data path for all non-windows OSes
bjarni
parents:
551
diff
changeset
|
546 |
CDEFS += -DCUSTOM_LANG_DIR=\"$(CUSTOM_LANG_DIR)/\" |
e3b9689745ab
(svn r970) Added 2nd data path for all non-windows OSes
bjarni
parents:
551
diff
changeset
|
547 |
endif |
e3b9689745ab
(svn r970) Added 2nd data path for all non-windows OSes
bjarni
parents:
551
diff
changeset
|
548 |
|
0 | 549 |
ifdef WITH_DIRECTMUSIC |
550 |
CDEFS += -DWIN32_ENABLE_DIRECTMUSIC_SUPPORT |
|
551 |
endif |
|
552 |
||
553 |
ifdef WIN32 |
|
1692
2587eee1c632
(svn r2196) -Change: updated the Makefile, now it works for crossplatform compiling
TrueLight
parents:
1629
diff
changeset
|
554 |
LIBS += -lws2_32 -lwinmm -lgdi32 -ldxguid -lole32 |
2587eee1c632
(svn r2196) -Change: updated the Makefile, now it works for crossplatform compiling
TrueLight
parents:
1629
diff
changeset
|
555 |
ifdef WITH_DIRECTMUSIC |
2587eee1c632
(svn r2196) -Change: updated the Makefile, now it works for crossplatform compiling
TrueLight
parents:
1629
diff
changeset
|
556 |
LIBS += -lstdc++ |
2587eee1c632
(svn r2196) -Change: updated the Makefile, now it works for crossplatform compiling
TrueLight
parents:
1629
diff
changeset
|
557 |
endif |
0 | 558 |
TTDLDFLAGS += -Wl,--subsystem,windows |
559 |
endif |
|
560 |
||
1476
abbcea18a01c
(svn r1980) Check $DESTDIR if $DEST_DIR was not set.
pasky
parents:
1435
diff
changeset
|
561 |
ifndef DEST_DIR |
abbcea18a01c
(svn r1980) Check $DESTDIR if $DEST_DIR was not set.
pasky
parents:
1435
diff
changeset
|
562 |
DEST_DIR = $(DESTDIR) |
abbcea18a01c
(svn r1980) Check $DESTDIR if $DEST_DIR was not set.
pasky
parents:
1435
diff
changeset
|
563 |
endif |
abbcea18a01c
(svn r1980) Check $DESTDIR if $DEST_DIR was not set.
pasky
parents:
1435
diff
changeset
|
564 |
|
0 | 565 |
# sets up the paths for use for make install |
285 | 566 |
ifdef INSTALL |
567 |
# We use _PREFIXED vars here, so the paths are recalculated every time, and |
|
568 |
# the prefix is not prepended in the makefile config |
|
569 |
BINARY_DIR_PREFIXED:=$(PREFIX)/$(BINARY_DIR) |
|
570 |
DATA_DIR_PREFIXED:=$(PREFIX)/$(DATA_DIR) |
|
2901
6adc1bdca953
(svn r3456) - Feature: [Makefile] Icons can now be installed in a seperate directory.
matthijs
parents:
2835
diff
changeset
|
571 |
ICON_DIR_PREFIXED:=$(PREFIX)/$(ICON_DIR) |
285 | 572 |
# We use _INSTALL vars here, these vars are the locations where the files will |
573 |
# be installed |
|
574 |
DATA_DIR_INSTALL=$(DEST_DIR)/$(DATA_DIR_PREFIXED) |
|
575 |
BINARY_DIR_INSTALL=$(DEST_DIR)/$(BINARY_DIR_PREFIXED) |
|
2901
6adc1bdca953
(svn r3456) - Feature: [Makefile] Icons can now be installed in a seperate directory.
matthijs
parents:
2835
diff
changeset
|
576 |
ICON_DIR_INSTALL=$(DEST_DIR)/$(ICON_DIR_PREFIXED) |
285 | 577 |
# Let the code know where to find stuff |
578 |
ifdef DATA_DIR_PREFIXED |
|
579 |
CDEFS += -DGAME_DATA_DIR=\"$(DATA_DIR_PREFIXED)/\" |
|
0 | 580 |
endif |
285 | 581 |
|
582 |
ifdef PERSONAL_DIR |
|
583 |
CDEFS += -DPERSONAL_DIR=\"$(PERSONAL_DIR)/\" |
|
584 |
endif |
|
585 |
||
586 |
ifdef USE_HOMEDIR |
|
587 |
CDEFS += -DUSE_HOMEDIR |
|
588 |
endif |
|
0 | 589 |
endif |
590 |
||
591 |
############################################################################## |
|
592 |
# |
|
593 |
# What to compile |
|
594 |
# (users do not want to modify anything below) |
|
595 |
# |
|
596 |
||
597 |
||
598 |
### Sources |
|
599 |
||
2713
9f06e1f94ce9
(svn r3258) -Feature: [OSX] added support for universal binaries
bjarni
parents:
2712
diff
changeset
|
600 |
# clean up C_SOURCES first. Needed since building universal binaries on OSX calls the makefile recursively (just one time) |
2735
6f1b148a676b
(svn r3280) Merge the seperate (C|CXX|OBJC)_SOURCES variables into a single variable SRCS
tron
parents:
2731
diff
changeset
|
601 |
SRCS := |
2713
9f06e1f94ce9
(svn r3258) -Feature: [OSX] added support for universal binaries
bjarni
parents:
2712
diff
changeset
|
602 |
|
2735
6f1b148a676b
(svn r3280) Merge the seperate (C|CXX|OBJC)_SOURCES variables into a single variable SRCS
tron
parents:
2731
diff
changeset
|
603 |
SRCS += aircraft_cmd.c |
6f1b148a676b
(svn r3280) Merge the seperate (C|CXX|OBJC)_SOURCES variables into a single variable SRCS
tron
parents:
2731
diff
changeset
|
604 |
SRCS += aircraft_gui.c |
6f1b148a676b
(svn r3280) Merge the seperate (C|CXX|OBJC)_SOURCES variables into a single variable SRCS
tron
parents:
2731
diff
changeset
|
605 |
SRCS += airport.c |
6f1b148a676b
(svn r3280) Merge the seperate (C|CXX|OBJC)_SOURCES variables into a single variable SRCS
tron
parents:
2731
diff
changeset
|
606 |
SRCS += airport_gui.c |
6f1b148a676b
(svn r3280) Merge the seperate (C|CXX|OBJC)_SOURCES variables into a single variable SRCS
tron
parents:
2731
diff
changeset
|
607 |
SRCS += aystar.c |
6f1b148a676b
(svn r3280) Merge the seperate (C|CXX|OBJC)_SOURCES variables into a single variable SRCS
tron
parents:
2731
diff
changeset
|
608 |
SRCS += bridge_gui.c |
6f1b148a676b
(svn r3280) Merge the seperate (C|CXX|OBJC)_SOURCES variables into a single variable SRCS
tron
parents:
2731
diff
changeset
|
609 |
SRCS += callback_table.c |
6f1b148a676b
(svn r3280) Merge the seperate (C|CXX|OBJC)_SOURCES variables into a single variable SRCS
tron
parents:
2731
diff
changeset
|
610 |
SRCS += clear_cmd.c |
6f1b148a676b
(svn r3280) Merge the seperate (C|CXX|OBJC)_SOURCES variables into a single variable SRCS
tron
parents:
2731
diff
changeset
|
611 |
SRCS += command.c |
6f1b148a676b
(svn r3280) Merge the seperate (C|CXX|OBJC)_SOURCES variables into a single variable SRCS
tron
parents:
2731
diff
changeset
|
612 |
SRCS += console.c |
6f1b148a676b
(svn r3280) Merge the seperate (C|CXX|OBJC)_SOURCES variables into a single variable SRCS
tron
parents:
2731
diff
changeset
|
613 |
SRCS += console_cmds.c |
6f1b148a676b
(svn r3280) Merge the seperate (C|CXX|OBJC)_SOURCES variables into a single variable SRCS
tron
parents:
2731
diff
changeset
|
614 |
SRCS += currency.c |
6f1b148a676b
(svn r3280) Merge the seperate (C|CXX|OBJC)_SOURCES variables into a single variable SRCS
tron
parents:
2731
diff
changeset
|
615 |
SRCS += debug.c |
6f1b148a676b
(svn r3280) Merge the seperate (C|CXX|OBJC)_SOURCES variables into a single variable SRCS
tron
parents:
2731
diff
changeset
|
616 |
SRCS += dedicated.c |
6f1b148a676b
(svn r3280) Merge the seperate (C|CXX|OBJC)_SOURCES variables into a single variable SRCS
tron
parents:
2731
diff
changeset
|
617 |
SRCS += depot.c |
6f1b148a676b
(svn r3280) Merge the seperate (C|CXX|OBJC)_SOURCES variables into a single variable SRCS
tron
parents:
2731
diff
changeset
|
618 |
SRCS += disaster_cmd.c |
6f1b148a676b
(svn r3280) Merge the seperate (C|CXX|OBJC)_SOURCES variables into a single variable SRCS
tron
parents:
2731
diff
changeset
|
619 |
SRCS += dock_gui.c |
6f1b148a676b
(svn r3280) Merge the seperate (C|CXX|OBJC)_SOURCES variables into a single variable SRCS
tron
parents:
2731
diff
changeset
|
620 |
SRCS += driver.c |
6f1b148a676b
(svn r3280) Merge the seperate (C|CXX|OBJC)_SOURCES variables into a single variable SRCS
tron
parents:
2731
diff
changeset
|
621 |
SRCS += dummy_land.c |
6f1b148a676b
(svn r3280) Merge the seperate (C|CXX|OBJC)_SOURCES variables into a single variable SRCS
tron
parents:
2731
diff
changeset
|
622 |
SRCS += economy.c |
6f1b148a676b
(svn r3280) Merge the seperate (C|CXX|OBJC)_SOURCES variables into a single variable SRCS
tron
parents:
2731
diff
changeset
|
623 |
SRCS += engine.c |
6f1b148a676b
(svn r3280) Merge the seperate (C|CXX|OBJC)_SOURCES variables into a single variable SRCS
tron
parents:
2731
diff
changeset
|
624 |
SRCS += engine_gui.c |
6f1b148a676b
(svn r3280) Merge the seperate (C|CXX|OBJC)_SOURCES variables into a single variable SRCS
tron
parents:
2731
diff
changeset
|
625 |
SRCS += fileio.c |
6f1b148a676b
(svn r3280) Merge the seperate (C|CXX|OBJC)_SOURCES variables into a single variable SRCS
tron
parents:
2731
diff
changeset
|
626 |
SRCS += gfx.c |
6f1b148a676b
(svn r3280) Merge the seperate (C|CXX|OBJC)_SOURCES variables into a single variable SRCS
tron
parents:
2731
diff
changeset
|
627 |
SRCS += gfxinit.c |
6f1b148a676b
(svn r3280) Merge the seperate (C|CXX|OBJC)_SOURCES variables into a single variable SRCS
tron
parents:
2731
diff
changeset
|
628 |
SRCS += graph_gui.c |
6f1b148a676b
(svn r3280) Merge the seperate (C|CXX|OBJC)_SOURCES variables into a single variable SRCS
tron
parents:
2731
diff
changeset
|
629 |
SRCS += industry_cmd.c |
6f1b148a676b
(svn r3280) Merge the seperate (C|CXX|OBJC)_SOURCES variables into a single variable SRCS
tron
parents:
2731
diff
changeset
|
630 |
SRCS += industry_gui.c |
6f1b148a676b
(svn r3280) Merge the seperate (C|CXX|OBJC)_SOURCES variables into a single variable SRCS
tron
parents:
2731
diff
changeset
|
631 |
SRCS += intro_gui.c |
6f1b148a676b
(svn r3280) Merge the seperate (C|CXX|OBJC)_SOURCES variables into a single variable SRCS
tron
parents:
2731
diff
changeset
|
632 |
SRCS += landscape.c |
6f1b148a676b
(svn r3280) Merge the seperate (C|CXX|OBJC)_SOURCES variables into a single variable SRCS
tron
parents:
2731
diff
changeset
|
633 |
SRCS += main_gui.c |
6f1b148a676b
(svn r3280) Merge the seperate (C|CXX|OBJC)_SOURCES variables into a single variable SRCS
tron
parents:
2731
diff
changeset
|
634 |
SRCS += map.c |
6f1b148a676b
(svn r3280) Merge the seperate (C|CXX|OBJC)_SOURCES variables into a single variable SRCS
tron
parents:
2731
diff
changeset
|
635 |
SRCS += md5.c |
6f1b148a676b
(svn r3280) Merge the seperate (C|CXX|OBJC)_SOURCES variables into a single variable SRCS
tron
parents:
2731
diff
changeset
|
636 |
SRCS += mersenne.c |
6f1b148a676b
(svn r3280) Merge the seperate (C|CXX|OBJC)_SOURCES variables into a single variable SRCS
tron
parents:
2731
diff
changeset
|
637 |
SRCS += minilzo.c |
6f1b148a676b
(svn r3280) Merge the seperate (C|CXX|OBJC)_SOURCES variables into a single variable SRCS
tron
parents:
2731
diff
changeset
|
638 |
SRCS += misc.c |
6f1b148a676b
(svn r3280) Merge the seperate (C|CXX|OBJC)_SOURCES variables into a single variable SRCS
tron
parents:
2731
diff
changeset
|
639 |
SRCS += misc_cmd.c |
6f1b148a676b
(svn r3280) Merge the seperate (C|CXX|OBJC)_SOURCES variables into a single variable SRCS
tron
parents:
2731
diff
changeset
|
640 |
SRCS += misc_gui.c |
6f1b148a676b
(svn r3280) Merge the seperate (C|CXX|OBJC)_SOURCES variables into a single variable SRCS
tron
parents:
2731
diff
changeset
|
641 |
SRCS += mixer.c |
6f1b148a676b
(svn r3280) Merge the seperate (C|CXX|OBJC)_SOURCES variables into a single variable SRCS
tron
parents:
2731
diff
changeset
|
642 |
SRCS += music_gui.c |
6f1b148a676b
(svn r3280) Merge the seperate (C|CXX|OBJC)_SOURCES variables into a single variable SRCS
tron
parents:
2731
diff
changeset
|
643 |
SRCS += namegen.c |
6f1b148a676b
(svn r3280) Merge the seperate (C|CXX|OBJC)_SOURCES variables into a single variable SRCS
tron
parents:
2731
diff
changeset
|
644 |
SRCS += network.c |
6f1b148a676b
(svn r3280) Merge the seperate (C|CXX|OBJC)_SOURCES variables into a single variable SRCS
tron
parents:
2731
diff
changeset
|
645 |
SRCS += network_client.c |
6f1b148a676b
(svn r3280) Merge the seperate (C|CXX|OBJC)_SOURCES variables into a single variable SRCS
tron
parents:
2731
diff
changeset
|
646 |
SRCS += network_data.c |
6f1b148a676b
(svn r3280) Merge the seperate (C|CXX|OBJC)_SOURCES variables into a single variable SRCS
tron
parents:
2731
diff
changeset
|
647 |
SRCS += network_gamelist.c |
6f1b148a676b
(svn r3280) Merge the seperate (C|CXX|OBJC)_SOURCES variables into a single variable SRCS
tron
parents:
2731
diff
changeset
|
648 |
SRCS += network_gui.c |
6f1b148a676b
(svn r3280) Merge the seperate (C|CXX|OBJC)_SOURCES variables into a single variable SRCS
tron
parents:
2731
diff
changeset
|
649 |
SRCS += network_server.c |
6f1b148a676b
(svn r3280) Merge the seperate (C|CXX|OBJC)_SOURCES variables into a single variable SRCS
tron
parents:
2731
diff
changeset
|
650 |
SRCS += network_udp.c |
6f1b148a676b
(svn r3280) Merge the seperate (C|CXX|OBJC)_SOURCES variables into a single variable SRCS
tron
parents:
2731
diff
changeset
|
651 |
SRCS += newgrf.c |
6f1b148a676b
(svn r3280) Merge the seperate (C|CXX|OBJC)_SOURCES variables into a single variable SRCS
tron
parents:
2731
diff
changeset
|
652 |
SRCS += news_gui.c |
6f1b148a676b
(svn r3280) Merge the seperate (C|CXX|OBJC)_SOURCES variables into a single variable SRCS
tron
parents:
2731
diff
changeset
|
653 |
SRCS += npf.c |
6f1b148a676b
(svn r3280) Merge the seperate (C|CXX|OBJC)_SOURCES variables into a single variable SRCS
tron
parents:
2731
diff
changeset
|
654 |
SRCS += oldloader.c |
6f1b148a676b
(svn r3280) Merge the seperate (C|CXX|OBJC)_SOURCES variables into a single variable SRCS
tron
parents:
2731
diff
changeset
|
655 |
SRCS += openttd.c |
6f1b148a676b
(svn r3280) Merge the seperate (C|CXX|OBJC)_SOURCES variables into a single variable SRCS
tron
parents:
2731
diff
changeset
|
656 |
SRCS += order_cmd.c |
6f1b148a676b
(svn r3280) Merge the seperate (C|CXX|OBJC)_SOURCES variables into a single variable SRCS
tron
parents:
2731
diff
changeset
|
657 |
SRCS += order_gui.c |
6f1b148a676b
(svn r3280) Merge the seperate (C|CXX|OBJC)_SOURCES variables into a single variable SRCS
tron
parents:
2731
diff
changeset
|
658 |
SRCS += pathfind.c |
6f1b148a676b
(svn r3280) Merge the seperate (C|CXX|OBJC)_SOURCES variables into a single variable SRCS
tron
parents:
2731
diff
changeset
|
659 |
SRCS += player_gui.c |
6f1b148a676b
(svn r3280) Merge the seperate (C|CXX|OBJC)_SOURCES variables into a single variable SRCS
tron
parents:
2731
diff
changeset
|
660 |
SRCS += players.c |
6f1b148a676b
(svn r3280) Merge the seperate (C|CXX|OBJC)_SOURCES variables into a single variable SRCS
tron
parents:
2731
diff
changeset
|
661 |
SRCS += pool.c |
6f1b148a676b
(svn r3280) Merge the seperate (C|CXX|OBJC)_SOURCES variables into a single variable SRCS
tron
parents:
2731
diff
changeset
|
662 |
SRCS += queue.c |
6f1b148a676b
(svn r3280) Merge the seperate (C|CXX|OBJC)_SOURCES variables into a single variable SRCS
tron
parents:
2731
diff
changeset
|
663 |
SRCS += rail.c |
6f1b148a676b
(svn r3280) Merge the seperate (C|CXX|OBJC)_SOURCES variables into a single variable SRCS
tron
parents:
2731
diff
changeset
|
664 |
SRCS += rail_cmd.c |
6f1b148a676b
(svn r3280) Merge the seperate (C|CXX|OBJC)_SOURCES variables into a single variable SRCS
tron
parents:
2731
diff
changeset
|
665 |
SRCS += rail_gui.c |
6f1b148a676b
(svn r3280) Merge the seperate (C|CXX|OBJC)_SOURCES variables into a single variable SRCS
tron
parents:
2731
diff
changeset
|
666 |
SRCS += rev.c |
6f1b148a676b
(svn r3280) Merge the seperate (C|CXX|OBJC)_SOURCES variables into a single variable SRCS
tron
parents:
2731
diff
changeset
|
667 |
SRCS += road_cmd.c |
6f1b148a676b
(svn r3280) Merge the seperate (C|CXX|OBJC)_SOURCES variables into a single variable SRCS
tron
parents:
2731
diff
changeset
|
668 |
SRCS += road_gui.c |
6f1b148a676b
(svn r3280) Merge the seperate (C|CXX|OBJC)_SOURCES variables into a single variable SRCS
tron
parents:
2731
diff
changeset
|
669 |
SRCS += roadveh_cmd.c |
6f1b148a676b
(svn r3280) Merge the seperate (C|CXX|OBJC)_SOURCES variables into a single variable SRCS
tron
parents:
2731
diff
changeset
|
670 |
SRCS += roadveh_gui.c |
6f1b148a676b
(svn r3280) Merge the seperate (C|CXX|OBJC)_SOURCES variables into a single variable SRCS
tron
parents:
2731
diff
changeset
|
671 |
SRCS += saveload.c |
6f1b148a676b
(svn r3280) Merge the seperate (C|CXX|OBJC)_SOURCES variables into a single variable SRCS
tron
parents:
2731
diff
changeset
|
672 |
SRCS += screenshot.c |
6f1b148a676b
(svn r3280) Merge the seperate (C|CXX|OBJC)_SOURCES variables into a single variable SRCS
tron
parents:
2731
diff
changeset
|
673 |
SRCS += settings.c |
6f1b148a676b
(svn r3280) Merge the seperate (C|CXX|OBJC)_SOURCES variables into a single variable SRCS
tron
parents:
2731
diff
changeset
|
674 |
SRCS += settings_gui.c |
6f1b148a676b
(svn r3280) Merge the seperate (C|CXX|OBJC)_SOURCES variables into a single variable SRCS
tron
parents:
2731
diff
changeset
|
675 |
SRCS += ship_cmd.c |
6f1b148a676b
(svn r3280) Merge the seperate (C|CXX|OBJC)_SOURCES variables into a single variable SRCS
tron
parents:
2731
diff
changeset
|
676 |
SRCS += ship_gui.c |
6f1b148a676b
(svn r3280) Merge the seperate (C|CXX|OBJC)_SOURCES variables into a single variable SRCS
tron
parents:
2731
diff
changeset
|
677 |
SRCS += signs.c |
6f1b148a676b
(svn r3280) Merge the seperate (C|CXX|OBJC)_SOURCES variables into a single variable SRCS
tron
parents:
2731
diff
changeset
|
678 |
SRCS += smallmap_gui.c |
6f1b148a676b
(svn r3280) Merge the seperate (C|CXX|OBJC)_SOURCES variables into a single variable SRCS
tron
parents:
2731
diff
changeset
|
679 |
SRCS += sound.c |
6f1b148a676b
(svn r3280) Merge the seperate (C|CXX|OBJC)_SOURCES variables into a single variable SRCS
tron
parents:
2731
diff
changeset
|
680 |
SRCS += sprite.c |
6f1b148a676b
(svn r3280) Merge the seperate (C|CXX|OBJC)_SOURCES variables into a single variable SRCS
tron
parents:
2731
diff
changeset
|
681 |
SRCS += spritecache.c |
6f1b148a676b
(svn r3280) Merge the seperate (C|CXX|OBJC)_SOURCES variables into a single variable SRCS
tron
parents:
2731
diff
changeset
|
682 |
SRCS += station_cmd.c |
6f1b148a676b
(svn r3280) Merge the seperate (C|CXX|OBJC)_SOURCES variables into a single variable SRCS
tron
parents:
2731
diff
changeset
|
683 |
SRCS += station_gui.c |
6f1b148a676b
(svn r3280) Merge the seperate (C|CXX|OBJC)_SOURCES variables into a single variable SRCS
tron
parents:
2731
diff
changeset
|
684 |
SRCS += station_newgrf.c |
6f1b148a676b
(svn r3280) Merge the seperate (C|CXX|OBJC)_SOURCES variables into a single variable SRCS
tron
parents:
2731
diff
changeset
|
685 |
SRCS += string.c |
6f1b148a676b
(svn r3280) Merge the seperate (C|CXX|OBJC)_SOURCES variables into a single variable SRCS
tron
parents:
2731
diff
changeset
|
686 |
SRCS += strings.c |
6f1b148a676b
(svn r3280) Merge the seperate (C|CXX|OBJC)_SOURCES variables into a single variable SRCS
tron
parents:
2731
diff
changeset
|
687 |
SRCS += subsidy_gui.c |
6f1b148a676b
(svn r3280) Merge the seperate (C|CXX|OBJC)_SOURCES variables into a single variable SRCS
tron
parents:
2731
diff
changeset
|
688 |
SRCS += terraform_gui.c |
6f1b148a676b
(svn r3280) Merge the seperate (C|CXX|OBJC)_SOURCES variables into a single variable SRCS
tron
parents:
2731
diff
changeset
|
689 |
SRCS += texteff.c |
6f1b148a676b
(svn r3280) Merge the seperate (C|CXX|OBJC)_SOURCES variables into a single variable SRCS
tron
parents:
2731
diff
changeset
|
690 |
SRCS += thread.c |
6f1b148a676b
(svn r3280) Merge the seperate (C|CXX|OBJC)_SOURCES variables into a single variable SRCS
tron
parents:
2731
diff
changeset
|
691 |
SRCS += tile.c |
6f1b148a676b
(svn r3280) Merge the seperate (C|CXX|OBJC)_SOURCES variables into a single variable SRCS
tron
parents:
2731
diff
changeset
|
692 |
SRCS += town_cmd.c |
6f1b148a676b
(svn r3280) Merge the seperate (C|CXX|OBJC)_SOURCES variables into a single variable SRCS
tron
parents:
2731
diff
changeset
|
693 |
SRCS += town_gui.c |
6f1b148a676b
(svn r3280) Merge the seperate (C|CXX|OBJC)_SOURCES variables into a single variable SRCS
tron
parents:
2731
diff
changeset
|
694 |
SRCS += train_cmd.c |
6f1b148a676b
(svn r3280) Merge the seperate (C|CXX|OBJC)_SOURCES variables into a single variable SRCS
tron
parents:
2731
diff
changeset
|
695 |
SRCS += train_gui.c |
6f1b148a676b
(svn r3280) Merge the seperate (C|CXX|OBJC)_SOURCES variables into a single variable SRCS
tron
parents:
2731
diff
changeset
|
696 |
SRCS += tree_cmd.c |
6f1b148a676b
(svn r3280) Merge the seperate (C|CXX|OBJC)_SOURCES variables into a single variable SRCS
tron
parents:
2731
diff
changeset
|
697 |
SRCS += tunnelbridge_cmd.c |
6f1b148a676b
(svn r3280) Merge the seperate (C|CXX|OBJC)_SOURCES variables into a single variable SRCS
tron
parents:
2731
diff
changeset
|
698 |
SRCS += unmovable_cmd.c |
6f1b148a676b
(svn r3280) Merge the seperate (C|CXX|OBJC)_SOURCES variables into a single variable SRCS
tron
parents:
2731
diff
changeset
|
699 |
SRCS += vehicle.c |
6f1b148a676b
(svn r3280) Merge the seperate (C|CXX|OBJC)_SOURCES variables into a single variable SRCS
tron
parents:
2731
diff
changeset
|
700 |
SRCS += vehicle_gui.c |
6f1b148a676b
(svn r3280) Merge the seperate (C|CXX|OBJC)_SOURCES variables into a single variable SRCS
tron
parents:
2731
diff
changeset
|
701 |
SRCS += viewport.c |
6f1b148a676b
(svn r3280) Merge the seperate (C|CXX|OBJC)_SOURCES variables into a single variable SRCS
tron
parents:
2731
diff
changeset
|
702 |
SRCS += water_cmd.c |
6f1b148a676b
(svn r3280) Merge the seperate (C|CXX|OBJC)_SOURCES variables into a single variable SRCS
tron
parents:
2731
diff
changeset
|
703 |
SRCS += waypoint.c |
6f1b148a676b
(svn r3280) Merge the seperate (C|CXX|OBJC)_SOURCES variables into a single variable SRCS
tron
parents:
2731
diff
changeset
|
704 |
SRCS += widget.c |
6f1b148a676b
(svn r3280) Merge the seperate (C|CXX|OBJC)_SOURCES variables into a single variable SRCS
tron
parents:
2731
diff
changeset
|
705 |
SRCS += window.c |
6f1b148a676b
(svn r3280) Merge the seperate (C|CXX|OBJC)_SOURCES variables into a single variable SRCS
tron
parents:
2731
diff
changeset
|
706 |
SRCS += music/null_m.c |
6f1b148a676b
(svn r3280) Merge the seperate (C|CXX|OBJC)_SOURCES variables into a single variable SRCS
tron
parents:
2731
diff
changeset
|
707 |
SRCS += sound/null_s.c |
6f1b148a676b
(svn r3280) Merge the seperate (C|CXX|OBJC)_SOURCES variables into a single variable SRCS
tron
parents:
2731
diff
changeset
|
708 |
SRCS += video/dedicated_v.c |
6f1b148a676b
(svn r3280) Merge the seperate (C|CXX|OBJC)_SOURCES variables into a single variable SRCS
tron
parents:
2731
diff
changeset
|
709 |
SRCS += video/null_v.c |
677 | 710 |
|
2395
19b4da30806b
(svn r2921) -Codechange: moved all AI-code to 1 central place (ai/ai.c)
truelight
parents:
2381
diff
changeset
|
711 |
# AI related files |
2735
6f1b148a676b
(svn r3280) Merge the seperate (C|CXX|OBJC)_SOURCES variables into a single variable SRCS
tron
parents:
2731
diff
changeset
|
712 |
SRCS += ai/ai.c |
6f1b148a676b
(svn r3280) Merge the seperate (C|CXX|OBJC)_SOURCES variables into a single variable SRCS
tron
parents:
2731
diff
changeset
|
713 |
SRCS += ai/default/default.c |
6f1b148a676b
(svn r3280) Merge the seperate (C|CXX|OBJC)_SOURCES variables into a single variable SRCS
tron
parents:
2731
diff
changeset
|
714 |
SRCS += ai/trolly/build.c |
6f1b148a676b
(svn r3280) Merge the seperate (C|CXX|OBJC)_SOURCES variables into a single variable SRCS
tron
parents:
2731
diff
changeset
|
715 |
SRCS += ai/trolly/pathfinder.c |
6f1b148a676b
(svn r3280) Merge the seperate (C|CXX|OBJC)_SOURCES variables into a single variable SRCS
tron
parents:
2731
diff
changeset
|
716 |
SRCS += ai/trolly/shared.c |
6f1b148a676b
(svn r3280) Merge the seperate (C|CXX|OBJC)_SOURCES variables into a single variable SRCS
tron
parents:
2731
diff
changeset
|
717 |
SRCS += ai/trolly/trolly.c |
2188
9acde6fcc645
(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
|
718 |
|
1829
0b6de3b4458a
(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
|
719 |
ifdef WITH_SDL |
2735
6f1b148a676b
(svn r3280) Merge the seperate (C|CXX|OBJC)_SOURCES variables into a single variable SRCS
tron
parents:
2731
diff
changeset
|
720 |
SRCS += sdl.c |
6f1b148a676b
(svn r3280) Merge the seperate (C|CXX|OBJC)_SOURCES variables into a single variable SRCS
tron
parents:
2731
diff
changeset
|
721 |
SRCS += sound/sdl_s.c |
6f1b148a676b
(svn r3280) Merge the seperate (C|CXX|OBJC)_SOURCES variables into a single variable SRCS
tron
parents:
2731
diff
changeset
|
722 |
SRCS += video/sdl_v.c |
1829
0b6de3b4458a
(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
|
723 |
endif |
0b6de3b4458a
(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
|
724 |
|
0 | 725 |
ifdef WIN32 |
2735
6f1b148a676b
(svn r3280) Merge the seperate (C|CXX|OBJC)_SOURCES variables into a single variable SRCS
tron
parents:
2731
diff
changeset
|
726 |
SRCS += win32.c |
6f1b148a676b
(svn r3280) Merge the seperate (C|CXX|OBJC)_SOURCES variables into a single variable SRCS
tron
parents:
2731
diff
changeset
|
727 |
SRCS += music/win32_m.c |
6f1b148a676b
(svn r3280) Merge the seperate (C|CXX|OBJC)_SOURCES variables into a single variable SRCS
tron
parents:
2731
diff
changeset
|
728 |
SRCS += sound/win32_s.c |
6f1b148a676b
(svn r3280) Merge the seperate (C|CXX|OBJC)_SOURCES variables into a single variable SRCS
tron
parents:
2731
diff
changeset
|
729 |
SRCS += video/win32_v.c |
0 | 730 |
else |
2735
6f1b148a676b
(svn r3280) Merge the seperate (C|CXX|OBJC)_SOURCES variables into a single variable SRCS
tron
parents:
2731
diff
changeset
|
731 |
SRCS += unix.c |
6f1b148a676b
(svn r3280) Merge the seperate (C|CXX|OBJC)_SOURCES variables into a single variable SRCS
tron
parents:
2731
diff
changeset
|
732 |
SRCS += music/extmidi.c |
0 | 733 |
endif |
734 |
||
2188
9acde6fcc645
(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
|
735 |
ifdef OSX |
2736
1ea068235989
(svn r3281) -Feature: [OSX] added native cocoa sound and video drivers (egladil)
bjarni
parents:
2735
diff
changeset
|
736 |
SRCS += os/macosx/macos.m |
1ea068235989
(svn r3281) -Feature: [OSX] added native cocoa sound and video drivers (egladil)
bjarni
parents:
2735
diff
changeset
|
737 |
ifndef DEDICATED |
1ea068235989
(svn r3281) -Feature: [OSX] added native cocoa sound and video drivers (egladil)
bjarni
parents:
2735
diff
changeset
|
738 |
SRCS += music/qtmidi.c |
1ea068235989
(svn r3281) -Feature: [OSX] added native cocoa sound and video drivers (egladil)
bjarni
parents:
2735
diff
changeset
|
739 |
endif |
1ea068235989
(svn r3281) -Feature: [OSX] added native cocoa sound and video drivers (egladil)
bjarni
parents:
2735
diff
changeset
|
740 |
ifdef WITH_COCOA |
1ea068235989
(svn r3281) -Feature: [OSX] added native cocoa sound and video drivers (egladil)
bjarni
parents:
2735
diff
changeset
|
741 |
SRCS += video/cocoa_v.m |
1ea068235989
(svn r3281) -Feature: [OSX] added native cocoa sound and video drivers (egladil)
bjarni
parents:
2735
diff
changeset
|
742 |
SRCS += sound/cocoa_s.c |
1ea068235989
(svn r3281) -Feature: [OSX] added native cocoa sound and video drivers (egladil)
bjarni
parents:
2735
diff
changeset
|
743 |
SRCS += os/macosx/splash.c |
1ea068235989
(svn r3281) -Feature: [OSX] added native cocoa sound and video drivers (egladil)
bjarni
parents:
2735
diff
changeset
|
744 |
endif |
2500
e2b13f720a94
(svn r3026) -Fix: [OSX] fixed bug that prevented dedicated servers from compiling (introduced in r3022)
bjarni
parents:
2497
diff
changeset
|
745 |
endif |
2188
9acde6fcc645
(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
|
746 |
|
421
0b9bdcdfe0c5
(svn r619) Add the necessary bits to make building under BeOS using GNU Make work
tron
parents:
413
diff
changeset
|
747 |
ifdef BEOS |
2735
6f1b148a676b
(svn r3280) Merge the seperate (C|CXX|OBJC)_SOURCES variables into a single variable SRCS
tron
parents:
2731
diff
changeset
|
748 |
SRCS += music/bemidi.cpp |
421
0b9bdcdfe0c5
(svn r619) Add the necessary bits to make building under BeOS using GNU Make work
tron
parents:
413
diff
changeset
|
749 |
endif |
0 | 750 |
|
751 |
ifdef WIN32 |
|
2742
bfa51fe0dac5
(svn r3287) Turn the winres.o: openttd.rc special case into a normal %.o: %.rc rule
tron
parents:
2736
diff
changeset
|
752 |
SRCS += ottdres.rc |
0 | 753 |
endif |
754 |
||
755 |
ifdef WITH_DIRECTMUSIC |
|
2735
6f1b148a676b
(svn r3280) Merge the seperate (C|CXX|OBJC)_SOURCES variables into a single variable SRCS
tron
parents:
2731
diff
changeset
|
756 |
SRCS += music/dmusic.cpp |
0 | 757 |
endif |
758 |
||
2735
6f1b148a676b
(svn r3280) Merge the seperate (C|CXX|OBJC)_SOURCES variables into a single variable SRCS
tron
parents:
2731
diff
changeset
|
759 |
OBJS += $(filter %.o, $(SRCS:%.cpp=%.o) $(SRCS:%.m=%.o) $(SRCS:%.c=%.o) $(SRCS:%.rc=%.o)) |
1170
1cd3103acd66
(svn r1672) Simplify dependency tracking and actually implement it for C++ files, too.
tron
parents:
1169
diff
changeset
|
760 |
DEPS = $(OBJS:%.o=.deps/%.d) |
0 | 761 |
|
762 |
LANG_TXT = $(filter-out %.unfinished.txt,$(wildcard lang/*.txt)) |
|
763 |
LANGS = $(LANG_TXT:%.txt=%.lng) |
|
764 |
||
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
|
765 |
|
0 | 766 |
############################################################################## |
767 |
# |
|
1413
4a93d8682e11
(svn r1917) - Makefile: Revamped VERBOSE support, build mechanics changed.
pasky
parents:
1411
diff
changeset
|
768 |
# Build commands |
4a93d8682e11
(svn r1917) - Makefile: Revamped VERBOSE support, build mechanics changed.
pasky
parents:
1411
diff
changeset
|
769 |
# |
4a93d8682e11
(svn r1917) - Makefile: Revamped VERBOSE support, build mechanics changed.
pasky
parents:
1411
diff
changeset
|
770 |
|
2369
ede4483a0214
(svn r2895) Remove unused variables and bring a comment closer to reality
tron
parents:
2356
diff
changeset
|
771 |
# If we are verbose, we will show commands prefixed by $(Q). |
ede4483a0214
(svn r2895) Remove unused variables and bring a comment closer to reality
tron
parents:
2356
diff
changeset
|
772 |
# The $(Q)s get replaced by @ in non-verbose mode. |
1413
4a93d8682e11
(svn r1917) - Makefile: Revamped VERBOSE support, build mechanics changed.
pasky
parents:
1411
diff
changeset
|
773 |
# Inspired by the Linux kernel build system. |
4a93d8682e11
(svn r1917) - Makefile: Revamped VERBOSE support, build mechanics changed.
pasky
parents:
1411
diff
changeset
|
774 |
ifdef VERBOSE |
4a93d8682e11
(svn r1917) - Makefile: Revamped VERBOSE support, build mechanics changed.
pasky
parents:
1411
diff
changeset
|
775 |
Q = |
4a93d8682e11
(svn r1917) - Makefile: Revamped VERBOSE support, build mechanics changed.
pasky
parents:
1411
diff
changeset
|
776 |
else |
4a93d8682e11
(svn r1917) - Makefile: Revamped VERBOSE support, build mechanics changed.
pasky
parents:
1411
diff
changeset
|
777 |
Q = @ |
4a93d8682e11
(svn r1917) - Makefile: Revamped VERBOSE support, build mechanics changed.
pasky
parents:
1411
diff
changeset
|
778 |
endif |
4a93d8682e11
(svn r1917) - Makefile: Revamped VERBOSE support, build mechanics changed.
pasky
parents:
1411
diff
changeset
|
779 |
|
4a93d8682e11
(svn r1917) - Makefile: Revamped VERBOSE support, build mechanics changed.
pasky
parents:
1411
diff
changeset
|
780 |
|
4a93d8682e11
(svn r1917) - Makefile: Revamped VERBOSE support, build mechanics changed.
pasky
parents:
1411
diff
changeset
|
781 |
############################################################################## |
4a93d8682e11
(svn r1917) - Makefile: Revamped VERBOSE support, build mechanics changed.
pasky
parents:
1411
diff
changeset
|
782 |
# |
0 | 783 |
# Targets |
784 |
# |
|
785 |
||
786 |
||
787 |
### Normal build rules |
|
788 |
||
789 |
||
790 |
ifdef OSX |
|
2713
9f06e1f94ce9
(svn r3258) -Feature: [OSX] added support for universal binaries
bjarni
parents:
2712
diff
changeset
|
791 |
# needs to be before all |
0 | 792 |
OSX:=OSX |
793 |
endif |
|
794 |
||
795 |
||
2576
8f68e7d7d941
(svn r3113) -Fix: The Makefile had 64bit code which was obsolete, not to say wrong.
truelight
parents:
2555
diff
changeset
|
796 |
all: endian_target.h endian_host.h $(UPDATECONFIG) $(LANGS) $(TTD) $(OSX) |
0 | 797 |
|
2714
2b34ba290a5c
(svn r3259) -Fix: [OSX] fixed that universal binaries did not make a bundle
bjarni
parents:
2713
diff
changeset
|
798 |
ifdef OSX |
2b34ba290a5c
(svn r3259) -Fix: [OSX] fixed that universal binaries did not make a bundle
bjarni
parents:
2713
diff
changeset
|
799 |
-include os/macosx/Makefile |
2b34ba290a5c
(svn r3259) -Fix: [OSX] fixed that universal binaries did not make a bundle
bjarni
parents:
2713
diff
changeset
|
800 |
endif |
2b34ba290a5c
(svn r3259) -Fix: [OSX] fixed that universal binaries did not make a bundle
bjarni
parents:
2713
diff
changeset
|
801 |
|
1721
64d59b181596
(svn r2225) -Fix: split the endian-detection to target/host. Now cross-compiling
truelight
parents:
1720
diff
changeset
|
802 |
endian_host.h: $(ENDIAN_CHECK) |
64d59b181596
(svn r2225) -Fix: split the endian-detection to target/host. Now cross-compiling
truelight
parents:
1720
diff
changeset
|
803 |
@echo '===> Testing endianness for host' |
64d59b181596
(svn r2225) -Fix: split the endian-detection to target/host. Now cross-compiling
truelight
parents:
1720
diff
changeset
|
804 |
$(Q)./$(ENDIAN_CHECK) > $@ |
64d59b181596
(svn r2225) -Fix: split the endian-detection to target/host. Now cross-compiling
truelight
parents:
1720
diff
changeset
|
805 |
|
64d59b181596
(svn r2225) -Fix: split the endian-detection to target/host. Now cross-compiling
truelight
parents:
1720
diff
changeset
|
806 |
endian_target.h: $(ENDIAN_CHECK) |
64d59b181596
(svn r2225) -Fix: split the endian-detection to target/host. Now cross-compiling
truelight
parents:
1720
diff
changeset
|
807 |
@echo '===> Testing endianness for target' |
1692
2587eee1c632
(svn r2196) -Change: updated the Makefile, now it works for crossplatform compiling
TrueLight
parents:
1629
diff
changeset
|
808 |
$(Q)./$(ENDIAN_CHECK) $(ENDIAN_FORCE) > $@ |
157
dd017fa3bad8
(svn r158) -Fix: make endianess check 100% accurate (hopefully ;))
truelight
parents:
126
diff
changeset
|
809 |
|
dd017fa3bad8
(svn r158) -Fix: make endianess check 100% accurate (hopefully ;))
truelight
parents:
126
diff
changeset
|
810 |
$(ENDIAN_CHECK): endian_check.c |
2315
a6dc17991fa5
(svn r2841) Pimp the Makefile: Determining the header dependencies is now a separate step.
tron
parents:
2302
diff
changeset
|
811 |
@echo '===> Compiling and Linking $@' |
a6dc17991fa5
(svn r2841) Pimp the Makefile: Determining the header dependencies is now a separate step.
tron
parents:
2302
diff
changeset
|
812 |
$(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
|
813 |
|
0 | 814 |
|
2315
a6dc17991fa5
(svn r2841) Pimp the Makefile: Determining the header dependencies is now a separate step.
tron
parents:
2302
diff
changeset
|
815 |
$(TTD): $(OBJS) $(MAKE_CONFIG) |
a6dc17991fa5
(svn r2841) Pimp the Makefile: Determining the header dependencies is now a separate step.
tron
parents:
2302
diff
changeset
|
816 |
@echo '===> Linking $@' |
a6dc17991fa5
(svn r2841) Pimp the Makefile: Determining the header dependencies is now a separate step.
tron
parents:
2302
diff
changeset
|
817 |
$(Q)$(CC) $(LDFLAGS) $(TTDLDFLAGS) $(OBJS) $(LIBS) -o $@ |
0 | 818 |
|
1721
64d59b181596
(svn r2225) -Fix: split the endian-detection to target/host. Now cross-compiling
truelight
parents:
1720
diff
changeset
|
819 |
$(STRGEN): strgen/strgen.c endian_host.h |
2315
a6dc17991fa5
(svn r2841) Pimp the Makefile: Determining the header dependencies is now a separate step.
tron
parents:
2302
diff
changeset
|
820 |
@echo '===> Compiling and Linking $@' |
a6dc17991fa5
(svn r2841) Pimp the Makefile: Determining the header dependencies is now a separate step.
tron
parents:
2302
diff
changeset
|
821 |
$(Q)$(CC_HOST) $(CFLAGS_HOST) $(CDEFS) $< -o $@ |
0 | 822 |
|
474 | 823 |
table/strings.h: lang/english.txt $(STRGEN) |
1118 | 824 |
@echo '===> Generating $@' |
1413
4a93d8682e11
(svn r1917) - Makefile: Revamped VERBOSE support, build mechanics changed.
pasky
parents:
1411
diff
changeset
|
825 |
$(Q)$(STRGEN) |
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
|
826 |
|
476
ad012336ed61
(svn r727) The langauge files depend on english.txt, not strings.h
tron
parents:
475
diff
changeset
|
827 |
lang/%.lng: lang/%.txt $(STRGEN) lang/english.txt |
1118 | 828 |
@echo '===> Compiling language $(*F)' |
2106
e0cbbec2e6e9
(svn r2616) Don't stop when compiling a language fails, just delete the defective .lng
tron
parents:
2096
diff
changeset
|
829 |
$(Q)$(STRGEN) $(STRGEN_FLAGS) $< $(LANG_ERRORS) || rm -f $@ |
0 | 830 |
|
770
89dab23f04ca
(svn r1236) MorphOS: added make release like in OSX (tokai)
bjarni
parents:
730
diff
changeset
|
831 |
ifdef MORPHOS |
89dab23f04ca
(svn r1236) MorphOS: added make release like in OSX (tokai)
bjarni
parents:
730
diff
changeset
|
832 |
release: all |
1413
4a93d8682e11
(svn r1917) - Makefile: Revamped VERBOSE support, build mechanics changed.
pasky
parents:
1411
diff
changeset
|
833 |
$(Q)rm -fr "/t/openttd-$(RELEASE)-morphos.lha" |
4a93d8682e11
(svn r1917) - Makefile: Revamped VERBOSE support, build mechanics changed.
pasky
parents:
1411
diff
changeset
|
834 |
$(Q)mkdir -p "/t/" |
4a93d8682e11
(svn r1917) - Makefile: Revamped VERBOSE support, build mechanics changed.
pasky
parents:
1411
diff
changeset
|
835 |
$(Q)mkdir -p "/t/openttd-$(RELEASE)-morphos" |
4a93d8682e11
(svn r1917) - Makefile: Revamped VERBOSE support, build mechanics changed.
pasky
parents:
1411
diff
changeset
|
836 |
$(Q)mkdir -p "/t/openttd-$(RELEASE)-morphos/docs" |
4a93d8682e11
(svn r1917) - Makefile: Revamped VERBOSE support, build mechanics changed.
pasky
parents:
1411
diff
changeset
|
837 |
$(Q)mkdir -p "/t/openttd-$(RELEASE)-morphos/data" |
4a93d8682e11
(svn r1917) - Makefile: Revamped VERBOSE support, build mechanics changed.
pasky
parents:
1411
diff
changeset
|
838 |
$(Q)mkdir -p "/t/openttd-$(RELEASE)-morphos/lang" |
4a93d8682e11
(svn r1917) - Makefile: Revamped VERBOSE support, build mechanics changed.
pasky
parents:
1411
diff
changeset
|
839 |
$(Q)mkdir -p "/t/openttd-$(RELEASE)-morphos/scenario" |
4a93d8682e11
(svn r1917) - Makefile: Revamped VERBOSE support, build mechanics changed.
pasky
parents:
1411
diff
changeset
|
840 |
$(Q)cp -R $(TTD) "/t/openttd-$(RELEASE)-morphos/" |
4a93d8682e11
(svn r1917) - Makefile: Revamped VERBOSE support, build mechanics changed.
pasky
parents:
1411
diff
changeset
|
841 |
$(Q)cp data/* "/t/openttd-$(RELEASE)-morphos/data/" |
4a93d8682e11
(svn r1917) - Makefile: Revamped VERBOSE support, build mechanics changed.
pasky
parents:
1411
diff
changeset
|
842 |
$(Q)cp lang/*.lng "/t/openttd-$(RELEASE)-morphos/lang/" |
4a93d8682e11
(svn r1917) - Makefile: Revamped VERBOSE support, build mechanics changed.
pasky
parents:
1411
diff
changeset
|
843 |
$(Q)cp scenario/* "/t/openttd-$(RELEASE)-morphos/scenario/" |
4a93d8682e11
(svn r1917) - Makefile: Revamped VERBOSE support, build mechanics changed.
pasky
parents:
1411
diff
changeset
|
844 |
$(Q)cp readme.txt "/t/openttd-$(RELEASE)-morphos/docs/ReadMe" |
4a93d8682e11
(svn r1917) - Makefile: Revamped VERBOSE support, build mechanics changed.
pasky
parents:
1411
diff
changeset
|
845 |
$(Q)cp docs/console.txt "/t/openttd-$(RELEASE)-morphos/docs/Console" |
4a93d8682e11
(svn r1917) - Makefile: Revamped VERBOSE support, build mechanics changed.
pasky
parents:
1411
diff
changeset
|
846 |
$(Q)cp COPYING "/t/openttd-$(RELEASE)-morphos/docs/" |
4a93d8682e11
(svn r1917) - Makefile: Revamped VERBOSE support, build mechanics changed.
pasky
parents:
1411
diff
changeset
|
847 |
$(Q)cp changelog.txt "/t/openttd-$(RELEASE)-morphos/docs/ChangeLog" |
4a93d8682e11
(svn r1917) - Makefile: Revamped VERBOSE support, build mechanics changed.
pasky
parents:
1411
diff
changeset
|
848 |
$(Q)cp known-bugs.txt "/t/openttd-$(RELEASE)-morphos/docs/known-bugs.txt" |
4a93d8682e11
(svn r1917) - Makefile: Revamped VERBOSE support, build mechanics changed.
pasky
parents:
1411
diff
changeset
|
849 |
$(Q)cp os/morphos/icons/openttd.info "/t/openttd-$(RELEASE)-morphos/$(TTD).info" |
4a93d8682e11
(svn r1917) - Makefile: Revamped VERBOSE support, build mechanics changed.
pasky
parents:
1411
diff
changeset
|
850 |
$(Q)cp os/morphos/icons/docs.info "/t/openttd-$(RELEASE)-morphos/docs.info" |
4a93d8682e11
(svn r1917) - Makefile: Revamped VERBOSE support, build mechanics changed.
pasky
parents:
1411
diff
changeset
|
851 |
$(Q)cp os/morphos/icons/drawer.info "/t/openttd-$(RELEASE)-morphos.info" |
4a93d8682e11
(svn r1917) - Makefile: Revamped VERBOSE support, build mechanics changed.
pasky
parents:
1411
diff
changeset
|
852 |
$(Q)cp os/morphos/icons/document.info "/t/openttd-$(RELEASE)-morphos/docs/ReadMe.info" |
4a93d8682e11
(svn r1917) - Makefile: Revamped VERBOSE support, build mechanics changed.
pasky
parents:
1411
diff
changeset
|
853 |
$(Q)cp os/morphos/icons/document.info "/t/openttd-$(RELEASE)-morphos/docs/Console.info" |
4a93d8682e11
(svn r1917) - Makefile: Revamped VERBOSE support, build mechanics changed.
pasky
parents:
1411
diff
changeset
|
854 |
$(Q)cp os/morphos/icons/document.info "/t/openttd-$(RELEASE)-morphos/docs/COPYING.info" |
4a93d8682e11
(svn r1917) - Makefile: Revamped VERBOSE support, build mechanics changed.
pasky
parents:
1411
diff
changeset
|
855 |
$(Q)cp os/morphos/icons/document.info "/t/openttd-$(RELEASE)-morphos/docs/ChangeLog.info" |
4a93d8682e11
(svn r1917) - Makefile: Revamped VERBOSE support, build mechanics changed.
pasky
parents:
1411
diff
changeset
|
856 |
$(Q)strip --strip-all --strip-unneeded --remove-section .comment "/t/openttd-$(RELEASE)-morphos/$(TTD)" |
4a93d8682e11
(svn r1917) - Makefile: Revamped VERBOSE support, build mechanics changed.
pasky
parents:
1411
diff
changeset
|
857 |
$(Q)lha a -r "t:openttd-$(RELEASE)-morphos.lha" "t:openttd-$(RELEASE)-morphos" |
4a93d8682e11
(svn r1917) - Makefile: Revamped VERBOSE support, build mechanics changed.
pasky
parents:
1411
diff
changeset
|
858 |
$(Q)lha a "t:openttd-$(RELEASE)-morphos.lha" "t:openttd-$(RELEASE)-morphos.info" |
4a93d8682e11
(svn r1917) - Makefile: Revamped VERBOSE support, build mechanics changed.
pasky
parents:
1411
diff
changeset
|
859 |
$(Q)rm -fr "/t/openttd-$(RELEASE)-morphos" |
4a93d8682e11
(svn r1917) - Makefile: Revamped VERBOSE support, build mechanics changed.
pasky
parents:
1411
diff
changeset
|
860 |
$(Q)rm -fr "/t/openttd-$(RELEASE)-morphos.info" |
770
89dab23f04ca
(svn r1236) MorphOS: added make release like in OSX (tokai)
bjarni
parents:
730
diff
changeset
|
861 |
@echo "Release archive can be found in RAM:t/ now." |
89dab23f04ca
(svn r1236) MorphOS: added make release like in OSX (tokai)
bjarni
parents:
730
diff
changeset
|
862 |
|
1251 | 863 |
.PHONY: release |
770
89dab23f04ca
(svn r1236) MorphOS: added make release like in OSX (tokai)
bjarni
parents:
730
diff
changeset
|
864 |
endif |
89dab23f04ca
(svn r1236) MorphOS: added make release like in OSX (tokai)
bjarni
parents:
730
diff
changeset
|
865 |
|
0 | 866 |
rev.c: FORCE |
867 |
@# setting the revision number in a place, there the binary can read it |
|
615
3a22cf31bb29
(svn r1039) Makefile: now RELEASE flag can contain () too
bjarni
parents:
610
diff
changeset
|
868 |
@echo 'const char _openttd_revision[] = "$(REV)";' >>rev.c.new |
0 | 869 |
@# some additions for MorphOS versions tag |
870 |
@echo '#ifdef __MORPHOS__' >>rev.c.new |
|
2378
20c6e78b2b9d
(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
|
871 |
@echo 'const char morphos_versions_tag[] = "\\0$$VER: OpenTTD $(REV) ('${BUILDDATE}') © OpenTTD Team [MorphOS, PowerPC]";' >>rev.c.new |
0 | 872 |
@echo '#endif' >>rev.c.new |
873 |
@# Only update the real rev.c if it actually changed, to prevent |
|
874 |
@# useless rebuilds. |
|
875 |
@cmp -s rev.c rev.c.new 2>/dev/null || mv rev.c.new rev.c |
|
876 |
@rm -f rev.c.new |
|
877 |
||
878 |
FORCE: |
|
879 |
||
880 |
||
881 |
clean: |
|
1118 | 882 |
@echo '===> Cleaning up' |
1721
64d59b181596
(svn r2225) -Fix: split the endian-detection to target/host. Now cross-compiling
truelight
parents:
1720
diff
changeset
|
883 |
# endian.h is out-dated and no longer in use, so it can be removed soon |
64d59b181596
(svn r2225) -Fix: split the endian-detection to target/host. Now cross-compiling
truelight
parents:
1720
diff
changeset
|
884 |
$(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) |
0 | 885 |
|
886 |
mrproper: clean |
|
1413
4a93d8682e11
(svn r1917) - Makefile: Revamped VERBOSE support, build mechanics changed.
pasky
parents:
1411
diff
changeset
|
887 |
$(Q)rm -rf $(MAKE_CONFIG) |
0 | 888 |
|
889 |
ifndef OSX |
|
890 |
ifndef MORPHOS |
|
891 |
install: |
|
285 | 892 |
ifeq ($(INSTALL),) |
893 |
$(error make install is highly experimental at his state and not\ |
|
1492
e03a8c6f7efd
(svn r1996) makefile.config -> Makefile.config, that's its name.
pasky
parents:
1491
diff
changeset
|
894 |
tested very much - use at your own risk - to use run \"make install INSTALL:=1\" - make sure Makefile.config\ |
0 | 895 |
is set correctly up - run \"make upgradeconf\") |
285 | 896 |
endif |
897 |
||
543
e3b43338096b
(svn r942) -Merged branch/network back into the trunk
truelight
parents:
532
diff
changeset
|
898 |
ifeq ($(PREFIX), ) |
1492
e03a8c6f7efd
(svn r1996) makefile.config -> Makefile.config, that's its name.
pasky
parents:
1491
diff
changeset
|
899 |
$(error no prefix set - check Makefile.config) |
285 | 900 |
endif |
901 |
# We compare against the non prefixed version here, so we won't install |
|
902 |
# if only the prefix has been set |
|
903 |
ifeq ($(DATA_DIR),) |
|
1492
e03a8c6f7efd
(svn r1996) makefile.config -> Makefile.config, that's its name.
pasky
parents:
1491
diff
changeset
|
904 |
$(error no data path set - check Makefile.config) |
285 | 905 |
endif |
906 |
ifeq ($(BINARY_DIR),) |
|
1492
e03a8c6f7efd
(svn r1996) makefile.config -> Makefile.config, that's its name.
pasky
parents:
1491
diff
changeset
|
907 |
$(error no binary path set - check Makefile.config) |
285 | 908 |
endif |
909 |
# We'll install in $DEST_DIR instead of root if it is set (we don't |
|
910 |
# care about extra /'s |
|
1491
d010857e470a
(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
|
911 |
install -d $(DATA_DIR_INSTALL)/lang \ |
d010857e470a
(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
|
912 |
$(DATA_DIR_INSTALL)/data \ |
d010857e470a
(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
|
913 |
$(DATA_DIR_INSTALL)/gm \ |
d010857e470a
(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
|
914 |
$(BINARY_DIR_INSTALL) |
1865
8f237a5b1a5f
(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
|
915 |
ifndef USE_HOMEDIR |
8f237a5b1a5f
(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
|
916 |
mkdir -p $(PERSONAL_DIR)/scenario |
8f237a5b1a5f
(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
|
917 |
else |
8f237a5b1a5f
(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
|
918 |
mkdir -p $(DATA_DIR_INSTALL)/scenario |
8f237a5b1a5f
(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
|
919 |
endif |
1491
d010857e470a
(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
|
920 |
install $(TTD) $(BINARY_DIR_INSTALL) |
d010857e470a
(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
|
921 |
install -m 644 lang/*.lng $(DATA_DIR_INSTALL)/lang |
d010857e470a
(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
|
922 |
install -m 644 data/*.grf $(DATA_DIR_INSTALL)/data |
d010857e470a
(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
|
923 |
install -m 644 data/opntitle.dat $(DATA_DIR_INSTALL)/data |
2901
6adc1bdca953
(svn r3456) - Feature: [Makefile] Icons can now be installed in a seperate directory.
matthijs
parents:
2835
diff
changeset
|
924 |
install -m 644 media/openttd.64.png $(ICON_DIR_INSTALL) |
6adc1bdca953
(svn r3456) - Feature: [Makefile] Icons can now be installed in a seperate directory.
matthijs
parents:
2835
diff
changeset
|
925 |
install -m 644 media/openttd.32.xpm $(ICON_DIR_INSTALL) |
1865
8f237a5b1a5f
(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
|
926 |
ifndef USE_HOMEDIR |
1160
467d3ff0ad97
(svn r1661) Makefile: added scenario to make install
bjarni
parents:
1158
diff
changeset
|
927 |
cp scenario/* $(PERSONAL_DIR)/scenario/ |
1865
8f237a5b1a5f
(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
|
928 |
else |
8f237a5b1a5f
(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
|
929 |
cp scenario/* $(DATA_DIR_INSTALL)/scenario/ |
8f237a5b1a5f
(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
|
930 |
endif |
0 | 931 |
else #MorphOS |
932 |
install: |
|
933 |
$(error make install is not supported on MorphOS) |
|
934 |
endif |
|
935 |
else # OSX |
|
936 |
install: |
|
937 |
$(error make install is not supported on MacOSX) |
|
938 |
endif |
|
939 |
||
940 |
||
941 |
love: |
|
942 |
@echo "YES! I thought you would never ask. We will have a great time. You can keep me turned on all night" |
|
943 |
||
2576
8f68e7d7d941
(svn r3113) -Fix: The Makefile had 64bit code which was obsolete, not to say wrong.
truelight
parents:
2555
diff
changeset
|
944 |
.PHONY: clean all $(OSX) install love |
0 | 945 |
|
946 |
||
947 |
### Automatic configuration |
|
948 |
-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
|
949 |
|
0 | 950 |
|
951 |
# Export all variables set to subprocesses (a bit dirty) |
|
952 |
.EXPORT_ALL_VARIABLES: |
|
953 |
upgradeconf: $(MAKE_CONFIG) |
|
1413
4a93d8682e11
(svn r1917) - Makefile: Revamped VERBOSE support, build mechanics changed.
pasky
parents:
1411
diff
changeset
|
954 |
$(Q)rm $(MAKE_CONFIG) |
4a93d8682e11
(svn r1917) - Makefile: Revamped VERBOSE support, build mechanics changed.
pasky
parents:
1411
diff
changeset
|
955 |
$(Q)$(MAKE) $(MAKE_CONFIG) |
0 | 956 |
|
957 |
.PHONY: upgradeconf |
|
958 |
||
959 |
||
960 |
### Internal build rules |
|
961 |
||
962 |
# This makes sure the .deps dir is always around. |
|
2792
8295dd48c42c
(svn r3340) Fix dependency calculation: dependencies didn't get recalculated if a header file changed
tron
parents:
2779
diff
changeset
|
963 |
DEPS_MAGIC := $(shell mkdir -p $(sort $(dir $(DEPS)))) |
8295dd48c42c
(svn r3340) Fix dependency calculation: dependencies didn't get recalculated if a header file changed
tron
parents:
2779
diff
changeset
|
964 |
|
8295dd48c42c
(svn r3340) Fix dependency calculation: dependencies didn't get recalculated if a header file changed
tron
parents:
2779
diff
changeset
|
965 |
depend: |
8295dd48c42c
(svn r3340) Fix dependency calculation: dependencies didn't get recalculated if a header file changed
tron
parents:
2779
diff
changeset
|
966 |
@true # The include handles this automagically |
0 | 967 |
|
968 |
# Introduce the dependencies |
|
2792
8295dd48c42c
(svn r3340) Fix dependency calculation: dependencies didn't get recalculated if a header file changed
tron
parents:
2779
diff
changeset
|
969 |
ifeq ($(findstring $(MAKECMDGOALS), clean info),) |
1167
d8b7601118cf
(svn r1669) Rename all ttd_XXX to just XXX, because we already know who we are (;
tron
parents:
1164
diff
changeset
|
970 |
-include $(DEPS) |
2315
a6dc17991fa5
(svn r2841) Pimp the Makefile: Determining the header dependencies is now a separate step.
tron
parents:
2302
diff
changeset
|
971 |
endif |
0 | 972 |
|
2792
8295dd48c42c
(svn r3340) Fix dependency calculation: dependencies didn't get recalculated if a header file changed
tron
parents:
2779
diff
changeset
|
973 |
# Silence stale header dependency errors |
8295dd48c42c
(svn r3340) Fix dependency calculation: dependencies didn't get recalculated if a header file changed
tron
parents:
2779
diff
changeset
|
974 |
%.h: |
8295dd48c42c
(svn r3340) Fix dependency calculation: dependencies didn't get recalculated if a header file changed
tron
parents:
2779
diff
changeset
|
975 |
@true |
1170
1cd3103acd66
(svn r1672) Simplify dependency tracking and actually implement it for C++ files, too.
tron
parents:
1169
diff
changeset
|
976 |
|
2327
076c79dea490
(svn r2853) Add missing dependencies and flags to the dependency targets and make the info target more informative
tron
parents:
2317
diff
changeset
|
977 |
.deps/%.d: %.c $(MAKE_CONFIG) table/strings.h endian_target.h |
2792
8295dd48c42c
(svn r3340) Fix dependency calculation: dependencies didn't get recalculated if a header file changed
tron
parents:
2779
diff
changeset
|
978 |
@echo '===> DEP $<' |
2800
a0643979398b
(svn r3348) Dependency checking didn't include all compile parameters, which lead to wrong results
tron
parents:
2792
diff
changeset
|
979 |
$(Q)$(CC) $(CFLAGS) $(CDEFS) -MM $< | sed 's#^$(@F:%.d=%.o):#$@ $(@:.deps/%.d=%.o):#' > $@ |
2188
9acde6fcc645
(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
|
980 |
|
2327
076c79dea490
(svn r2853) Add missing dependencies and flags to the dependency targets and make the info target more informative
tron
parents:
2317
diff
changeset
|
981 |
.deps/%.d: %.cpp $(MAKE_CONFIG) table/strings.h endian_target.h |
2792
8295dd48c42c
(svn r3340) Fix dependency calculation: dependencies didn't get recalculated if a header file changed
tron
parents:
2779
diff
changeset
|
982 |
@echo '===> DEP $<' |
2918
5da18f3f3ea3
(svn r3474) -Fix: don't use CXXFLAGS for DEP and CFLAGS for Compile, gives funny results ;)
truelight
parents:
2916
diff
changeset
|
983 |
$(Q)$(CXX) $(CFLAGS) $(CDEFS) -MM $< | sed 's#^$(@F:%.d=%.o):#$@ $(@:.deps/%.d=%.o):#' > $@ |
2315
a6dc17991fa5
(svn r2841) Pimp the Makefile: Determining the header dependencies is now a separate step.
tron
parents:
2302
diff
changeset
|
984 |
|
2327
076c79dea490
(svn r2853) Add missing dependencies and flags to the dependency targets and make the info target more informative
tron
parents:
2317
diff
changeset
|
985 |
.deps/%.d: %.m $(MAKE_CONFIG) table/strings.h endian_target.h |
2792
8295dd48c42c
(svn r3340) Fix dependency calculation: dependencies didn't get recalculated if a header file changed
tron
parents:
2779
diff
changeset
|
986 |
@echo '===> DEP $<' |
2800
a0643979398b
(svn r3348) Dependency checking didn't include all compile parameters, which lead to wrong results
tron
parents:
2792
diff
changeset
|
987 |
$(Q)$(CC) $(OBJCFLAGS) $(CDEFS) -MM $< | sed 's#^$(@F:%.d=%.o):#$@ $(@:.deps/%.d=%.o):#' > $@ |
2315
a6dc17991fa5
(svn r2841) Pimp the Makefile: Determining the header dependencies is now a separate step.
tron
parents:
2302
diff
changeset
|
988 |
|
a6dc17991fa5
(svn r2841) Pimp the Makefile: Determining the header dependencies is now a separate step.
tron
parents:
2302
diff
changeset
|
989 |
|
a6dc17991fa5
(svn r2841) Pimp the Makefile: Determining the header dependencies is now a separate step.
tron
parents:
2302
diff
changeset
|
990 |
%.o: %.c $(MAKE_CONFIG) |
a6dc17991fa5
(svn r2841) Pimp the Makefile: Determining the header dependencies is now a separate step.
tron
parents:
2302
diff
changeset
|
991 |
@echo '===> Compiling $<' |
a6dc17991fa5
(svn r2841) Pimp the Makefile: Determining the header dependencies is now a separate step.
tron
parents:
2302
diff
changeset
|
992 |
$(Q)$(CC) $(CFLAGS) $(CDEFS) -c -o $@ $< |
a6dc17991fa5
(svn r2841) Pimp the Makefile: Determining the header dependencies is now a separate step.
tron
parents:
2302
diff
changeset
|
993 |
|
a6dc17991fa5
(svn r2841) Pimp the Makefile: Determining the header dependencies is now a separate step.
tron
parents:
2302
diff
changeset
|
994 |
%.o: %.cpp $(MAKE_CONFIG) |
a6dc17991fa5
(svn r2841) Pimp the Makefile: Determining the header dependencies is now a separate step.
tron
parents:
2302
diff
changeset
|
995 |
@echo '===> Compiling $<' |
a6dc17991fa5
(svn r2841) Pimp the Makefile: Determining the header dependencies is now a separate step.
tron
parents:
2302
diff
changeset
|
996 |
$(Q)$(CXX) $(CFLAGS) $(CDEFS) -c -o $@ $< |
a6dc17991fa5
(svn r2841) Pimp the Makefile: Determining the header dependencies is now a separate step.
tron
parents:
2302
diff
changeset
|
997 |
|
a6dc17991fa5
(svn r2841) Pimp the Makefile: Determining the header dependencies is now a separate step.
tron
parents:
2302
diff
changeset
|
998 |
%.o: %.m $(MAKE_CONFIG) |
a6dc17991fa5
(svn r2841) Pimp the Makefile: Determining the header dependencies is now a separate step.
tron
parents:
2302
diff
changeset
|
999 |
@echo '===> Compiling $<' |
2317
1221c9576436
(svn r2843) OSX doesn't like OBJC, so give it back its beloved CC, because it's the only ObjectiveC consumer
tron
parents:
2315
diff
changeset
|
1000 |
$(Q)$(CC) $(CFLAGS) $(CDEFS) -c -o $@ $< |
1163
044430212516
(svn r1665) Remove VERBOSE flag, because it was only partially implemented
tron
parents:
1162
diff
changeset
|
1001 |
|
2742
bfa51fe0dac5
(svn r3287) Turn the winres.o: openttd.rc special case into a normal %.o: %.rc rule
tron
parents:
2736
diff
changeset
|
1002 |
%.o: %.rc |
bfa51fe0dac5
(svn r3287) Turn the winres.o: openttd.rc special case into a normal %.o: %.rc rule
tron
parents:
2736
diff
changeset
|
1003 |
@echo '===> Compiling resource $<' |
bfa51fe0dac5
(svn r3287) Turn the winres.o: openttd.rc special case into a normal %.o: %.rc rule
tron
parents:
2736
diff
changeset
|
1004 |
$(Q)$(WINDRES) -o $@ $< |
bfa51fe0dac5
(svn r3287) Turn the winres.o: openttd.rc special case into a normal %.o: %.rc rule
tron
parents:
2736
diff
changeset
|
1005 |
|
1163
044430212516
(svn r1665) Remove VERBOSE flag, because it was only partially implemented
tron
parents:
1162
diff
changeset
|
1006 |
|
044430212516
(svn r1665) Remove VERBOSE flag, because it was only partially implemented
tron
parents:
1162
diff
changeset
|
1007 |
info: |
1435
89d0c6a56a9b
(svn r1939) Revert part of r1938 which accidently crept in
tron
parents:
1434
diff
changeset
|
1008 |
@echo 'CFLAGS = $(CFLAGS)' |
1163
044430212516
(svn r1665) Remove VERBOSE flag, because it was only partially implemented
tron
parents:
1162
diff
changeset
|
1009 |
@echo 'LDFLAGS = $(LDFLAGS)' |
044430212516
(svn r1665) Remove VERBOSE flag, because it was only partially implemented
tron
parents:
1162
diff
changeset
|
1010 |
@echo 'LIBS = $(LIBS)' |
2327
076c79dea490
(svn r2853) Add missing dependencies and flags to the dependency targets and make the info target more informative
tron
parents:
2317
diff
changeset
|
1011 |
@echo 'CDEFS = $(CDEFS)' |