author | rubidium |
Fri, 23 Mar 2007 22:54:19 +0000 | |
branch | 0.5 |
changeset 5478 | 8067046917c1 |
parent 5475 | f57b2ad04098 |
child 5517 | 799cfac4b99f |
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 |
# DEBUG: build in debug mode |
|
50 |
# PROFILE: build in profile mode, disables -s and -fomit-frame-pointer |
|
51 |
# TRANSLATOR: build in translator mode (untranslated strings are prepended by |
|
52 |
# a <TODO> mark) |
|
53 |
# RELEASE: this will be the released version number. It replaces all places |
|
54 |
# where it normally would print the revision number |
|
222
b88456001397
(svn r223) -Fix: Const correctness and miscellaneous fixes. Thank you Tron for your diligent fixing of warnings (and some possibly bugs) (Tron)
darkvater
parents:
221
diff
changeset
|
55 |
# MIDI: if set, it will use it as custom path to midi player. |
1584
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
|
56 |
# 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
|
57 |
# This can still be overriden by the music.extmidi openttd.cfg option. |
2197 | 58 |
# WITH_DIRECTMUSIC: enable DirectMusic MIDI support |
804
06aaddf6742b
(svn r1274) Makefile: networking is not longer experimental
bjarni
parents:
798
diff
changeset
|
59 |
# WITH_NETWORK: enable networking |
06aaddf6742b
(svn r1274) Makefile: networking is not longer experimental
bjarni
parents:
798
diff
changeset
|
60 |
# DEDICATED: allows compilation on UNIX without SDL. Useful for dedicated servers |
0 | 61 |
# |
285 | 62 |
# Paths: |
63 |
# 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
|
64 |
# store everything (lang, data, gm, save and openttd.cfg), this is the `old' behaviour. |
285 | 65 |
# In this case, none of the following paths are used, you also should _not_ |
66 |
# use `make install', but copy the required stuff yourself (or just play out |
|
67 |
# of you source directory, which should work fine). |
|
68 |
# If you want to use `make install' to install the game globally, you should |
|
69 |
# define it _before_ you build the game. If you only define INSTALL when you |
|
70 |
# do `make install', the game won't be able to find it's files (so you should |
|
71 |
# also define all the following paths before building). |
|
72 |
# |
|
73 |
# So, the following paths should be defined if INSTALL is defined. |
|
74 |
# None of these paths have to end with / |
|
75 |
# PREFIX: Normally /usr/local |
|
76 |
# BINARY_DIR: The location of the binary, normally games. (Will be prefixed |
|
77 |
# 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
|
78 |
# 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
|
79 |
# 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
|
80 |
# 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
|
81 |
# PERSONAL_DIR/scenario |
2901
6adc1bdca953
(svn r3456) - Feature: [Makefile] Icons can now be installed in a seperate directory.
matthijs
parents:
2835
diff
changeset
|
82 |
# ICON_DIR: The location of the openttd icon. (Will be prefixed with |
6adc1bdca953
(svn r3456) - Feature: [Makefile] Icons can now be installed in a seperate directory.
matthijs
parents:
2835
diff
changeset
|
83 |
# $PREFIX). |
285 | 84 |
# PERSONAL_DIR: The directory where openttd.cfg and the save folder will be |
85 |
# stored. You cannot use ~ here, define USE_HOMEDIR for that. |
|
86 |
# USE_HOMEDIR: If this variable is set, PERSONAL_DIR will be prefixed with |
|
87 |
# ~/ at runtime (the user's homedir) |
|
561
e3b9689745ab
(svn r970) Added 2nd data path for all non-windows OSes
bjarni
parents:
551
diff
changeset
|
88 |
# SECOND_DATA_PATH Use this data dir if a file is not found in the data dir in the data path |
1251 | 89 |
# 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
|
90 |
# 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
|
91 |
# NOTE: both SECOND_DATA_PATH and CUSTOM_LANG_PATH uses paths relative to where OTTD is opened |
285 | 92 |
# |
93 |
# DEST_DIR: make install will use this directory instead of the filesystem |
|
94 |
# root to install its files. This should normally not be used by |
|
95 |
# ordinary users, currently it is only used for the debian |
|
96 |
# packaging. This value should only be set when calling `make |
|
97 |
# 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
|
98 |
# (Note that DESTDIR is checked if DEST_DIR is not set.) |
0 | 99 |
# |
100 |
# STATIC: link statically |
|
101 |
# CYGWIN: build in Cygwin environment |
|
102 |
# MINGW: build with MingW compiler, link with MingW libraries |
|
103 |
# |
|
5362
4a0088602828
(svn r7662) -Backport from trunk (r7557, r7624):
Darkvater
parents:
5305
diff
changeset
|
104 |
# CUSTOM_FONTCONFIG: use a custom name/path to the libfontconfig library. Useful for static linking |
4a0088602828
(svn r7662) -Backport from trunk (r7557, r7624):
Darkvater
parents:
5305
diff
changeset
|
105 |
# |
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
|
106 |
# 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
|
107 |
# |
1692
2587eee1c632
(svn r2196) -Change: updated the Makefile, now it works for crossplatform compiling
TrueLight
parents:
1629
diff
changeset
|
108 |
# 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
|
109 |
# |
3085
cbcafb482b75
(svn r3674) -Feature: [OSX] Added support for tripple binaries (binaries optimised for G3, G5 and i686)
bjarni
parents:
3084
diff
changeset
|
110 |
# UNIVERSAL_BINARY: builds a universal binary for OSX. Make sure you got both PPC and x86 libs. Only works with GCC 4 or newer |
3212
60517b6883c0
(svn r3884) renamed TRIPPLE_BINARY to TRIPLE_BINARY
bjarni
parents:
3211
diff
changeset
|
111 |
# TRIPLE_BINARY: builds a universal binary with the addition of code optimised for G5 (which means a total of 3 binaries in one file) |
3354
88222b8dafef
(svn r4149) -Codechange: [OSX] rewrite of how universal binaries are compiled
bjarni
parents:
3341
diff
changeset
|
112 |
# OTTD_PPC, OTTD_PPC970, OTTD_i386: compile for target architecture. |
88222b8dafef
(svn r4149) -Codechange: [OSX] rewrite of how universal binaries are compiled
bjarni
parents:
3341
diff
changeset
|
113 |
# Multiple flags can be used so OTTD_PPC:=1 OTTD_i386:=1 produces the same result as UNIVERSAL_BINARY |
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
|
114 |
# |
2719
146eaa0ec83c
(svn r3264) -Codechange: [OSX] OSX targets will now always use the preprocessor to determine endianess
bjarni
parents:
2717
diff
changeset
|
115 |
# 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
|
116 |
# 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
|
117 |
# 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
|
118 |
# 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
|
119 |
# WINDRES: the location of your windres |
2587eee1c632
(svn r2196) -Change: updated the Makefile, now it works for crossplatform compiling
TrueLight
parents:
1629
diff
changeset
|
120 |
# 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
|
121 |
# 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
|
122 |
# windows executables on linux. (just: CFLAGS_HOST:='-I' or something) |
0 | 123 |
|
124 |
||
125 |
############################################################################## |
|
126 |
# |
|
127 |
# Configuration |
|
128 |
# |
|
129 |
||
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
|
130 |
|
180
47ee14fe2b35
(svn r181) Makefile: enabled ability to supress output of missing strings in lng files
bjarni
parents:
164
diff
changeset
|
131 |
# Makefile version tag |
1492
e03a8c6f7efd
(svn r1996) makefile.config -> Makefile.config, that's its name.
pasky
parents:
1491
diff
changeset
|
132 |
# it checks if the version tag in Makefile.config is the same and force update outdated config files |
3354
88222b8dafef
(svn r4149) -Codechange: [OSX] rewrite of how universal binaries are compiled
bjarni
parents:
3341
diff
changeset
|
133 |
MAKEFILE_VERSION:=10 |
180
47ee14fe2b35
(svn r181) Makefile: enabled ability to supress output of missing strings in lng files
bjarni
parents:
164
diff
changeset
|
134 |
|
0 | 135 |
# Automatic configuration |
136 |
MAKE_CONFIG:=Makefile.config |
|
137 |
MAKEFILE:=Makefile |
|
138 |
LIB_DETECTION=makefiledir/Makefile.libdetection |
|
139 |
CONFIG_WRITER=makefiledir/Makefile.config_writer |
|
140 |
||
141 |
# Apply automatic configuration |
|
142 |
# See target section for how this is built, suppress errors |
|
143 |
# since first time it isn't found but make reads this twice |
|
144 |
-include $(MAKE_CONFIG) |
|
145 |
||
1955
52a84e880864
(svn r2461) -Feature [Makefile] libpng-config can now be called something else in Makefile.config
bjarni
parents:
1952
diff
changeset
|
146 |
|
1492
e03a8c6f7efd
(svn r1996) makefile.config -> Makefile.config, that's its name.
pasky
parents:
1491
diff
changeset
|
147 |
# 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
|
148 |
ifneq ($(MAKEFILE_VERSION),$(CONFIG_VERSION)) |
1693
e3a6eedee876
(svn r2197) -fix [Makefile]: SDL_CONFIG from makefile.config is now not always overwritten
bjarni
parents:
1692
diff
changeset
|
149 |
UPDATECONFIG:=upgradeconf |
e3a6eedee876
(svn r2197) -fix [Makefile]: SDL_CONFIG from makefile.config is now not always overwritten
bjarni
parents:
1692
diff
changeset
|
150 |
CONFIG_INCLUDED:= |
0 | 151 |
endif |
152 |
||
1492
e03a8c6f7efd
(svn r1996) makefile.config -> Makefile.config, that's its name.
pasky
parents:
1491
diff
changeset
|
153 |
# this is used if there aren't any Makefile.config |
0 | 154 |
ifndef CONFIG_INCLUDED |
285 | 155 |
# 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
|
156 |
ENABLE_NETWORK:=1 |
285 | 157 |
|
158 |
# paths for make install |
|
159 |
# disabled as they would break it for some (many?) people if they were default |
|
160 |
#PREFIX:=/usr/local |
|
161 |
#DATA_DIR:=share/games/openttd |
|
162 |
#BINARY_DIR:=games |
|
163 |
#PERSONAL_DIR:=.openttd |
|
164 |
#USE_HOMEDIR:=1 |
|
165 |
||
0 | 166 |
-include $(LIB_DETECTION) |
167 |
endif |
|
168 |
||
180
47ee14fe2b35
(svn r181) Makefile: enabled ability to supress output of missing strings in lng files
bjarni
parents:
164
diff
changeset
|
169 |
ifdef SUPRESS_LANG_ERRORS |
47ee14fe2b35
(svn r181) Makefile: enabled ability to supress output of missing strings in lng files
bjarni
parents:
164
diff
changeset
|
170 |
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
|
171 |
endif |
47ee14fe2b35
(svn r181) Makefile: enabled ability to supress output of missing strings in lng files
bjarni
parents:
164
diff
changeset
|
172 |
|
2722
dcbf94a5ad1a
(svn r3267) -Codechange: [OSX] universal binary makefile code cleanup
bjarni
parents:
2719
diff
changeset
|
173 |
ifdef OSX |
3901
5f173c71d053
(svn r4989) -Fix: make the OSX Makefile stuff to work with the compile-farm
truelight
parents:
3900
diff
changeset
|
174 |
-include os/macosx/Makefile.setup |
2722
dcbf94a5ad1a
(svn r3267) -Codechange: [OSX] universal binary makefile code cleanup
bjarni
parents:
2719
diff
changeset
|
175 |
endif |
dcbf94a5ad1a
(svn r3267) -Codechange: [OSX] universal binary makefile code cleanup
bjarni
parents:
2719
diff
changeset
|
176 |
|
0 | 177 |
ifdef STATIC |
178 |
ifndef WIN32 |
|
179 |
ifndef OSX |
|
180 |
ifndef MORPHOS |
|
181 |
ifndef SKIP_STATIC_CHECK |
|
1492
e03a8c6f7efd
(svn r1996) makefile.config -> Makefile.config, that's its name.
pasky
parents:
1491
diff
changeset
|
182 |
$(error Static is only known to work on MorphOS and MacOSX!!! --- Check Makefile.config for more info and howto bypass this check) |
0 | 183 |
endif |
184 |
endif |
|
185 |
endif |
|
186 |
endif |
|
187 |
endif |
|
188 |
||
2736
1ea068235989
(svn r3281) -Feature: [OSX] added native cocoa sound and video drivers (egladil)
bjarni
parents:
2735
diff
changeset
|
189 |
ifdef WITH_COCOA |
1ea068235989
(svn r3281) -Feature: [OSX] added native cocoa sound and video drivers (egladil)
bjarni
parents:
2735
diff
changeset
|
190 |
ifdef WITH_SDL |
1ea068235989
(svn r3281) -Feature: [OSX] added native cocoa sound and video drivers (egladil)
bjarni
parents:
2735
diff
changeset
|
191 |
$(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
|
192 |
endif |
1ea068235989
(svn r3281) -Feature: [OSX] added native cocoa sound and video drivers (egladil)
bjarni
parents:
2735
diff
changeset
|
193 |
ifdef DEDICATED |
1ea068235989
(svn r3281) -Feature: [OSX] added native cocoa sound and video drivers (egladil)
bjarni
parents:
2735
diff
changeset
|
194 |
$(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
|
195 |
endif |
1ea068235989
(svn r3281) -Feature: [OSX] added native cocoa sound and video drivers (egladil)
bjarni
parents:
2735
diff
changeset
|
196 |
else |
0 | 197 |
# Force SDL on UNIX platforms |
198 |
ifndef WITH_SDL |
|
199 |
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
|
200 |
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
|
201 |
$(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 | 202 |
endif |
203 |
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
|
204 |
endif |
2736
1ea068235989
(svn r3281) -Feature: [OSX] added native cocoa sound and video drivers (egladil)
bjarni
parents:
2735
diff
changeset
|
205 |
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
|
206 |
|
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
|
207 |
# 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
|
208 |
ifdef DEDICATED |
2779
699ddeb79adf
(svn r3326) - Fix: [ 1226832 ] Build fails if SDL is built without pthread support (dst)
Darkvater
parents:
2767
diff
changeset
|
209 |
WITH_SDL:= |
699ddeb79adf
(svn r3326) - Fix: [ 1226832 ] Build fails if SDL is built without pthread support (dst)
Darkvater
parents:
2767
diff
changeset
|
210 |
endif |
699ddeb79adf
(svn r3326) - Fix: [ 1226832 ] Build fails if SDL is built without pthread support (dst)
Darkvater
parents:
2767
diff
changeset
|
211 |
|
699ddeb79adf
(svn r3326) - Fix: [ 1226832 ] Build fails if SDL is built without pthread support (dst)
Darkvater
parents:
2767
diff
changeset
|
212 |
# add -lpthread to LDFLAGS |
2298
64a87da01248
(svn r2822) -Fix: don't compile pthread for win32 dedicated servers
truelight
parents:
2291
diff
changeset
|
213 |
ifndef WIN32 |
2779
699ddeb79adf
(svn r3326) - Fix: [ 1226832 ] Build fails if SDL is built without pthread support (dst)
Darkvater
parents:
2767
diff
changeset
|
214 |
ifndef MORPHOS |
699ddeb79adf
(svn r3326) - Fix: [ 1226832 ] Build fails if SDL is built without pthread support (dst)
Darkvater
parents:
2767
diff
changeset
|
215 |
ifndef OSX |
699ddeb79adf
(svn r3326) - Fix: [ 1226832 ] Build fails if SDL is built without pthread support (dst)
Darkvater
parents:
2767
diff
changeset
|
216 |
LDFLAGS+=-lpthread |
699ddeb79adf
(svn r3326) - Fix: [ 1226832 ] Build fails if SDL is built without pthread support (dst)
Darkvater
parents:
2767
diff
changeset
|
217 |
endif |
699ddeb79adf
(svn r3326) - Fix: [ 1226832 ] Build fails if SDL is built without pthread support (dst)
Darkvater
parents:
2767
diff
changeset
|
218 |
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
|
219 |
endif |
2779
699ddeb79adf
(svn r3326) - Fix: [ 1226832 ] Build fails if SDL is built without pthread support (dst)
Darkvater
parents:
2767
diff
changeset
|
220 |
|
2300
d85dbbd78fd5
(svn r2824) -Fix: OSX can now also produce dedicated servers
truelight
parents:
2299
diff
changeset
|
221 |
ifdef OSX |
2779
699ddeb79adf
(svn r3326) - Fix: [ 1226832 ] Build fails if SDL is built without pthread support (dst)
Darkvater
parents:
2767
diff
changeset
|
222 |
LDFLAGS+=-framework Cocoa |
2300
d85dbbd78fd5
(svn r2824) -Fix: OSX can now also produce dedicated servers
truelight
parents:
2299
diff
changeset
|
223 |
endif |
0 | 224 |
|
3380
f473785f812c
(svn r4183) -Codechange: [Makefile]: removed MANUAL_CONFIG as it's not used anymore
bjarni
parents:
3355
diff
changeset
|
225 |
ifdef WITH_SDL |
3406
514eef372355
(svn r4217) Replace SDL-CONFIG and LIBPNG-CONFIG with SDL_CONFIG and LIBPNG_CONFIG
peter1138
parents:
3389
diff
changeset
|
226 |
ifndef SDL_CONFIG |
514eef372355
(svn r4217) Replace SDL-CONFIG and LIBPNG-CONFIG with SDL_CONFIG and LIBPNG_CONFIG
peter1138
parents:
3389
diff
changeset
|
227 |
$(error WITH_SDL can't be used when SDL_CONFIG is not set. Edit Makefile.config to correct this) |
3380
f473785f812c
(svn r4183) -Codechange: [Makefile]: removed MANUAL_CONFIG as it's not used anymore
bjarni
parents:
3355
diff
changeset
|
228 |
endif |
f473785f812c
(svn r4183) -Codechange: [Makefile]: removed MANUAL_CONFIG as it's not used anymore
bjarni
parents:
3355
diff
changeset
|
229 |
endif |
f473785f812c
(svn r4183) -Codechange: [Makefile]: removed MANUAL_CONFIG as it's not used anymore
bjarni
parents:
3355
diff
changeset
|
230 |
|
f473785f812c
(svn r4183) -Codechange: [Makefile]: removed MANUAL_CONFIG as it's not used anymore
bjarni
parents:
3355
diff
changeset
|
231 |
ifdef WITH_PNG |
3406
514eef372355
(svn r4217) Replace SDL-CONFIG and LIBPNG-CONFIG with SDL_CONFIG and LIBPNG_CONFIG
peter1138
parents:
3389
diff
changeset
|
232 |
ifndef LIBPNG_CONFIG |
514eef372355
(svn r4217) Replace SDL-CONFIG and LIBPNG-CONFIG with SDL_CONFIG and LIBPNG_CONFIG
peter1138
parents:
3389
diff
changeset
|
233 |
$(error WITH_PNG can't be used when LIBPNG_CONFIG is not set. Edit Makefile.config to correct this) |
3380
f473785f812c
(svn r4183) -Codechange: [Makefile]: removed MANUAL_CONFIG as it's not used anymore
bjarni
parents:
3355
diff
changeset
|
234 |
endif |
f473785f812c
(svn r4183) -Codechange: [Makefile]: removed MANUAL_CONFIG as it's not used anymore
bjarni
parents:
3355
diff
changeset
|
235 |
endif |
0 | 236 |
|
5108
dc67d70b5a45
(svn r7182) -Feature: Merge utf8 branch. This brings us support for Unicode/UTF-8 and the option for fonts rendered by FreeType. Language changes to come.
peter1138
parents:
5051
diff
changeset
|
237 |
ifdef WITH_FREETYPE |
dc67d70b5a45
(svn r7182) -Feature: Merge utf8 branch. This brings us support for Unicode/UTF-8 and the option for fonts rendered by FreeType. Language changes to come.
peter1138
parents:
5051
diff
changeset
|
238 |
ifndef FREETYPE_CONFIG |
dc67d70b5a45
(svn r7182) -Feature: Merge utf8 branch. This brings us support for Unicode/UTF-8 and the option for fonts rendered by FreeType. Language changes to come.
peter1138
parents:
5051
diff
changeset
|
239 |
$(error WITH_FREETYPE can't be used when FREETYPE_CONFIG is not set. Edit Makefile.config to correct this) |
dc67d70b5a45
(svn r7182) -Feature: Merge utf8 branch. This brings us support for Unicode/UTF-8 and the option for fonts rendered by FreeType. Language changes to come.
peter1138
parents:
5051
diff
changeset
|
240 |
endif |
dc67d70b5a45
(svn r7182) -Feature: Merge utf8 branch. This brings us support for Unicode/UTF-8 and the option for fonts rendered by FreeType. Language changes to come.
peter1138
parents:
5051
diff
changeset
|
241 |
endif |
dc67d70b5a45
(svn r7182) -Feature: Merge utf8 branch. This brings us support for Unicode/UTF-8 and the option for fonts rendered by FreeType. Language changes to come.
peter1138
parents:
5051
diff
changeset
|
242 |
|
5117
a4a7fd847b77
(svn r7196) -Feature: use fontconfig so one can set the font family name in openttd.cfg instead of the full path to the font.
rubidium
parents:
5108
diff
changeset
|
243 |
ifdef WITH_FONTCONFIG |
a4a7fd847b77
(svn r7196) -Feature: use fontconfig so one can set the font family name in openttd.cfg instead of the full path to the font.
rubidium
parents:
5108
diff
changeset
|
244 |
ifndef FONTCONFIG_CONFIG |
a4a7fd847b77
(svn r7196) -Feature: use fontconfig so one can set the font family name in openttd.cfg instead of the full path to the font.
rubidium
parents:
5108
diff
changeset
|
245 |
$(error WITH_FONTCONFIG can't be used when FONTOCNFIG_CONFIG is not set. Edit Makefile.config to correct this) |
a4a7fd847b77
(svn r7196) -Feature: use fontconfig so one can set the font family name in openttd.cfg instead of the full path to the font.
rubidium
parents:
5108
diff
changeset
|
246 |
endif |
a4a7fd847b77
(svn r7196) -Feature: use fontconfig so one can set the font family name in openttd.cfg instead of the full path to the font.
rubidium
parents:
5108
diff
changeset
|
247 |
endif |
a4a7fd847b77
(svn r7196) -Feature: use fontconfig so one can set the font family name in openttd.cfg instead of the full path to the font.
rubidium
parents:
5108
diff
changeset
|
248 |
|
0 | 249 |
############################################################################## |
250 |
# |
|
251 |
# Compiler configuration |
|
252 |
# |
|
253 |
||
254 |
# Executable file extension |
|
255 |
ifdef WIN32 |
|
5305
e07957fe871e
(svn r7461) -Fix: [FS#262] Add support for building with GCC on OS/2 (psmedley)
Darkvater
parents:
5237
diff
changeset
|
256 |
EXE=.exe |
0 | 257 |
else |
5305
e07957fe871e
(svn r7461) -Fix: [FS#262] Add support for building with GCC on OS/2 (psmedley)
Darkvater
parents:
5237
diff
changeset
|
258 |
ifdef OS2 |
e07957fe871e
(svn r7461) -Fix: [FS#262] Add support for building with GCC on OS/2 (psmedley)
Darkvater
parents:
5237
diff
changeset
|
259 |
EXE=.exe |
e07957fe871e
(svn r7461) -Fix: [FS#262] Add support for building with GCC on OS/2 (psmedley)
Darkvater
parents:
5237
diff
changeset
|
260 |
else |
e07957fe871e
(svn r7461) -Fix: [FS#262] Add support for building with GCC on OS/2 (psmedley)
Darkvater
parents:
5237
diff
changeset
|
261 |
EXE= |
e07957fe871e
(svn r7461) -Fix: [FS#262] Add support for building with GCC on OS/2 (psmedley)
Darkvater
parents:
5237
diff
changeset
|
262 |
endif |
0 | 263 |
endif |
264 |
||
265 |
# Set output executable names |
|
32 | 266 |
TTD=openttd$(EXE) |
157
dd017fa3bad8
(svn r158) -Fix: make endianess check 100% accurate (hopefully ;))
truelight
parents:
126
diff
changeset
|
267 |
ENDIAN_CHECK=endian_check$(EXE) |
0 | 268 |
STRGEN=strgen/strgen$(EXE) |
269 |
OSXAPP="OpenTTD.app" |
|
270 |
||
271 |
ifdef RELEASE |
|
272 |
REV:=$(RELEASE) |
|
273 |
else |
|
3994
6d4a3d6db5e3
(svn r5197) - Use svn info to automatically find the last modified revision number and get branch information and place it in the revision string. Increase NETWORK_REVISION_LENGTH to accommodate the branch tag.
peter1138
parents:
3907
diff
changeset
|
274 |
ifeq ($(shell if test -d .svn; then echo 1; fi), 1) |
4135
b1cc6e0fd09e
(svn r5493) -Fix: 'grep -o' isn't supported on all targets. 'sed' is, so use thatone (tokai)
truelight
parents:
4120
diff
changeset
|
275 |
REV_MODIFIED := $(shell svnversion . | sed -n 's/.*\(M\).*/\1/p' ) |
3994
6d4a3d6db5e3
(svn r5197) - Use svn info to automatically find the last modified revision number and get branch information and place it in the revision string. Increase NETWORK_REVISION_LENGTH to accommodate the branch tag.
peter1138
parents:
3907
diff
changeset
|
276 |
REV := $(shell LC_ALL=C svn info | awk '/^URL:.*branch/ { BRANCH="-"a[split($$2, a, "/")] } /^Last Changed Rev:/ { REV="r"$$4"$(REV_MODIFIED)" } END { print REV BRANCH }') |
6d4a3d6db5e3
(svn r5197) - Use svn info to automatically find the last modified revision number and get branch information and place it in the revision string. Increase NETWORK_REVISION_LENGTH to accommodate the branch tag.
peter1138
parents:
3907
diff
changeset
|
277 |
endif |
0 | 278 |
endif |
279 |
||
3900
4984308f9125
(svn r4987) Feature: Merged YAPF into trunk. Thanks to devs for continuous support and users for testing.
KUDr
parents:
3866
diff
changeset
|
280 |
# define flag to use for -lrt (some OSes overwrites this later for compatibility) |
4984308f9125
(svn r4987) Feature: Merged YAPF into trunk. Thanks to devs for continuous support and users for testing.
KUDr
parents:
3866
diff
changeset
|
281 |
ifndef LRT |
4984308f9125
(svn r4987) Feature: Merged YAPF into trunk. Thanks to devs for continuous support and users for testing.
KUDr
parents:
3866
diff
changeset
|
282 |
ifndef MORPHOS |
4984308f9125
(svn r4987) Feature: Merged YAPF into trunk. Thanks to devs for continuous support and users for testing.
KUDr
parents:
3866
diff
changeset
|
283 |
LRT:= -lrt |
4984308f9125
(svn r4987) Feature: Merged YAPF into trunk. Thanks to devs for continuous support and users for testing.
KUDr
parents:
3866
diff
changeset
|
284 |
endif |
4984308f9125
(svn r4987) Feature: Merged YAPF into trunk. Thanks to devs for continuous support and users for testing.
KUDr
parents:
3866
diff
changeset
|
285 |
endif |
4984308f9125
(svn r4987) Feature: Merged YAPF into trunk. Thanks to devs for continuous support and users for testing.
KUDr
parents:
3866
diff
changeset
|
286 |
|
0 | 287 |
# 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
|
288 |
BUILDDATE=`date +%d.%m.%y` |
0 | 289 |
|
1692
2587eee1c632
(svn r2196) -Change: updated the Makefile, now it works for crossplatform compiling
TrueLight
parents:
1629
diff
changeset
|
290 |
# 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
|
291 |
ifndef WINDRES |
2587eee1c632
(svn r2196) -Change: updated the Makefile, now it works for crossplatform compiling
TrueLight
parents:
1629
diff
changeset
|
292 |
WINDRES = windres |
2587eee1c632
(svn r2196) -Change: updated the Makefile, now it works for crossplatform compiling
TrueLight
parents:
1629
diff
changeset
|
293 |
endif |
2587eee1c632
(svn r2196) -Change: updated the Makefile, now it works for crossplatform compiling
TrueLight
parents:
1629
diff
changeset
|
294 |
|
3900
4984308f9125
(svn r4987) Feature: Merged YAPF into trunk. Thanks to devs for continuous support and users for testing.
KUDr
parents:
3866
diff
changeset
|
295 |
# Check that CXX is defined. If not, then it's g++ |
4984308f9125
(svn r4987) Feature: Merged YAPF into trunk. Thanks to devs for continuous support and users for testing.
KUDr
parents:
3866
diff
changeset
|
296 |
ifndef CXX |
4984308f9125
(svn r4987) Feature: Merged YAPF into trunk. Thanks to devs for continuous support and users for testing.
KUDr
parents:
3866
diff
changeset
|
297 |
CXX = g++ |
4984308f9125
(svn r4987) Feature: Merged YAPF into trunk. Thanks to devs for continuous support and users for testing.
KUDr
parents:
3866
diff
changeset
|
298 |
endif |
4984308f9125
(svn r4987) Feature: Merged YAPF into trunk. Thanks to devs for continuous support and users for testing.
KUDr
parents:
3866
diff
changeset
|
299 |
|
4984308f9125
(svn r4987) Feature: Merged YAPF into trunk. Thanks to devs for continuous support and users for testing.
KUDr
parents:
3866
diff
changeset
|
300 |
# Check if CXX_HOST is defined. If not, it is CXX |
4984308f9125
(svn r4987) Feature: Merged YAPF into trunk. Thanks to devs for continuous support and users for testing.
KUDr
parents:
3866
diff
changeset
|
301 |
ifndef CXX_HOST |
4984308f9125
(svn r4987) Feature: Merged YAPF into trunk. Thanks to devs for continuous support and users for testing.
KUDr
parents:
3866
diff
changeset
|
302 |
CXX_HOST = $(CXX) |
4984308f9125
(svn r4987) Feature: Merged YAPF into trunk. Thanks to devs for continuous support and users for testing.
KUDr
parents:
3866
diff
changeset
|
303 |
endif |
4984308f9125
(svn r4987) Feature: Merged YAPF into trunk. Thanks to devs for continuous support and users for testing.
KUDr
parents:
3866
diff
changeset
|
304 |
|
4984308f9125
(svn r4987) Feature: Merged YAPF into trunk. Thanks to devs for continuous support and users for testing.
KUDr
parents:
3866
diff
changeset
|
305 |
# Check if we have a new target |
4094
a83fac319c4e
(svn r5426) - Makefile: Make the configure script work properly for setting target compilers; Set CC_TARGET / CXX_TARGET
peter1138
parents:
3994
diff
changeset
|
306 |
ifndef CXX_TARGET |
a83fac319c4e
(svn r5426) - Makefile: Make the configure script work properly for setting target compilers; Set CC_TARGET / CXX_TARGET
peter1138
parents:
3994
diff
changeset
|
307 |
CXX_TARGET = $(CXX_HOST) |
3900
4984308f9125
(svn r4987) Feature: Merged YAPF into trunk. Thanks to devs for continuous support and users for testing.
KUDr
parents:
3866
diff
changeset
|
308 |
endif |
4984308f9125
(svn r4987) Feature: Merged YAPF into trunk. Thanks to devs for continuous support and users for testing.
KUDr
parents:
3866
diff
changeset
|
309 |
|
1692
2587eee1c632
(svn r2196) -Change: updated the Makefile, now it works for crossplatform compiling
TrueLight
parents:
1629
diff
changeset
|
310 |
# 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
|
311 |
ifndef CC_HOST |
2587eee1c632
(svn r2196) -Change: updated the Makefile, now it works for crossplatform compiling
TrueLight
parents:
1629
diff
changeset
|
312 |
CC_HOST = $(CC) |
2587eee1c632
(svn r2196) -Change: updated the Makefile, now it works for crossplatform compiling
TrueLight
parents:
1629
diff
changeset
|
313 |
endif |
4094
a83fac319c4e
(svn r5426) - Makefile: Make the configure script work properly for setting target compilers; Set CC_TARGET / CXX_TARGET
peter1138
parents:
3994
diff
changeset
|
314 |
|
1692
2587eee1c632
(svn r2196) -Change: updated the Makefile, now it works for crossplatform compiling
TrueLight
parents:
1629
diff
changeset
|
315 |
ifndef CFLAGS_HOST |
2587eee1c632
(svn r2196) -Change: updated the Makefile, now it works for crossplatform compiling
TrueLight
parents:
1629
diff
changeset
|
316 |
CFLAGS_HOST = $(BASECFLAGS) |
2587eee1c632
(svn r2196) -Change: updated the Makefile, now it works for crossplatform compiling
TrueLight
parents:
1629
diff
changeset
|
317 |
endif |
0 | 318 |
|
3141
e840fc2a0f53
(svn r3759) -Fix: [OSX] don't set CC_HOST to i686 gcc when compiling universal binaries on PPC without any Makefile.config. Introduced in 3674 (before that i686 used PPC as CC_HOST, but nobody noticed that)
bjarni
parents:
3085
diff
changeset
|
319 |
# Check if we have a new target |
4094
a83fac319c4e
(svn r5426) - Makefile: Make the configure script work properly for setting target compilers; Set CC_TARGET / CXX_TARGET
peter1138
parents:
3994
diff
changeset
|
320 |
ifndef CC_TARGET |
a83fac319c4e
(svn r5426) - Makefile: Make the configure script work properly for setting target compilers; Set CC_TARGET / CXX_TARGET
peter1138
parents:
3994
diff
changeset
|
321 |
CC_TARGET = $(CC_HOST) |
3141
e840fc2a0f53
(svn r3759) -Fix: [OSX] don't set CC_HOST to i686 gcc when compiling universal binaries on PPC without any Makefile.config. Introduced in 3674 (before that i686 used PPC as CC_HOST, but nobody noticed that)
bjarni
parents:
3085
diff
changeset
|
322 |
endif |
0 | 323 |
|
4113
ddc88b9e6fd9
(svn r5456) -Fix: detect the version of the TARGET, not the HOST please
truelight
parents:
4094
diff
changeset
|
324 |
CC_VERSION = $(shell $(CC_TARGET) -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
|
325 |
|
53e669371277
(svn r1553) Check which gcc version is present and only set availible compiler flags
tron
parents:
1051
diff
changeset
|
326 |
# 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
|
327 |
# 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
|
328 |
ifeq ($(shell expr $(CC_VERSION) \>= 29), 1) |
3900
4984308f9125
(svn r4987) Feature: Merged YAPF into trunk. Thanks to devs for continuous support and users for testing.
KUDr
parents:
3866
diff
changeset
|
329 |
CFLAGS += -O -Wall -Wno-multichar -Wsign-compare -Wundef |
4984308f9125
(svn r4987) Feature: Merged YAPF into trunk. Thanks to devs for continuous support and users for testing.
KUDr
parents:
3866
diff
changeset
|
330 |
CC_CFLAGS += -Wstrict-prototypes |
1324
ff8b7799b44f
(svn r1828) New warning flag especially for truelight (:<
tron
parents:
1317
diff
changeset
|
331 |
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
|
332 |
endif |
2240
8f18d87a4b5c
(svn r2760) Remove stale comments, long unused stuff and simplify some checks
tron
parents:
2236
diff
changeset
|
333 |
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
|
334 |
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
|
335 |
endif |
2240
8f18d87a4b5c
(svn r2760) Remove stale comments, long unused stuff and simplify some checks
tron
parents:
2236
diff
changeset
|
336 |
ifeq ($(shell expr $(CC_VERSION) \>= 34), 1) |
3900
4984308f9125
(svn r4987) Feature: Merged YAPF into trunk. Thanks to devs for continuous support and users for testing.
KUDr
parents:
3866
diff
changeset
|
337 |
CC_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
|
338 |
endif |
53e669371277
(svn r1553) Check which gcc version is present and only set availible compiler flags
tron
parents:
1051
diff
changeset
|
339 |
|
1240
90b225e69c23
(svn r1744) DEBUG and PROFILE can be used at the same time.
tron
parents:
1211
diff
changeset
|
340 |
ifdef DEBUG |
1479
3bb687fbe344
(svn r1983) Introduce multiple compile time debug levels
tron
parents:
1476
diff
changeset
|
341 |
ifeq ($(shell expr $(DEBUG) \>= 1), 1) |
3bb687fbe344
(svn r1983) Introduce multiple compile time debug levels
tron
parents:
1476
diff
changeset
|
342 |
CFLAGS += -g -D_DEBUG |
3bb687fbe344
(svn r1983) Introduce multiple compile time debug levels
tron
parents:
1476
diff
changeset
|
343 |
endif |
3bb687fbe344
(svn r1983) Introduce multiple compile time debug levels
tron
parents:
1476
diff
changeset
|
344 |
ifeq ($(shell expr $(DEBUG) \>= 2), 1) |
3bb687fbe344
(svn r1983) Introduce multiple compile time debug levels
tron
parents:
1476
diff
changeset
|
345 |
CFLAGS += -fno-inline |
3bb687fbe344
(svn r1983) Introduce multiple compile time debug levels
tron
parents:
1476
diff
changeset
|
346 |
endif |
3bb687fbe344
(svn r1983) Introduce multiple compile time debug levels
tron
parents:
1476
diff
changeset
|
347 |
ifeq ($(shell expr $(DEBUG) \>= 3), 1) |
3bb687fbe344
(svn r1983) Introduce multiple compile time debug levels
tron
parents:
1476
diff
changeset
|
348 |
CFLAGS += -O0 |
3bb687fbe344
(svn r1983) Introduce multiple compile time debug levels
tron
parents:
1476
diff
changeset
|
349 |
endif |
1240
90b225e69c23
(svn r1744) DEBUG and PROFILE can be used at the same time.
tron
parents:
1211
diff
changeset
|
350 |
endif |
90b225e69c23
(svn r1744) DEBUG and PROFILE can be used at the same time.
tron
parents:
1211
diff
changeset
|
351 |
|
90b225e69c23
(svn r1744) DEBUG and PROFILE can be used at the same time.
tron
parents:
1211
diff
changeset
|
352 |
ifdef PROFILE |
90b225e69c23
(svn r1744) DEBUG and PROFILE can be used at the same time.
tron
parents:
1211
diff
changeset
|
353 |
CFLAGS += -pg |
90b225e69c23
(svn r1744) DEBUG and PROFILE can be used at the same time.
tron
parents:
1211
diff
changeset
|
354 |
LDFLAGS += -pg |
3031
bd5cae1efa8c
(svn r3611) -Feature: [OSX profiling] Shark (Xcode's profiling tool) can now relate CPU usage to lines in the source files
bjarni
parents:
2997
diff
changeset
|
355 |
ifdef OSX |
bd5cae1efa8c
(svn r3611) -Feature: [OSX profiling] Shark (Xcode's profiling tool) can now relate CPU usage to lines in the source files
bjarni
parents:
2997
diff
changeset
|
356 |
# Shark (Xcode's profiling tool) needs -g to relate CPU usage to line numbers in the source code |
bd5cae1efa8c
(svn r3611) -Feature: [OSX profiling] Shark (Xcode's profiling tool) can now relate CPU usage to lines in the source files
bjarni
parents:
2997
diff
changeset
|
357 |
BASECFLAGS += -g |
bd5cae1efa8c
(svn r3611) -Feature: [OSX profiling] Shark (Xcode's profiling tool) can now relate CPU usage to lines in the source files
bjarni
parents:
2997
diff
changeset
|
358 |
endif |
1240
90b225e69c23
(svn r1744) DEBUG and PROFILE can be used at the same time.
tron
parents:
1211
diff
changeset
|
359 |
endif |
90b225e69c23
(svn r1744) DEBUG and PROFILE can be used at the same time.
tron
parents:
1211
diff
changeset
|
360 |
|
0 | 361 |
CDEFS=-DWITH_REV |
362 |
||
1240
90b225e69c23
(svn r1744) DEBUG and PROFILE can be used at the same time.
tron
parents:
1211
diff
changeset
|
363 |
ifndef DEBUG |
90b225e69c23
(svn r1744) DEBUG and PROFILE can be used at the same time.
tron
parents:
1211
diff
changeset
|
364 |
ifndef PROFILE |
0 | 365 |
# Release mode |
366 |
ifndef MORPHOS |
|
1810
bf33a29287e5
(svn r2314) - Feature: [ 1187490 ] Patches for building on IRIX (jgilje)
Darkvater
parents:
1722
diff
changeset
|
367 |
ifndef IRIX |
0 | 368 |
# automatical strip breaks under morphos |
3907
61074b916295
(svn r4997) -Fix: [OSX] reverted the OSX part of rev 4994 as it caused dyld (lib) crashes
bjarni
parents:
3906
diff
changeset
|
369 |
ifdef OSX |
61074b916295
(svn r4997) -Fix: [OSX] reverted the OSX part of rev 4994 as it caused dyld (lib) crashes
bjarni
parents:
3906
diff
changeset
|
370 |
# it appears that OSX can't handle automated stripping when mixing C and C++ |
61074b916295
(svn r4997) -Fix: [OSX] reverted the OSX part of rev 4994 as it caused dyld (lib) crashes
bjarni
parents:
3906
diff
changeset
|
371 |
# we will do it manually in the target OSX_STRIP |
61074b916295
(svn r4997) -Fix: [OSX] reverted the OSX part of rev 4994 as it caused dyld (lib) crashes
bjarni
parents:
3906
diff
changeset
|
372 |
OSX_STRIP:=OSX_STRIP |
61074b916295
(svn r4997) -Fix: [OSX] reverted the OSX part of rev 4994 as it caused dyld (lib) crashes
bjarni
parents:
3906
diff
changeset
|
373 |
else |
0 | 374 |
LDFLAGS += -s |
375 |
endif |
|
376 |
endif |
|
1810
bf33a29287e5
(svn r2314) - Feature: [ 1187490 ] Patches for building on IRIX (jgilje)
Darkvater
parents:
1722
diff
changeset
|
377 |
endif |
3907
61074b916295
(svn r4997) -Fix: [OSX] reverted the OSX part of rev 4994 as it caused dyld (lib) crashes
bjarni
parents:
3906
diff
changeset
|
378 |
endif |
0 | 379 |
|
380 |
ifdef OSX |
|
381 |
# 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
|
382 |
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 | 383 |
else |
384 |
ifdef MORPHOS |
|
2356 | 385 |
BASECFLAGS += -I/gg/os-include -O2 -noixemul -fstrict-aliasing -fexpensive-optimizations |
1291 | 386 |
BASECFLAGS += -mcpu=604 -fno-inline -mstring -mmultiple |
0 | 387 |
else |
1169
30e8657f61d0
(svn r1671) Remove WARNING_DISPLAY, because it contained no warning, but an optimization flag
tron
parents:
1168
diff
changeset
|
388 |
BASECFLAGS += -O2 |
0 | 389 |
endif |
390 |
ifndef PROFILE |
|
1810
bf33a29287e5
(svn r2314) - Feature: [ 1187490 ] Patches for building on IRIX (jgilje)
Darkvater
parents:
1722
diff
changeset
|
391 |
ifndef IRIX |
0 | 392 |
BASECFLAGS += -fomit-frame-pointer |
393 |
endif |
|
394 |
endif |
|
395 |
endif |
|
1810
bf33a29287e5
(svn r2314) - Feature: [ 1187490 ] Patches for building on IRIX (jgilje)
Darkvater
parents:
1722
diff
changeset
|
396 |
endif |
0 | 397 |
|
398 |
ifdef STATIC |
|
399 |
ifndef OSX # OSX can't build static if -static flag is used |
|
400 |
LDFLAGS += -static |
|
401 |
endif |
|
402 |
endif |
|
403 |
||
798 | 404 |
# If building on MingW don't link with Cygwin libs |
0 | 405 |
ifdef WIN32 |
798 | 406 |
ifdef CYGWIN |
407 |
BASECFLAGS += -mwin32 |
|
408 |
LDFLAGS += -mwin32 |
|
409 |
endif |
|
0 | 410 |
ifdef MINGW |
411 |
BASECFLAGS += -mno-cygwin |
|
412 |
LDFLAGS += -mno-cygwin |
|
3900
4984308f9125
(svn r4987) Feature: Merged YAPF into trunk. Thanks to devs for continuous support and users for testing.
KUDr
parents:
3866
diff
changeset
|
413 |
# -lrt fails with MINGW, so we disable it |
4984308f9125
(svn r4987) Feature: Merged YAPF into trunk. Thanks to devs for continuous support and users for testing.
KUDr
parents:
3866
diff
changeset
|
414 |
LRT:= |
0 | 415 |
endif |
416 |
endif |
|
417 |
||
418 |
CFLAGS += $(BASECFLAGS) |
|
419 |
||
420 |
ifdef UNIX |
|
421 |
CDEFS += -DUNIX |
|
422 |
endif |
|
423 |
||
421
0b9bdcdfe0c5
(svn r619) Add the necessary bits to make building under BeOS using GNU Make work
tron
parents:
413
diff
changeset
|
424 |
ifdef BEOS |
0b9bdcdfe0c5
(svn r619) Add the necessary bits to make building under BeOS using GNU Make work
tron
parents:
413
diff
changeset
|
425 |
CDEFS += -DBEOS |
2497
1c8460570c0d
(svn r3023) -Fix [BeOS] fixed compilation on BeOS R5 (MYOB)
bjarni
parents:
2496
diff
changeset
|
426 |
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
|
427 |
ifdef WITH_NETWORK |
0b9bdcdfe0c5
(svn r619) Add the necessary bits to make building under BeOS using GNU Make work
tron
parents:
413
diff
changeset
|
428 |
ifdef BEOS_NET_SERVER |
1051 | 429 |
CDEFS += -DBEOS_NET_SERVER |
2497
1c8460570c0d
(svn r3023) -Fix [BeOS] fixed compilation on BeOS R5 (MYOB)
bjarni
parents:
2496
diff
changeset
|
430 |
LDFLAGS += -lnet |
1051 | 431 |
else |
2497
1c8460570c0d
(svn r3023) -Fix [BeOS] fixed compilation on BeOS R5 (MYOB)
bjarni
parents:
2496
diff
changeset
|
432 |
# BONE needs a few more libraries than R5 |
1051 | 433 |
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
|
434 |
endif |
0b9bdcdfe0c5
(svn r619) Add the necessary bits to make building under BeOS using GNU Make work
tron
parents:
413
diff
changeset
|
435 |
endif |
0b9bdcdfe0c5
(svn r619) Add the necessary bits to make building under BeOS using GNU Make work
tron
parents:
413
diff
changeset
|
436 |
endif |
0b9bdcdfe0c5
(svn r619) Add the necessary bits to make building under BeOS using GNU Make work
tron
parents:
413
diff
changeset
|
437 |
|
1164
01c12c2f1973
(svn r1666) Move some MorphOS compile flags to a place where they actually belong
tron
parents:
1163
diff
changeset
|
438 |
ifdef MORPHOS |
1291 | 439 |
# -Wstrict-prototypes generates much noise because of system headers |
3900
4984308f9125
(svn r4987) Feature: Merged YAPF into trunk. Thanks to devs for continuous support and users for testing.
KUDr
parents:
3866
diff
changeset
|
440 |
# and it also uses 4-byte bools in the C++ ABI, so C bools need to be that size as well for YAPF to work |
4984308f9125
(svn r4987) Feature: Merged YAPF into trunk. Thanks to devs for continuous support and users for testing.
KUDr
parents:
3866
diff
changeset
|
441 |
CFLAGS += -Wno-strict-prototypes -DFOUR_BYTE_BOOL |
1164
01c12c2f1973
(svn r1666) Move some MorphOS compile flags to a place where they actually belong
tron
parents:
1163
diff
changeset
|
442 |
endif |
01c12c2f1973
(svn r1666) Move some MorphOS compile flags to a place where they actually belong
tron
parents:
1163
diff
changeset
|
443 |
|
446
20304ea8e94e
(svn r655) Add the necessary bits to make building on SunOS/Solaris work
tron
parents:
421
diff
changeset
|
444 |
ifdef SUNOS |
20304ea8e94e
(svn r655) Add the necessary bits to make building on SunOS/Solaris work
tron
parents:
421
diff
changeset
|
445 |
CDEFS += -DSUNOS |
20304ea8e94e
(svn r655) Add the necessary bits to make building on SunOS/Solaris work
tron
parents:
421
diff
changeset
|
446 |
ifdef WITH_NETWORK |
20304ea8e94e
(svn r655) Add the necessary bits to make building on SunOS/Solaris work
tron
parents:
421
diff
changeset
|
447 |
LDFLAGS += -lnsl -lsocket |
20304ea8e94e
(svn r655) Add the necessary bits to make building on SunOS/Solaris work
tron
parents:
421
diff
changeset
|
448 |
endif |
20304ea8e94e
(svn r655) Add the necessary bits to make building on SunOS/Solaris work
tron
parents:
421
diff
changeset
|
449 |
endif |
20304ea8e94e
(svn r655) Add the necessary bits to make building on SunOS/Solaris work
tron
parents:
421
diff
changeset
|
450 |
|
2500
e2b13f720a94
(svn r3026) -Fix: [OSX] fixed bug that prevented dedicated servers from compiling (introduced in r3022)
bjarni
parents:
2497
diff
changeset
|
451 |
# 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
|
452 |
ifdef DEDICATED |
e2b13f720a94
(svn r3026) -Fix: [OSX] fixed bug that prevented dedicated servers from compiling (introduced in r3022)
bjarni
parents:
2497
diff
changeset
|
453 |
CDEFS += -DDEDICATED |
e2b13f720a94
(svn r3026) -Fix: [OSX] fixed bug that prevented dedicated servers from compiling (introduced in r3022)
bjarni
parents:
2497
diff
changeset
|
454 |
endif |
e2b13f720a94
(svn r3026) -Fix: [OSX] fixed bug that prevented dedicated servers from compiling (introduced in r3022)
bjarni
parents:
2497
diff
changeset
|
455 |
|
0 | 456 |
# SDL config |
457 |
ifdef WITH_SDL |
|
458 |
CDEFS += -DWITH_SDL |
|
5050
b928a1036b22
(svn r7100) Evaluate the necessary flags for SDL once per make run, not every time the CFLAGS/LIBS variables are used
tron
parents:
4800
diff
changeset
|
459 |
CCFLAGS_SDL := $(shell $(SDL_CONFIG) --cflags) |
b928a1036b22
(svn r7100) Evaluate the necessary flags for SDL once per make run, not every time the CFLAGS/LIBS variables are used
tron
parents:
4800
diff
changeset
|
460 |
CFLAGS += $(CCFLAGS_SDL) |
0 | 461 |
ifdef STATIC |
5050
b928a1036b22
(svn r7100) Evaluate the necessary flags for SDL once per make run, not every time the CFLAGS/LIBS variables are used
tron
parents:
4800
diff
changeset
|
462 |
LDFLAGS_SDL := $(shell $(SDL_CONFIG) --static-libs) |
0 | 463 |
else |
5050
b928a1036b22
(svn r7100) Evaluate the necessary flags for SDL once per make run, not every time the CFLAGS/LIBS variables are used
tron
parents:
4800
diff
changeset
|
464 |
LDFLAGS_SDL := $(shell $(SDL_CONFIG) --libs) |
0 | 465 |
endif |
5050
b928a1036b22
(svn r7100) Evaluate the necessary flags for SDL once per make run, not every time the CFLAGS/LIBS variables are used
tron
parents:
4800
diff
changeset
|
466 |
LIBS += $(LDFLAGS_SDL) |
0 | 467 |
endif |
468 |
||
469 |
# zlib config |
|
470 |
ifdef WITH_ZLIB |
|
3389
f26c7fc263a5
(svn r4197) reentered STATIC_ZLIB_PATH (removed in 4183) since it turned out that it's used after all
bjarni
parents:
3380
diff
changeset
|
471 |
CDEFS += -DWITH_ZLIB |
f26c7fc263a5
(svn r4197) reentered STATIC_ZLIB_PATH (removed in 4183) since it turned out that it's used after all
bjarni
parents:
3380
diff
changeset
|
472 |
ifdef STATIC |
f26c7fc263a5
(svn r4197) reentered STATIC_ZLIB_PATH (removed in 4183) since it turned out that it's used after all
bjarni
parents:
3380
diff
changeset
|
473 |
ifdef OSX |
f26c7fc263a5
(svn r4197) reentered STATIC_ZLIB_PATH (removed in 4183) since it turned out that it's used after all
bjarni
parents:
3380
diff
changeset
|
474 |
# OSX links dynamically to zlib, even in static builds since it's always present in the system |
f26c7fc263a5
(svn r4197) reentered STATIC_ZLIB_PATH (removed in 4183) since it turned out that it's used after all
bjarni
parents:
3380
diff
changeset
|
475 |
LIBS += -lz |
f26c7fc263a5
(svn r4197) reentered STATIC_ZLIB_PATH (removed in 4183) since it turned out that it's used after all
bjarni
parents:
3380
diff
changeset
|
476 |
else |
f26c7fc263a5
(svn r4197) reentered STATIC_ZLIB_PATH (removed in 4183) since it turned out that it's used after all
bjarni
parents:
3380
diff
changeset
|
477 |
LIBS += $(STATIC_ZLIB_PATH) |
f26c7fc263a5
(svn r4197) reentered STATIC_ZLIB_PATH (removed in 4183) since it turned out that it's used after all
bjarni
parents:
3380
diff
changeset
|
478 |
endif |
f26c7fc263a5
(svn r4197) reentered STATIC_ZLIB_PATH (removed in 4183) since it turned out that it's used after all
bjarni
parents:
3380
diff
changeset
|
479 |
else |
f26c7fc263a5
(svn r4197) reentered STATIC_ZLIB_PATH (removed in 4183) since it turned out that it's used after all
bjarni
parents:
3380
diff
changeset
|
480 |
LIBS += -lz |
f26c7fc263a5
(svn r4197) reentered STATIC_ZLIB_PATH (removed in 4183) since it turned out that it's used after all
bjarni
parents:
3380
diff
changeset
|
481 |
endif |
0 | 482 |
endif |
483 |
||
484 |
# libpng config |
|
485 |
ifdef WITH_PNG |
|
486 |
CDEFS += -DWITH_PNG |
|
5051
0ea8270d080b
(svn r7101) Evaluate the necessary flags for libpng once per make run, not every time the CFLAGS/LIBS variables are used
tron
parents:
5050
diff
changeset
|
487 |
CCFLAGS_PNG := $(shell $(LIBPNG_CONFIG) --cppflags --I_opts) |
0ea8270d080b
(svn r7101) Evaluate the necessary flags for libpng once per make run, not every time the CFLAGS/LIBS variables are used
tron
parents:
5050
diff
changeset
|
488 |
CFLAGS += $(CCFLAGS_PNG) |
551
48dc69ef0e94
(svn r951) Makefile: fixed missing flag for libpng, which prevented lib detection if SDL was not used
bjarni
parents:
549
diff
changeset
|
489 |
|
0 | 490 |
# seems like older libpng versions are broken and need this |
491 |
PNGCONFIG_FLAGS = --ldflags --libs |
|
492 |
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
|
493 |
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
|
494 |
# Seems like we need a tiny hack for OSX static to work |
5051
0ea8270d080b
(svn r7101) Evaluate the necessary flags for libpng once per make run, not every time the CFLAGS/LIBS variables are used
tron
parents:
5050
diff
changeset
|
495 |
LDFLAGS_PNG := $(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
|
496 |
else |
5051
0ea8270d080b
(svn r7101) Evaluate the necessary flags for libpng once per make run, not every time the CFLAGS/LIBS variables are used
tron
parents:
5050
diff
changeset
|
497 |
LDFLAGS_PNG := $(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
|
498 |
endif |
0 | 499 |
else |
5051
0ea8270d080b
(svn r7101) Evaluate the necessary flags for libpng once per make run, not every time the CFLAGS/LIBS variables are used
tron
parents:
5050
diff
changeset
|
500 |
LDFLAGS_PNG := $(shell $(LIBPNG_CONFIG) --L_opts $(PNGCONFIG_FLAGS)) |
0 | 501 |
endif |
5051
0ea8270d080b
(svn r7101) Evaluate the necessary flags for libpng once per make run, not every time the CFLAGS/LIBS variables are used
tron
parents:
5050
diff
changeset
|
502 |
LIBS += $(LDFLAGS_PNG) |
0 | 503 |
endif |
504 |
||
3900
4984308f9125
(svn r4987) Feature: Merged YAPF into trunk. Thanks to devs for continuous support and users for testing.
KUDr
parents:
3866
diff
changeset
|
505 |
# use std C++ lib: |
4984308f9125
(svn r4987) Feature: Merged YAPF into trunk. Thanks to devs for continuous support and users for testing.
KUDr
parents:
3866
diff
changeset
|
506 |
LIBS += -lstdc++ |
4984308f9125
(svn r4987) Feature: Merged YAPF into trunk. Thanks to devs for continuous support and users for testing.
KUDr
parents:
3866
diff
changeset
|
507 |
ifndef MINGW |
4984308f9125
(svn r4987) Feature: Merged YAPF into trunk. Thanks to devs for continuous support and users for testing.
KUDr
parents:
3866
diff
changeset
|
508 |
LIBS += -lc |
4984308f9125
(svn r4987) Feature: Merged YAPF into trunk. Thanks to devs for continuous support and users for testing.
KUDr
parents:
3866
diff
changeset
|
509 |
endif |
4984308f9125
(svn r4987) Feature: Merged YAPF into trunk. Thanks to devs for continuous support and users for testing.
KUDr
parents:
3866
diff
changeset
|
510 |
|
5108
dc67d70b5a45
(svn r7182) -Feature: Merge utf8 branch. This brings us support for Unicode/UTF-8 and the option for fonts rendered by FreeType. Language changes to come.
peter1138
parents:
5051
diff
changeset
|
511 |
# freetype config |
dc67d70b5a45
(svn r7182) -Feature: Merge utf8 branch. This brings us support for Unicode/UTF-8 and the option for fonts rendered by FreeType. Language changes to come.
peter1138
parents:
5051
diff
changeset
|
512 |
ifdef WITH_FREETYPE |
dc67d70b5a45
(svn r7182) -Feature: Merge utf8 branch. This brings us support for Unicode/UTF-8 and the option for fonts rendered by FreeType. Language changes to come.
peter1138
parents:
5051
diff
changeset
|
513 |
CDEFS += -DWITH_FREETYPE |
dc67d70b5a45
(svn r7182) -Feature: Merge utf8 branch. This brings us support for Unicode/UTF-8 and the option for fonts rendered by FreeType. Language changes to come.
peter1138
parents:
5051
diff
changeset
|
514 |
CCFLAGS_FREETYPE := $(shell $(FREETYPE_CONFIG) --cflags) |
dc67d70b5a45
(svn r7182) -Feature: Merge utf8 branch. This brings us support for Unicode/UTF-8 and the option for fonts rendered by FreeType. Language changes to come.
peter1138
parents:
5051
diff
changeset
|
515 |
LDFLAGS_FREETYPE := $(shell $(FREETYPE_CONFIG) --libs) |
5436
c60526841627
(svn r8643) [0.5] -Fix: [OSX] link statically to freetype when STATIC is set
bjarni
parents:
5365
diff
changeset
|
516 |
|
c60526841627
(svn r8643) [0.5] -Fix: [OSX] link statically to freetype when STATIC is set
bjarni
parents:
5365
diff
changeset
|
517 |
ifdef STATIC |
c60526841627
(svn r8643) [0.5] -Fix: [OSX] link statically to freetype when STATIC is set
bjarni
parents:
5365
diff
changeset
|
518 |
ifdef OSX |
c60526841627
(svn r8643) [0.5] -Fix: [OSX] link statically to freetype when STATIC is set
bjarni
parents:
5365
diff
changeset
|
519 |
# OSX needs a special lib setting when linking statically |
c60526841627
(svn r8643) [0.5] -Fix: [OSX] link statically to freetype when STATIC is set
bjarni
parents:
5365
diff
changeset
|
520 |
LDFLAGS_FREETYPE := $(shell $(FREETYPE_CONFIG) --prefix)/lib/libfreetype.a |
c60526841627
(svn r8643) [0.5] -Fix: [OSX] link statically to freetype when STATIC is set
bjarni
parents:
5365
diff
changeset
|
521 |
endif |
c60526841627
(svn r8643) [0.5] -Fix: [OSX] link statically to freetype when STATIC is set
bjarni
parents:
5365
diff
changeset
|
522 |
endif |
c60526841627
(svn r8643) [0.5] -Fix: [OSX] link statically to freetype when STATIC is set
bjarni
parents:
5365
diff
changeset
|
523 |
|
5108
dc67d70b5a45
(svn r7182) -Feature: Merge utf8 branch. This brings us support for Unicode/UTF-8 and the option for fonts rendered by FreeType. Language changes to come.
peter1138
parents:
5051
diff
changeset
|
524 |
CFLAGS += $(CCFLAGS_FREETYPE) |
dc67d70b5a45
(svn r7182) -Feature: Merge utf8 branch. This brings us support for Unicode/UTF-8 and the option for fonts rendered by FreeType. Language changes to come.
peter1138
parents:
5051
diff
changeset
|
525 |
LIBS += $(LDFLAGS_FREETYPE) |
dc67d70b5a45
(svn r7182) -Feature: Merge utf8 branch. This brings us support for Unicode/UTF-8 and the option for fonts rendered by FreeType. Language changes to come.
peter1138
parents:
5051
diff
changeset
|
526 |
endif |
dc67d70b5a45
(svn r7182) -Feature: Merge utf8 branch. This brings us support for Unicode/UTF-8 and the option for fonts rendered by FreeType. Language changes to come.
peter1138
parents:
5051
diff
changeset
|
527 |
|
5117
a4a7fd847b77
(svn r7196) -Feature: use fontconfig so one can set the font family name in openttd.cfg instead of the full path to the font.
rubidium
parents:
5108
diff
changeset
|
528 |
# fontconfig config |
a4a7fd847b77
(svn r7196) -Feature: use fontconfig so one can set the font family name in openttd.cfg instead of the full path to the font.
rubidium
parents:
5108
diff
changeset
|
529 |
ifdef WITH_FONTCONFIG |
a4a7fd847b77
(svn r7196) -Feature: use fontconfig so one can set the font family name in openttd.cfg instead of the full path to the font.
rubidium
parents:
5108
diff
changeset
|
530 |
CDEFS += -DWITH_FONTCONFIG |
a4a7fd847b77
(svn r7196) -Feature: use fontconfig so one can set the font family name in openttd.cfg instead of the full path to the font.
rubidium
parents:
5108
diff
changeset
|
531 |
CCFLAGS_FONTCONFIG := $(shell $(FONTCONFIG_CONFIG) --cflags) |
a4a7fd847b77
(svn r7196) -Feature: use fontconfig so one can set the font family name in openttd.cfg instead of the full path to the font.
rubidium
parents:
5108
diff
changeset
|
532 |
LDFLAGS_FONTCONFIG := $(shell $(FONTCONFIG_CONFIG) --libs) |
5362
4a0088602828
(svn r7662) -Backport from trunk (r7557, r7624):
Darkvater
parents:
5305
diff
changeset
|
533 |
|
4a0088602828
(svn r7662) -Backport from trunk (r7557, r7624):
Darkvater
parents:
5305
diff
changeset
|
534 |
ifdef CUSTOM_FONTCONFIG |
4a0088602828
(svn r7662) -Backport from trunk (r7557, r7624):
Darkvater
parents:
5305
diff
changeset
|
535 |
# To allow usage of non-default libs, such as absolute path to static libs |
4a0088602828
(svn r7662) -Backport from trunk (r7557, r7624):
Darkvater
parents:
5305
diff
changeset
|
536 |
# not stored in Makefile.config |
4a0088602828
(svn r7662) -Backport from trunk (r7557, r7624):
Darkvater
parents:
5305
diff
changeset
|
537 |
LDFLAGS_FONTCONFIG := $(CUSTOM_FONTCONFIG) |
4a0088602828
(svn r7662) -Backport from trunk (r7557, r7624):
Darkvater
parents:
5305
diff
changeset
|
538 |
endif |
4a0088602828
(svn r7662) -Backport from trunk (r7557, r7624):
Darkvater
parents:
5305
diff
changeset
|
539 |
|
5117
a4a7fd847b77
(svn r7196) -Feature: use fontconfig so one can set the font family name in openttd.cfg instead of the full path to the font.
rubidium
parents:
5108
diff
changeset
|
540 |
CFLAGS += $(CCFLAGS_FONTCONFIG) |
a4a7fd847b77
(svn r7196) -Feature: use fontconfig so one can set the font family name in openttd.cfg instead of the full path to the font.
rubidium
parents:
5108
diff
changeset
|
541 |
LIBS += $(LDFLAGS_FONTCONFIG) |
a4a7fd847b77
(svn r7196) -Feature: use fontconfig so one can set the font family name in openttd.cfg instead of the full path to the font.
rubidium
parents:
5108
diff
changeset
|
542 |
endif |
a4a7fd847b77
(svn r7196) -Feature: use fontconfig so one can set the font family name in openttd.cfg instead of the full path to the font.
rubidium
parents:
5108
diff
changeset
|
543 |
|
3409
1f01831f0636
(svn r4220) - Fix (r4219): of course iconv is enabled on >= 10.3 not >; fixed comment (thanks Bjarni)
Darkvater
parents:
3408
diff
changeset
|
544 |
# iconv is enabled defaultly on OSX >= 10.3 |
3313
767d77394c61
(svn r4076) Back out r4074. It doesn't work and leads to make endlessly calling itself. NOTE: Delete Makefile.config to recover.
tron
parents:
3311
diff
changeset
|
545 |
ifdef OSX |
5363
fe172941ea9e
(svn r7664) -Backport from trunk (r7587, r7588, r7600, r7605, r7626, r7629):
Darkvater
parents:
5362
diff
changeset
|
546 |
WITH_ICONV=1 |
fe172941ea9e
(svn r7664) -Backport from trunk (r7587, r7588, r7600, r7605, r7626, r7629):
Darkvater
parents:
5362
diff
changeset
|
547 |
LIBS += -liconv |
3313
767d77394c61
(svn r4076) Back out r4074. It doesn't work and leads to make endlessly calling itself. NOTE: Delete Makefile.config to recover.
tron
parents:
3311
diff
changeset
|
548 |
endif |
3408
313f35564673
(svn r4219) - Add support for WITH_ICONV. It is enabled by default for OSX > 10.3 for all others set it with WITH_ICONV in Makefile.config or with --with-iconv with configure. --with-config=/somedir will search for iconv include files somewhere (or in Makefile.config with WITH_ICONV_PATH). Custom library loading is not (yet) supported
Darkvater
parents:
3406
diff
changeset
|
549 |
|
313f35564673
(svn r4219) - Add support for WITH_ICONV. It is enabled by default for OSX > 10.3 for all others set it with WITH_ICONV in Makefile.config or with --with-iconv with configure. --with-config=/somedir will search for iconv include files somewhere (or in Makefile.config with WITH_ICONV_PATH). Custom library loading is not (yet) supported
Darkvater
parents:
3406
diff
changeset
|
550 |
ifdef WITH_ICONV |
313f35564673
(svn r4219) - Add support for WITH_ICONV. It is enabled by default for OSX > 10.3 for all others set it with WITH_ICONV in Makefile.config or with --with-iconv with configure. --with-config=/somedir will search for iconv include files somewhere (or in Makefile.config with WITH_ICONV_PATH). Custom library loading is not (yet) supported
Darkvater
parents:
3406
diff
changeset
|
551 |
CDEFS += -DWITH_ICONV |
313f35564673
(svn r4219) - Add support for WITH_ICONV. It is enabled by default for OSX > 10.3 for all others set it with WITH_ICONV in Makefile.config or with --with-iconv with configure. --with-config=/somedir will search for iconv include files somewhere (or in Makefile.config with WITH_ICONV_PATH). Custom library loading is not (yet) supported
Darkvater
parents:
3406
diff
changeset
|
552 |
ifdef WITH_ICONV_PATH |
313f35564673
(svn r4219) - Add support for WITH_ICONV. It is enabled by default for OSX > 10.3 for all others set it with WITH_ICONV in Makefile.config or with --with-iconv with configure. --with-config=/somedir will search for iconv include files somewhere (or in Makefile.config with WITH_ICONV_PATH). Custom library loading is not (yet) supported
Darkvater
parents:
3406
diff
changeset
|
553 |
CFLAGS += -I$(WITH_ICONV_PATH) |
313f35564673
(svn r4219) - Add support for WITH_ICONV. It is enabled by default for OSX > 10.3 for all others set it with WITH_ICONV in Makefile.config or with --with-iconv with configure. --with-config=/somedir will search for iconv include files somewhere (or in Makefile.config with WITH_ICONV_PATH). Custom library loading is not (yet) supported
Darkvater
parents:
3406
diff
changeset
|
554 |
endif |
3294
be3b1e6b4b74
(svn r4019) -Fix: [OSX] stopped using iconv for 10.2.8, since it was added in 10.3
bjarni
parents:
3260
diff
changeset
|
555 |
endif |
3260
7d22aa47de3b
(svn r3966) -Fix: [OSX and some linux] [ 1157244 ] Can't save game if name contains german umlauts
bjarni
parents:
3214
diff
changeset
|
556 |
|
347
892935295937
(svn r530) Makefile: added ability to switch asserts on and off
bjarni
parents:
285
diff
changeset
|
557 |
# enables/disables assert() |
348
959f425dc282
(svn r531) Makefile: made asserts enabled by default
bjarni
parents:
347
diff
changeset
|
558 |
ifdef DISABLE_ASSERTS |
959f425dc282
(svn r531) Makefile: made asserts enabled by default
bjarni
parents:
347
diff
changeset
|
559 |
CFLAGS += -DNDEBUG |
959f425dc282
(svn r531) Makefile: made asserts enabled by default
bjarni
parents:
347
diff
changeset
|
560 |
endif |
959f425dc282
(svn r531) Makefile: made asserts enabled by default
bjarni
parents:
347
diff
changeset
|
561 |
|
4324
9c999cc382fa
(svn r5978) -Add: allow a switch in Makefile.config to disable threads in OpenTTD (no matter what system you are on). Only useful for testing.
truelight
parents:
4300
diff
changeset
|
562 |
ifdef NO_THREADS |
9c999cc382fa
(svn r5978) -Add: allow a switch in Makefile.config to disable threads in OpenTTD (no matter what system you are on). Only useful for testing.
truelight
parents:
4300
diff
changeset
|
563 |
CFLAGS += -DNO_THREADS |
9c999cc382fa
(svn r5978) -Add: allow a switch in Makefile.config to disable threads in OpenTTD (no matter what system you are on). Only useful for testing.
truelight
parents:
4300
diff
changeset
|
564 |
endif |
9c999cc382fa
(svn r5978) -Add: allow a switch in Makefile.config to disable threads in OpenTTD (no matter what system you are on). Only useful for testing.
truelight
parents:
4300
diff
changeset
|
565 |
|
348
959f425dc282
(svn r531) Makefile: made asserts enabled by default
bjarni
parents:
347
diff
changeset
|
566 |
# automatically disables asserts for release |
959f425dc282
(svn r531) Makefile: made asserts enabled by default
bjarni
parents:
347
diff
changeset
|
567 |
ifdef RELEASE |
347
892935295937
(svn r530) Makefile: added ability to switch asserts on and off
bjarni
parents:
285
diff
changeset
|
568 |
ifndef ENABLE_ASSERTS |
892935295937
(svn r530) Makefile: added ability to switch asserts on and off
bjarni
parents:
285
diff
changeset
|
569 |
CFLAGS += -DNDEBUG |
892935295937
(svn r530) Makefile: added ability to switch asserts on and off
bjarni
parents:
285
diff
changeset
|
570 |
endif |
348
959f425dc282
(svn r531) Makefile: made asserts enabled by default
bjarni
parents:
347
diff
changeset
|
571 |
endif |
0 | 572 |
|
573 |
ifdef TRANSLATOR |
|
574 |
STRGEN_FLAGS=-t |
|
575 |
else |
|
576 |
STRGEN_FLAGS= |
|
577 |
endif |
|
578 |
||
2555
58ed3afaf3ab
(svn r3088) -Fix: [OSX] fixed issue where OSX could not dynamic link to quicktime [ 1334917 ]
bjarni
parents:
2505
diff
changeset
|
579 |
# OSX specific setup |
0 | 580 |
ifdef OSX |
2719
146eaa0ec83c
(svn r3264) -Codechange: [OSX] OSX targets will now always use the preprocessor to determine endianess
bjarni
parents:
2717
diff
changeset
|
581 |
# 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
|
582 |
ENDIAN_FORCE:=PREPROCESSOR |
146eaa0ec83c
(svn r3264) -Codechange: [OSX] OSX targets will now always use the preprocessor to determine endianess
bjarni
parents:
2717
diff
changeset
|
583 |
|
3900
4984308f9125
(svn r4987) Feature: Merged YAPF into trunk. Thanks to devs for continuous support and users for testing.
KUDr
parents:
3866
diff
changeset
|
584 |
# -lrt fails on OSX, so we disable it |
4984308f9125
(svn r4987) Feature: Merged YAPF into trunk. Thanks to devs for continuous support and users for testing.
KUDr
parents:
3866
diff
changeset
|
585 |
LRT:= |
4984308f9125
(svn r4987) Feature: Merged YAPF into trunk. Thanks to devs for continuous support and users for testing.
KUDr
parents:
3866
diff
changeset
|
586 |
|
2555
58ed3afaf3ab
(svn r3088) -Fix: [OSX] fixed issue where OSX could not dynamic link to quicktime [ 1334917 ]
bjarni
parents:
2505
diff
changeset
|
587 |
ifndef DEDICATED |
58ed3afaf3ab
(svn r3088) -Fix: [OSX] fixed issue where OSX could not dynamic link to quicktime [ 1334917 ]
bjarni
parents:
2505
diff
changeset
|
588 |
LIBS += -framework QuickTime |
58ed3afaf3ab
(svn r3088) -Fix: [OSX] fixed issue where OSX could not dynamic link to quicktime [ 1334917 ]
bjarni
parents:
2505
diff
changeset
|
589 |
endif |
58ed3afaf3ab
(svn r3088) -Fix: [OSX] fixed issue where OSX could not dynamic link to quicktime [ 1334917 ]
bjarni
parents:
2505
diff
changeset
|
590 |
|
2736
1ea068235989
(svn r3281) -Feature: [OSX] added native cocoa sound and video drivers (egladil)
bjarni
parents:
2735
diff
changeset
|
591 |
ifdef WITH_COCOA |
1ea068235989
(svn r3281) -Feature: [OSX] added native cocoa sound and video drivers (egladil)
bjarni
parents:
2735
diff
changeset
|
592 |
CDEFS += -DWITH_COCOA |
1ea068235989
(svn r3281) -Feature: [OSX] added native cocoa sound and video drivers (egladil)
bjarni
parents:
2735
diff
changeset
|
593 |
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
|
594 |
endif |
1ea068235989
(svn r3281) -Feature: [OSX] added native cocoa sound and video drivers (egladil)
bjarni
parents:
2735
diff
changeset
|
595 |
|
2555
58ed3afaf3ab
(svn r3088) -Fix: [OSX] fixed issue where OSX could not dynamic link to quicktime [ 1334917 ]
bjarni
parents:
2505
diff
changeset
|
596 |
# OSX path setup |
58ed3afaf3ab
(svn r3088) -Fix: [OSX] fixed issue where OSX could not dynamic link to quicktime [ 1334917 ]
bjarni
parents:
2505
diff
changeset
|
597 |
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
|
598 |
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
|
599 |
endif |
58ed3afaf3ab
(svn r3088) -Fix: [OSX] fixed issue where OSX could not dynamic link to quicktime [ 1334917 ]
bjarni
parents:
2505
diff
changeset
|
600 |
|
58ed3afaf3ab
(svn r3088) -Fix: [OSX] fixed issue where OSX could not dynamic link to quicktime [ 1334917 ]
bjarni
parents:
2505
diff
changeset
|
601 |
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
|
602 |
ifndef DEDICATED |
58ed3afaf3ab
(svn r3088) -Fix: [OSX] fixed issue where OSX could not dynamic link to quicktime [ 1334917 ]
bjarni
parents:
2505
diff
changeset
|
603 |
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
|
604 |
endif |
58ed3afaf3ab
(svn r3088) -Fix: [OSX] fixed issue where OSX could not dynamic link to quicktime [ 1334917 ]
bjarni
parents:
2505
diff
changeset
|
605 |
endif |
2500
e2b13f720a94
(svn r3026) -Fix: [OSX] fixed bug that prevented dedicated servers from compiling (introduced in r3022)
bjarni
parents:
2497
diff
changeset
|
606 |
endif |
0 | 607 |
|
608 |
ifdef MIDI |
|
609 |
CDEFS += -DEXTERNAL_PLAYER=\"$(MIDI)\" |
|
610 |
ifdef MIDI_ARG |
|
611 |
CDEFS += -DMIDI_ARG=\"$(MIDI_ARG)\" |
|
612 |
endif |
|
613 |
endif |
|
614 |
||
615 |
ifdef WITH_NETWORK |
|
616 |
CDEFS += -DENABLE_NETWORK |
|
543
e3b43338096b
(svn r942) -Merged branch/network back into the trunk
truelight
parents:
532
diff
changeset
|
617 |
ifdef QNX |
e3b43338096b
(svn r942) -Merged branch/network back into the trunk
truelight
parents:
532
diff
changeset
|
618 |
LIBS += -lsocket |
e3b43338096b
(svn r942) -Merged branch/network back into the trunk
truelight
parents:
532
diff
changeset
|
619 |
endif |
0 | 620 |
endif |
621 |
||
561
e3b9689745ab
(svn r970) Added 2nd data path for all non-windows OSes
bjarni
parents:
551
diff
changeset
|
622 |
|
e3b9689745ab
(svn r970) Added 2nd data path for all non-windows OSes
bjarni
parents:
551
diff
changeset
|
623 |
ifdef SECOND_DATA_PATH |
e3b9689745ab
(svn r970) Added 2nd data path for all non-windows OSes
bjarni
parents:
551
diff
changeset
|
624 |
CDEFS += -DSECOND_DATA_DIR=\"$(SECOND_DATA_PATH)/\" |
e3b9689745ab
(svn r970) Added 2nd data path for all non-windows OSes
bjarni
parents:
551
diff
changeset
|
625 |
endif |
e3b9689745ab
(svn r970) Added 2nd data path for all non-windows OSes
bjarni
parents:
551
diff
changeset
|
626 |
|
e3b9689745ab
(svn r970) Added 2nd data path for all non-windows OSes
bjarni
parents:
551
diff
changeset
|
627 |
ifdef CUSTOM_LANG_DIR |
e3b9689745ab
(svn r970) Added 2nd data path for all non-windows OSes
bjarni
parents:
551
diff
changeset
|
628 |
CDEFS += -DCUSTOM_LANG_DIR=\"$(CUSTOM_LANG_DIR)/\" |
e3b9689745ab
(svn r970) Added 2nd data path for all non-windows OSes
bjarni
parents:
551
diff
changeset
|
629 |
endif |
e3b9689745ab
(svn r970) Added 2nd data path for all non-windows OSes
bjarni
parents:
551
diff
changeset
|
630 |
|
0 | 631 |
ifdef WITH_DIRECTMUSIC |
632 |
CDEFS += -DWIN32_ENABLE_DIRECTMUSIC_SUPPORT |
|
633 |
endif |
|
634 |
||
635 |
ifdef WIN32 |
|
1692
2587eee1c632
(svn r2196) -Change: updated the Makefile, now it works for crossplatform compiling
TrueLight
parents:
1629
diff
changeset
|
636 |
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
|
637 |
ifdef WITH_DIRECTMUSIC |
2587eee1c632
(svn r2196) -Change: updated the Makefile, now it works for crossplatform compiling
TrueLight
parents:
1629
diff
changeset
|
638 |
LIBS += -lstdc++ |
2587eee1c632
(svn r2196) -Change: updated the Makefile, now it works for crossplatform compiling
TrueLight
parents:
1629
diff
changeset
|
639 |
endif |
0 | 640 |
TTDLDFLAGS += -Wl,--subsystem,windows |
641 |
endif |
|
642 |
||
1476
abbcea18a01c
(svn r1980) Check $DESTDIR if $DEST_DIR was not set.
pasky
parents:
1435
diff
changeset
|
643 |
ifndef DEST_DIR |
abbcea18a01c
(svn r1980) Check $DESTDIR if $DEST_DIR was not set.
pasky
parents:
1435
diff
changeset
|
644 |
DEST_DIR = $(DESTDIR) |
abbcea18a01c
(svn r1980) Check $DESTDIR if $DEST_DIR was not set.
pasky
parents:
1435
diff
changeset
|
645 |
endif |
abbcea18a01c
(svn r1980) Check $DESTDIR if $DEST_DIR was not set.
pasky
parents:
1435
diff
changeset
|
646 |
|
0 | 647 |
# sets up the paths for use for make install |
285 | 648 |
ifdef INSTALL |
649 |
# We use _PREFIXED vars here, so the paths are recalculated every time, and |
|
650 |
# the prefix is not prepended in the makefile config |
|
651 |
BINARY_DIR_PREFIXED:=$(PREFIX)/$(BINARY_DIR) |
|
652 |
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
|
653 |
ICON_DIR_PREFIXED:=$(PREFIX)/$(ICON_DIR) |
285 | 654 |
# We use _INSTALL vars here, these vars are the locations where the files will |
655 |
# be installed |
|
656 |
DATA_DIR_INSTALL=$(DEST_DIR)/$(DATA_DIR_PREFIXED) |
|
657 |
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
|
658 |
ICON_DIR_INSTALL=$(DEST_DIR)/$(ICON_DIR_PREFIXED) |
285 | 659 |
# Let the code know where to find stuff |
660 |
ifdef DATA_DIR_PREFIXED |
|
661 |
CDEFS += -DGAME_DATA_DIR=\"$(DATA_DIR_PREFIXED)/\" |
|
0 | 662 |
endif |
285 | 663 |
|
664 |
ifdef PERSONAL_DIR |
|
665 |
CDEFS += -DPERSONAL_DIR=\"$(PERSONAL_DIR)/\" |
|
666 |
endif |
|
667 |
||
668 |
ifdef USE_HOMEDIR |
|
669 |
CDEFS += -DUSE_HOMEDIR |
|
670 |
endif |
|
4256
877a6c0f4991
(svn r5872) - Feature: Add an icon to the SDL openttd executable.
Darkvater
parents:
4220
diff
changeset
|
671 |
|
877a6c0f4991
(svn r5872) - Feature: Add an icon to the SDL openttd executable.
Darkvater
parents:
4220
diff
changeset
|
672 |
ifdef ICON_DIR |
877a6c0f4991
(svn r5872) - Feature: Add an icon to the SDL openttd executable.
Darkvater
parents:
4220
diff
changeset
|
673 |
CDEFS += -DICON_DIR=\"$(ICON_DIR_PREFIXED)/\" |
877a6c0f4991
(svn r5872) - Feature: Add an icon to the SDL openttd executable.
Darkvater
parents:
4220
diff
changeset
|
674 |
endif |
0 | 675 |
endif |
676 |
||
677 |
############################################################################## |
|
678 |
# |
|
679 |
# What to compile |
|
680 |
# (users do not want to modify anything below) |
|
681 |
# |
|
682 |
||
683 |
||
684 |
### Sources |
|
685 |
||
2713
9f06e1f94ce9
(svn r3258) -Feature: [OSX] added support for universal binaries
bjarni
parents:
2712
diff
changeset
|
686 |
# 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
|
687 |
SRCS := |
2713
9f06e1f94ce9
(svn r3258) -Feature: [OSX] added support for universal binaries
bjarni
parents:
2712
diff
changeset
|
688 |
|
2735
6f1b148a676b
(svn r3280) Merge the seperate (C|CXX|OBJC)_SOURCES variables into a single variable SRCS
tron
parents:
2731
diff
changeset
|
689 |
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
|
690 |
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
|
691 |
SRCS += airport.c |
6f1b148a676b
(svn r3280) Merge the seperate (C|CXX|OBJC)_SOURCES variables into a single variable SRCS
tron
parents:
2731
diff
changeset
|
692 |
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
|
693 |
SRCS += aystar.c |
4300
687a17c9c557
(svn r5946) -Add: merged the TGP branch to mainline. TGP adds:
truelight
parents:
4290
diff
changeset
|
694 |
SRCS += bmp.c |
2735
6f1b148a676b
(svn r3280) Merge the seperate (C|CXX|OBJC)_SOURCES variables into a single variable SRCS
tron
parents:
2731
diff
changeset
|
695 |
SRCS += bridge_gui.c |
3214
172b409bf612
(svn r3887) Add a function to get the other bridge end when you're at a bridge ramp
tron
parents:
3212
diff
changeset
|
696 |
SRCS += bridge_map.c |
4800
009e3c6cea8a
(svn r6722) -Codechange: [aircraft build window] moved aircraft build window to a file of it's own
bjarni
parents:
4656
diff
changeset
|
697 |
SRCS += build_vehicle_gui.c |
2735
6f1b148a676b
(svn r3280) Merge the seperate (C|CXX|OBJC)_SOURCES variables into a single variable SRCS
tron
parents:
2731
diff
changeset
|
698 |
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
|
699 |
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
|
700 |
SRCS += command.c |
6f1b148a676b
(svn r3280) Merge the seperate (C|CXX|OBJC)_SOURCES variables into a single variable SRCS
tron
parents:
2731
diff
changeset
|
701 |
SRCS += console.c |
6f1b148a676b
(svn r3280) Merge the seperate (C|CXX|OBJC)_SOURCES variables into a single variable SRCS
tron
parents:
2731
diff
changeset
|
702 |
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
|
703 |
SRCS += currency.c |
4261
2ec8f5a9747b
(svn r5887) -Cleanup: move date related functions, defines and variables to date.[ch]
rubidium
parents:
4256
diff
changeset
|
704 |
SRCS += date.c |
2735
6f1b148a676b
(svn r3280) Merge the seperate (C|CXX|OBJC)_SOURCES variables into a single variable SRCS
tron
parents:
2731
diff
changeset
|
705 |
SRCS += debug.c |
6f1b148a676b
(svn r3280) Merge the seperate (C|CXX|OBJC)_SOURCES variables into a single variable SRCS
tron
parents:
2731
diff
changeset
|
706 |
SRCS += dedicated.c |
6f1b148a676b
(svn r3280) Merge the seperate (C|CXX|OBJC)_SOURCES variables into a single variable SRCS
tron
parents:
2731
diff
changeset
|
707 |
SRCS += depot.c |
4638
8abe4f10b94b
(svn r6513) -Codechange: unified the code to draw depot windows
bjarni
parents:
4562
diff
changeset
|
708 |
SRCS += depot_gui.c |
2735
6f1b148a676b
(svn r3280) Merge the seperate (C|CXX|OBJC)_SOURCES variables into a single variable SRCS
tron
parents:
2731
diff
changeset
|
709 |
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
|
710 |
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
|
711 |
SRCS += driver.c |
6f1b148a676b
(svn r3280) Merge the seperate (C|CXX|OBJC)_SOURCES variables into a single variable SRCS
tron
parents:
2731
diff
changeset
|
712 |
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
|
713 |
SRCS += economy.c |
3355
a653b8e47f27
(svn r4150) -Feature: Merged elrails into trunk. Thanks to Tron for lots of code and proofreading, thanks to peter1138 for another lot of code and ideas.
celestar
parents:
3354
diff
changeset
|
714 |
SRCS += elrail.c |
2735
6f1b148a676b
(svn r3280) Merge the seperate (C|CXX|OBJC)_SOURCES variables into a single variable SRCS
tron
parents:
2731
diff
changeset
|
715 |
SRCS += engine.c |
6f1b148a676b
(svn r3280) Merge the seperate (C|CXX|OBJC)_SOURCES variables into a single variable SRCS
tron
parents:
2731
diff
changeset
|
716 |
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
|
717 |
SRCS += fileio.c |
4220
86ca889037b3
(svn r5764) - Cleanup: - Cleanup: Move the now unified FiosAlloc, compare_FiosItems, FiosFreeSavegameList, FiosMakeSavegameName, FiosDelete and FileExists to newly created file fios.c where it belongs.
Darkvater
parents:
4135
diff
changeset
|
718 |
SRCS += fios.c |
5108
dc67d70b5a45
(svn r7182) -Feature: Merge utf8 branch. This brings us support for Unicode/UTF-8 and the option for fonts rendered by FreeType. Language changes to come.
peter1138
parents:
5051
diff
changeset
|
719 |
SRCS += fontcache.c |
4300
687a17c9c557
(svn r5946) -Add: merged the TGP branch to mainline. TGP adds:
truelight
parents:
4290
diff
changeset
|
720 |
SRCS += genworld.c |
687a17c9c557
(svn r5946) -Add: merged the TGP branch to mainline. TGP adds:
truelight
parents:
4290
diff
changeset
|
721 |
SRCS += genworld_gui.c |
2735
6f1b148a676b
(svn r3280) Merge the seperate (C|CXX|OBJC)_SOURCES variables into a single variable SRCS
tron
parents:
2731
diff
changeset
|
722 |
SRCS += gfx.c |
6f1b148a676b
(svn r3280) Merge the seperate (C|CXX|OBJC)_SOURCES variables into a single variable SRCS
tron
parents:
2731
diff
changeset
|
723 |
SRCS += gfxinit.c |
6f1b148a676b
(svn r3280) Merge the seperate (C|CXX|OBJC)_SOURCES variables into a single variable SRCS
tron
parents:
2731
diff
changeset
|
724 |
SRCS += graph_gui.c |
4300
687a17c9c557
(svn r5946) -Add: merged the TGP branch to mainline. TGP adds:
truelight
parents:
4290
diff
changeset
|
725 |
SRCS += heightmap.c |
5187
d1f4e447a7eb
(svn r7299) -CodeChange: Train and Aircraft Build window GUI code simplified a bit:
KUDr
parents:
5117
diff
changeset
|
726 |
SRCS += helpers.cpp |
2735
6f1b148a676b
(svn r3280) Merge the seperate (C|CXX|OBJC)_SOURCES variables into a single variable SRCS
tron
parents:
2731
diff
changeset
|
727 |
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
|
728 |
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
|
729 |
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
|
730 |
SRCS += landscape.c |
6f1b148a676b
(svn r3280) Merge the seperate (C|CXX|OBJC)_SOURCES variables into a single variable SRCS
tron
parents:
2731
diff
changeset
|
731 |
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
|
732 |
SRCS += map.c |
6f1b148a676b
(svn r3280) Merge the seperate (C|CXX|OBJC)_SOURCES variables into a single variable SRCS
tron
parents:
2731
diff
changeset
|
733 |
SRCS += md5.c |
6f1b148a676b
(svn r3280) Merge the seperate (C|CXX|OBJC)_SOURCES variables into a single variable SRCS
tron
parents:
2731
diff
changeset
|
734 |
SRCS += mersenne.c |
6f1b148a676b
(svn r3280) Merge the seperate (C|CXX|OBJC)_SOURCES variables into a single variable SRCS
tron
parents:
2731
diff
changeset
|
735 |
SRCS += minilzo.c |
6f1b148a676b
(svn r3280) Merge the seperate (C|CXX|OBJC)_SOURCES variables into a single variable SRCS
tron
parents:
2731
diff
changeset
|
736 |
SRCS += misc.c |
6f1b148a676b
(svn r3280) Merge the seperate (C|CXX|OBJC)_SOURCES variables into a single variable SRCS
tron
parents:
2731
diff
changeset
|
737 |
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
|
738 |
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
|
739 |
SRCS += mixer.c |
4120
90e678fd7d8d
(svn r5464) [Behaviour Fix] : When starting the game, the system will now verify the presence of music files in gm forlder.
belugas
parents:
4113
diff
changeset
|
740 |
SRCS += music.c |
2735
6f1b148a676b
(svn r3280) Merge the seperate (C|CXX|OBJC)_SOURCES variables into a single variable SRCS
tron
parents:
2731
diff
changeset
|
741 |
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
|
742 |
SRCS += namegen.c |
6f1b148a676b
(svn r3280) Merge the seperate (C|CXX|OBJC)_SOURCES variables into a single variable SRCS
tron
parents:
2731
diff
changeset
|
743 |
SRCS += network.c |
6f1b148a676b
(svn r3280) Merge the seperate (C|CXX|OBJC)_SOURCES variables into a single variable SRCS
tron
parents:
2731
diff
changeset
|
744 |
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
|
745 |
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
|
746 |
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
|
747 |
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
|
748 |
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
|
749 |
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
|
750 |
SRCS += newgrf.c |
3866
113de2b20059
(svn r4902) Newgrf : Introduction of the newgrf_cargo files.
belugas
parents:
3745
diff
changeset
|
751 |
SRCS += newgrf_cargo.c |
5228
c4a780348f66
(svn r7348) -Feature: Initial support for saving NewGRF settings with savegames. Back up your savegames...
peter1138
parents:
5216
diff
changeset
|
752 |
SRCS += newgrf_config.c |
2962
dbd168a4703a
(svn r3524) - Split newgrf features from engine.[ch] into newgrf_engine.[ch], and add the new files to project files.
peter1138
parents:
2948
diff
changeset
|
753 |
SRCS += newgrf_engine.c |
5237
c14c97d7030a
(svn r7357) -Codechange: new NewGRF set up window which allows modification of NewGRF settings.
peter1138
parents:
5228
diff
changeset
|
754 |
SRCS += newgrf_gui.c |
4656
acffecd6f484
(svn r6532) - Feature: Add support for NewGRF sound effects. Currently sound priority isn't supported.
peter1138
parents:
4638
diff
changeset
|
755 |
SRCS += newgrf_sound.c |
3595
20621831cd46
(svn r4486) - NewGRF: Create and use a memory pool to manage sprite groups. This
peter1138
parents:
3409
diff
changeset
|
756 |
SRCS += newgrf_spritegroup.c |
2963
6645da0a5b4a
(svn r3525) - Rename station_newgrf.[ch] to newgrf_station.[ch], and update project files.
peter1138
parents:
2962
diff
changeset
|
757 |
SRCS += newgrf_station.c |
3601
ac6df06db648
(svn r4493) Newgrf : Action 04. Beginning of implementation.
belugas
parents:
3595
diff
changeset
|
758 |
SRCS += newgrf_text.c |
2735
6f1b148a676b
(svn r3280) Merge the seperate (C|CXX|OBJC)_SOURCES variables into a single variable SRCS
tron
parents:
2731
diff
changeset
|
759 |
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
|
760 |
SRCS += npf.c |
6f1b148a676b
(svn r3280) Merge the seperate (C|CXX|OBJC)_SOURCES variables into a single variable SRCS
tron
parents:
2731
diff
changeset
|
761 |
SRCS += oldloader.c |
5216
d581e4db95b6
(svn r7331) - Codechange: Rename all memory pool macro's and types to "old pool", so the new pool implementation can be committed alongside it.
matthijs
parents:
5187
diff
changeset
|
762 |
SRCS += oldpool.c |
2735
6f1b148a676b
(svn r3280) Merge the seperate (C|CXX|OBJC)_SOURCES variables into a single variable SRCS
tron
parents:
2731
diff
changeset
|
763 |
SRCS += openttd.c |
6f1b148a676b
(svn r3280) Merge the seperate (C|CXX|OBJC)_SOURCES variables into a single variable SRCS
tron
parents:
2731
diff
changeset
|
764 |
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
|
765 |
SRCS += order_gui.c |
3341
b8febc9509d7
(svn r4125) - Feature: Add a general TIC() TOC() mechanism using rdtsc or something similar on non-i386 architectures to performance-tune (critical) code. Some systems are probably missing, but those can be added later.
Darkvater
parents:
3334
diff
changeset
|
766 |
SRCS += os_timer.c |
2735
6f1b148a676b
(svn r3280) Merge the seperate (C|CXX|OBJC)_SOURCES variables into a single variable SRCS
tron
parents:
2731
diff
changeset
|
767 |
SRCS += pathfind.c |
6f1b148a676b
(svn r3280) Merge the seperate (C|CXX|OBJC)_SOURCES variables into a single variable SRCS
tron
parents:
2731
diff
changeset
|
768 |
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
|
769 |
SRCS += players.c |
6f1b148a676b
(svn r3280) Merge the seperate (C|CXX|OBJC)_SOURCES variables into a single variable SRCS
tron
parents:
2731
diff
changeset
|
770 |
SRCS += queue.c |
6f1b148a676b
(svn r3280) Merge the seperate (C|CXX|OBJC)_SOURCES variables into a single variable SRCS
tron
parents:
2731
diff
changeset
|
771 |
SRCS += rail.c |
6f1b148a676b
(svn r3280) Merge the seperate (C|CXX|OBJC)_SOURCES variables into a single variable SRCS
tron
parents:
2731
diff
changeset
|
772 |
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
|
773 |
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
|
774 |
SRCS += rev.c |
6f1b148a676b
(svn r3280) Merge the seperate (C|CXX|OBJC)_SOURCES variables into a single variable SRCS
tron
parents:
2731
diff
changeset
|
775 |
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
|
776 |
SRCS += road_gui.c |
3146
36523d434783
(svn r3766) Add a function to get the RoadBits from an arbitrary tile
tron
parents:
3141
diff
changeset
|
777 |
SRCS += road_map.c |
2735
6f1b148a676b
(svn r3280) Merge the seperate (C|CXX|OBJC)_SOURCES variables into a single variable SRCS
tron
parents:
2731
diff
changeset
|
778 |
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
|
779 |
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
|
780 |
SRCS += saveload.c |
6f1b148a676b
(svn r3280) Merge the seperate (C|CXX|OBJC)_SOURCES variables into a single variable SRCS
tron
parents:
2731
diff
changeset
|
781 |
SRCS += screenshot.c |
6f1b148a676b
(svn r3280) Merge the seperate (C|CXX|OBJC)_SOURCES variables into a single variable SRCS
tron
parents:
2731
diff
changeset
|
782 |
SRCS += settings.c |
6f1b148a676b
(svn r3280) Merge the seperate (C|CXX|OBJC)_SOURCES variables into a single variable SRCS
tron
parents:
2731
diff
changeset
|
783 |
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
|
784 |
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
|
785 |
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
|
786 |
SRCS += signs.c |
6f1b148a676b
(svn r3280) Merge the seperate (C|CXX|OBJC)_SOURCES variables into a single variable SRCS
tron
parents:
2731
diff
changeset
|
787 |
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
|
788 |
SRCS += sound.c |
6f1b148a676b
(svn r3280) Merge the seperate (C|CXX|OBJC)_SOURCES variables into a single variable SRCS
tron
parents:
2731
diff
changeset
|
789 |
SRCS += spritecache.c |
6f1b148a676b
(svn r3280) Merge the seperate (C|CXX|OBJC)_SOURCES variables into a single variable SRCS
tron
parents:
2731
diff
changeset
|
790 |
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
|
791 |
SRCS += station_gui.c |
3334
b72ac8637a30
(svn r4113) Moved all relevant map functions for stations to station_map.[ch]
celestar
parents:
3313
diff
changeset
|
792 |
SRCS += station_map.c |
2735
6f1b148a676b
(svn r3280) Merge the seperate (C|CXX|OBJC)_SOURCES variables into a single variable SRCS
tron
parents:
2731
diff
changeset
|
793 |
SRCS += string.c |
6f1b148a676b
(svn r3280) Merge the seperate (C|CXX|OBJC)_SOURCES variables into a single variable SRCS
tron
parents:
2731
diff
changeset
|
794 |
SRCS += strings.c |
6f1b148a676b
(svn r3280) Merge the seperate (C|CXX|OBJC)_SOURCES variables into a single variable SRCS
tron
parents:
2731
diff
changeset
|
795 |
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
|
796 |
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
|
797 |
SRCS += texteff.c |
4300
687a17c9c557
(svn r5946) -Add: merged the TGP branch to mainline. TGP adds:
truelight
parents:
4290
diff
changeset
|
798 |
SRCS += tgp.c |
2735
6f1b148a676b
(svn r3280) Merge the seperate (C|CXX|OBJC)_SOURCES variables into a single variable SRCS
tron
parents:
2731
diff
changeset
|
799 |
SRCS += thread.c |
6f1b148a676b
(svn r3280) Merge the seperate (C|CXX|OBJC)_SOURCES variables into a single variable SRCS
tron
parents:
2731
diff
changeset
|
800 |
SRCS += tile.c |
6f1b148a676b
(svn r3280) Merge the seperate (C|CXX|OBJC)_SOURCES variables into a single variable SRCS
tron
parents:
2731
diff
changeset
|
801 |
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
|
802 |
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
|
803 |
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
|
804 |
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
|
805 |
SRCS += tree_cmd.c |
3154 | 806 |
SRCS += tunnel_map.c |
2735
6f1b148a676b
(svn r3280) Merge the seperate (C|CXX|OBJC)_SOURCES variables into a single variable SRCS
tron
parents:
2731
diff
changeset
|
807 |
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
|
808 |
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
|
809 |
SRCS += vehicle.c |
6f1b148a676b
(svn r3280) Merge the seperate (C|CXX|OBJC)_SOURCES variables into a single variable SRCS
tron
parents:
2731
diff
changeset
|
810 |
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
|
811 |
SRCS += viewport.c |
6f1b148a676b
(svn r3280) Merge the seperate (C|CXX|OBJC)_SOURCES variables into a single variable SRCS
tron
parents:
2731
diff
changeset
|
812 |
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
|
813 |
SRCS += waypoint.c |
6f1b148a676b
(svn r3280) Merge the seperate (C|CXX|OBJC)_SOURCES variables into a single variable SRCS
tron
parents:
2731
diff
changeset
|
814 |
SRCS += widget.c |
6f1b148a676b
(svn r3280) Merge the seperate (C|CXX|OBJC)_SOURCES variables into a single variable SRCS
tron
parents:
2731
diff
changeset
|
815 |
SRCS += window.c |
6f1b148a676b
(svn r3280) Merge the seperate (C|CXX|OBJC)_SOURCES variables into a single variable SRCS
tron
parents:
2731
diff
changeset
|
816 |
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
|
817 |
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
|
818 |
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
|
819 |
SRCS += video/null_v.c |
3900
4984308f9125
(svn r4987) Feature: Merged YAPF into trunk. Thanks to devs for continuous support and users for testing.
KUDr
parents:
3866
diff
changeset
|
820 |
SRCS += yapf/follow_track.cpp |
4984308f9125
(svn r4987) Feature: Merged YAPF into trunk. Thanks to devs for continuous support and users for testing.
KUDr
parents:
3866
diff
changeset
|
821 |
SRCS += yapf/yapf_common.cpp |
4984308f9125
(svn r4987) Feature: Merged YAPF into trunk. Thanks to devs for continuous support and users for testing.
KUDr
parents:
3866
diff
changeset
|
822 |
SRCS += yapf/yapf_rail.cpp |
4984308f9125
(svn r4987) Feature: Merged YAPF into trunk. Thanks to devs for continuous support and users for testing.
KUDr
parents:
3866
diff
changeset
|
823 |
SRCS += yapf/yapf_road.cpp |
4984308f9125
(svn r4987) Feature: Merged YAPF into trunk. Thanks to devs for continuous support and users for testing.
KUDr
parents:
3866
diff
changeset
|
824 |
SRCS += yapf/yapf_ship.cpp |
677 | 825 |
|
2395
19b4da30806b
(svn r2921) -Codechange: moved all AI-code to 1 central place (ai/ai.c)
truelight
parents:
2381
diff
changeset
|
826 |
# 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
|
827 |
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
|
828 |
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
|
829 |
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
|
830 |
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
|
831 |
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
|
832 |
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
|
833 |
|
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
|
834 |
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
|
835 |
SRCS += sdl.c |
6f1b148a676b
(svn r3280) Merge the seperate (C|CXX|OBJC)_SOURCES variables into a single variable SRCS
tron
parents:
2731
diff
changeset
|
836 |
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
|
837 |
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
|
838 |
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
|
839 |
|
0 | 840 |
ifdef WIN32 |
2735
6f1b148a676b
(svn r3280) Merge the seperate (C|CXX|OBJC)_SOURCES variables into a single variable SRCS
tron
parents:
2731
diff
changeset
|
841 |
SRCS += win32.c |
6f1b148a676b
(svn r3280) Merge the seperate (C|CXX|OBJC)_SOURCES variables into a single variable SRCS
tron
parents:
2731
diff
changeset
|
842 |
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
|
843 |
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
|
844 |
SRCS += video/win32_v.c |
0 | 845 |
else |
2735
6f1b148a676b
(svn r3280) Merge the seperate (C|CXX|OBJC)_SOURCES variables into a single variable SRCS
tron
parents:
2731
diff
changeset
|
846 |
SRCS += unix.c |
6f1b148a676b
(svn r3280) Merge the seperate (C|CXX|OBJC)_SOURCES variables into a single variable SRCS
tron
parents:
2731
diff
changeset
|
847 |
SRCS += music/extmidi.c |
0 | 848 |
endif |
849 |
||
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
|
850 |
ifdef OSX |
2736
1ea068235989
(svn r3281) -Feature: [OSX] added native cocoa sound and video drivers (egladil)
bjarni
parents:
2735
diff
changeset
|
851 |
SRCS += os/macosx/macos.m |
1ea068235989
(svn r3281) -Feature: [OSX] added native cocoa sound and video drivers (egladil)
bjarni
parents:
2735
diff
changeset
|
852 |
ifndef DEDICATED |
1ea068235989
(svn r3281) -Feature: [OSX] added native cocoa sound and video drivers (egladil)
bjarni
parents:
2735
diff
changeset
|
853 |
SRCS += music/qtmidi.c |
1ea068235989
(svn r3281) -Feature: [OSX] added native cocoa sound and video drivers (egladil)
bjarni
parents:
2735
diff
changeset
|
854 |
endif |
1ea068235989
(svn r3281) -Feature: [OSX] added native cocoa sound and video drivers (egladil)
bjarni
parents:
2735
diff
changeset
|
855 |
ifdef WITH_COCOA |
1ea068235989
(svn r3281) -Feature: [OSX] added native cocoa sound and video drivers (egladil)
bjarni
parents:
2735
diff
changeset
|
856 |
SRCS += video/cocoa_v.m |
1ea068235989
(svn r3281) -Feature: [OSX] added native cocoa sound and video drivers (egladil)
bjarni
parents:
2735
diff
changeset
|
857 |
SRCS += sound/cocoa_s.c |
1ea068235989
(svn r3281) -Feature: [OSX] added native cocoa sound and video drivers (egladil)
bjarni
parents:
2735
diff
changeset
|
858 |
SRCS += os/macosx/splash.c |
1ea068235989
(svn r3281) -Feature: [OSX] added native cocoa sound and video drivers (egladil)
bjarni
parents:
2735
diff
changeset
|
859 |
endif |
2500
e2b13f720a94
(svn r3026) -Fix: [OSX] fixed bug that prevented dedicated servers from compiling (introduced in r3022)
bjarni
parents:
2497
diff
changeset
|
860 |
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
|
861 |
|
421
0b9bdcdfe0c5
(svn r619) Add the necessary bits to make building under BeOS using GNU Make work
tron
parents:
413
diff
changeset
|
862 |
ifdef BEOS |
2735
6f1b148a676b
(svn r3280) Merge the seperate (C|CXX|OBJC)_SOURCES variables into a single variable SRCS
tron
parents:
2731
diff
changeset
|
863 |
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
|
864 |
endif |
0 | 865 |
|
866 |
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
|
867 |
SRCS += ottdres.rc |
0 | 868 |
endif |
869 |
||
870 |
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
|
871 |
SRCS += music/dmusic.cpp |
0 | 872 |
endif |
873 |
||
2735
6f1b148a676b
(svn r3280) Merge the seperate (C|CXX|OBJC)_SOURCES variables into a single variable SRCS
tron
parents:
2731
diff
changeset
|
874 |
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
|
875 |
DEPS = $(OBJS:%.o=.deps/%.d) |
0 | 876 |
|
877 |
LANG_TXT = $(filter-out %.unfinished.txt,$(wildcard lang/*.txt)) |
|
878 |
LANGS = $(LANG_TXT:%.txt=%.lng) |
|
879 |
||
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
|
880 |
|
0 | 881 |
############################################################################## |
882 |
# |
|
1413
4a93d8682e11
(svn r1917) - Makefile: Revamped VERBOSE support, build mechanics changed.
pasky
parents:
1411
diff
changeset
|
883 |
# Build commands |
4a93d8682e11
(svn r1917) - Makefile: Revamped VERBOSE support, build mechanics changed.
pasky
parents:
1411
diff
changeset
|
884 |
# |
4a93d8682e11
(svn r1917) - Makefile: Revamped VERBOSE support, build mechanics changed.
pasky
parents:
1411
diff
changeset
|
885 |
|
2369
ede4483a0214
(svn r2895) Remove unused variables and bring a comment closer to reality
tron
parents:
2356
diff
changeset
|
886 |
# 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
|
887 |
# 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
|
888 |
# Inspired by the Linux kernel build system. |
4a93d8682e11
(svn r1917) - Makefile: Revamped VERBOSE support, build mechanics changed.
pasky
parents:
1411
diff
changeset
|
889 |
ifdef VERBOSE |
4a93d8682e11
(svn r1917) - Makefile: Revamped VERBOSE support, build mechanics changed.
pasky
parents:
1411
diff
changeset
|
890 |
Q = |
4a93d8682e11
(svn r1917) - Makefile: Revamped VERBOSE support, build mechanics changed.
pasky
parents:
1411
diff
changeset
|
891 |
else |
4a93d8682e11
(svn r1917) - Makefile: Revamped VERBOSE support, build mechanics changed.
pasky
parents:
1411
diff
changeset
|
892 |
Q = @ |
4a93d8682e11
(svn r1917) - Makefile: Revamped VERBOSE support, build mechanics changed.
pasky
parents:
1411
diff
changeset
|
893 |
endif |
4a93d8682e11
(svn r1917) - Makefile: Revamped VERBOSE support, build mechanics changed.
pasky
parents:
1411
diff
changeset
|
894 |
|
4a93d8682e11
(svn r1917) - Makefile: Revamped VERBOSE support, build mechanics changed.
pasky
parents:
1411
diff
changeset
|
895 |
|
4a93d8682e11
(svn r1917) - Makefile: Revamped VERBOSE support, build mechanics changed.
pasky
parents:
1411
diff
changeset
|
896 |
############################################################################## |
4a93d8682e11
(svn r1917) - Makefile: Revamped VERBOSE support, build mechanics changed.
pasky
parents:
1411
diff
changeset
|
897 |
# |
0 | 898 |
# Targets |
899 |
# |
|
900 |
||
901 |
||
902 |
### Normal build rules |
|
903 |
||
904 |
||
905 |
ifdef OSX |
|
2713
9f06e1f94ce9
(svn r3258) -Feature: [OSX] added support for universal binaries
bjarni
parents:
2712
diff
changeset
|
906 |
# needs to be before all |
0 | 907 |
OSX:=OSX |
908 |
endif |
|
909 |
||
910 |
||
3903
d6f4f6b63ffc
(svn r4991) -Fix: don't compile UNITTEST by default, it isn't needed
truelight
parents:
3901
diff
changeset
|
911 |
all: endian_target.h endian_host.h $(UPDATECONFIG) $(LANGS) $(TTD) $(OSX) |
0 | 912 |
|
2714
2b34ba290a5c
(svn r3259) -Fix: [OSX] fixed that universal binaries did not make a bundle
bjarni
parents:
2713
diff
changeset
|
913 |
ifdef OSX |
2b34ba290a5c
(svn r3259) -Fix: [OSX] fixed that universal binaries did not make a bundle
bjarni
parents:
2713
diff
changeset
|
914 |
-include os/macosx/Makefile |
2b34ba290a5c
(svn r3259) -Fix: [OSX] fixed that universal binaries did not make a bundle
bjarni
parents:
2713
diff
changeset
|
915 |
endif |
2b34ba290a5c
(svn r3259) -Fix: [OSX] fixed that universal binaries did not make a bundle
bjarni
parents:
2713
diff
changeset
|
916 |
|
1721
64d59b181596
(svn r2225) -Fix: split the endian-detection to target/host. Now cross-compiling
truelight
parents:
1720
diff
changeset
|
917 |
endian_host.h: $(ENDIAN_CHECK) |
64d59b181596
(svn r2225) -Fix: split the endian-detection to target/host. Now cross-compiling
truelight
parents:
1720
diff
changeset
|
918 |
@echo '===> Testing endianness for host' |
64d59b181596
(svn r2225) -Fix: split the endian-detection to target/host. Now cross-compiling
truelight
parents:
1720
diff
changeset
|
919 |
$(Q)./$(ENDIAN_CHECK) > $@ |
64d59b181596
(svn r2225) -Fix: split the endian-detection to target/host. Now cross-compiling
truelight
parents:
1720
diff
changeset
|
920 |
|
64d59b181596
(svn r2225) -Fix: split the endian-detection to target/host. Now cross-compiling
truelight
parents:
1720
diff
changeset
|
921 |
endian_target.h: $(ENDIAN_CHECK) |
64d59b181596
(svn r2225) -Fix: split the endian-detection to target/host. Now cross-compiling
truelight
parents:
1720
diff
changeset
|
922 |
@echo '===> Testing endianness for target' |
1692
2587eee1c632
(svn r2196) -Change: updated the Makefile, now it works for crossplatform compiling
TrueLight
parents:
1629
diff
changeset
|
923 |
$(Q)./$(ENDIAN_CHECK) $(ENDIAN_FORCE) > $@ |
157
dd017fa3bad8
(svn r158) -Fix: make endianess check 100% accurate (hopefully ;))
truelight
parents:
126
diff
changeset
|
924 |
|
dd017fa3bad8
(svn r158) -Fix: make endianess check 100% accurate (hopefully ;))
truelight
parents:
126
diff
changeset
|
925 |
$(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
|
926 |
@echo '===> Compiling and Linking $@' |
a6dc17991fa5
(svn r2841) Pimp the Makefile: Determining the header dependencies is now a separate step.
tron
parents:
2302
diff
changeset
|
927 |
$(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
|
928 |
|
0 | 929 |
|
3901
5f173c71d053
(svn r4989) -Fix: make the OSX Makefile stuff to work with the compile-farm
truelight
parents:
3900
diff
changeset
|
930 |
ifndef MACOSX_BUILD |
3354
88222b8dafef
(svn r4149) -Codechange: [OSX] rewrite of how universal binaries are compiled
bjarni
parents:
3341
diff
changeset
|
931 |
# OSX links in os/macosx/Makefile to handle universal binaries better |
2315
a6dc17991fa5
(svn r2841) Pimp the Makefile: Determining the header dependencies is now a separate step.
tron
parents:
2302
diff
changeset
|
932 |
$(TTD): $(OBJS) $(MAKE_CONFIG) |
a6dc17991fa5
(svn r2841) Pimp the Makefile: Determining the header dependencies is now a separate step.
tron
parents:
2302
diff
changeset
|
933 |
@echo '===> Linking $@' |
4094
a83fac319c4e
(svn r5426) - Makefile: Make the configure script work properly for setting target compilers; Set CC_TARGET / CXX_TARGET
peter1138
parents:
3994
diff
changeset
|
934 |
$(Q)$(CXX_TARGET) $(LDFLAGS) $(TTDLDFLAGS) $(OBJS) $(LIBS) -o $@ |
3354
88222b8dafef
(svn r4149) -Codechange: [OSX] rewrite of how universal binaries are compiled
bjarni
parents:
3341
diff
changeset
|
935 |
endif |
0 | 936 |
|
5108
dc67d70b5a45
(svn r7182) -Feature: Merge utf8 branch. This brings us support for Unicode/UTF-8 and the option for fonts rendered by FreeType. Language changes to come.
peter1138
parents:
5051
diff
changeset
|
937 |
$(STRGEN): strgen/strgen.c string.c endian_host.h table/control_codes.h |
2315
a6dc17991fa5
(svn r2841) Pimp the Makefile: Determining the header dependencies is now a separate step.
tron
parents:
2302
diff
changeset
|
938 |
@echo '===> Compiling and Linking $@' |
4370
c7bd128b1670
(svn r6089) -Backport r6088: added -s (source) and -d (destination) to strgen (Darkvater)
truelight
parents:
4324
diff
changeset
|
939 |
$(Q)$(CC_HOST) $(CFLAGS_HOST) -DSTRGEN strgen/strgen.c string.c -o $@ |
0 | 940 |
|
474 | 941 |
table/strings.h: lang/english.txt $(STRGEN) |
1118 | 942 |
@echo '===> Generating $@' |
4370
c7bd128b1670
(svn r6089) -Backport r6088: added -s (source) and -d (destination) to strgen (Darkvater)
truelight
parents:
4324
diff
changeset
|
943 |
$(Q)$(STRGEN) -s lang -d table |
222
b88456001397
(svn r223) -Fix: Const correctness and miscellaneous fixes. Thank you Tron for your diligent fixing of warnings (and some possibly bugs) (Tron)
darkvater
parents:
221
diff
changeset
|
944 |
|
476
ad012336ed61
(svn r727) The langauge files depend on english.txt, not strings.h
tron
parents:
475
diff
changeset
|
945 |
lang/%.lng: lang/%.txt $(STRGEN) lang/english.txt |
1118 | 946 |
@echo '===> Compiling language $(*F)' |
4370
c7bd128b1670
(svn r6089) -Backport r6088: added -s (source) and -d (destination) to strgen (Darkvater)
truelight
parents:
4324
diff
changeset
|
947 |
$(Q)$(STRGEN) $(STRGEN_FLAGS) -s lang -d lang $< $(LANG_ERRORS) || rm -f $@ |
0 | 948 |
|
770
89dab23f04ca
(svn r1236) MorphOS: added make release like in OSX (tokai)
bjarni
parents:
730
diff
changeset
|
949 |
ifdef MORPHOS |
3900
4984308f9125
(svn r4987) Feature: Merged YAPF into trunk. Thanks to devs for continuous support and users for testing.
KUDr
parents:
3866
diff
changeset
|
950 |
|
770
89dab23f04ca
(svn r1236) MorphOS: added make release like in OSX (tokai)
bjarni
parents:
730
diff
changeset
|
951 |
release: all |
5475
f57b2ad04098
(svn r9384) [0.5] -Fix: [MorphOS] updated make release to avoid the need to specify RELEASE when building
bjarni
parents:
5436
diff
changeset
|
952 |
$(Q)rm -fr "/t/openttd-$(REV)-morphos.lha" |
1413
4a93d8682e11
(svn r1917) - Makefile: Revamped VERBOSE support, build mechanics changed.
pasky
parents:
1411
diff
changeset
|
953 |
$(Q)mkdir -p "/t/" |
5475
f57b2ad04098
(svn r9384) [0.5] -Fix: [MorphOS] updated make release to avoid the need to specify RELEASE when building
bjarni
parents:
5436
diff
changeset
|
954 |
$(Q)mkdir -p "/t/openttd-$(REV)-morphos" |
f57b2ad04098
(svn r9384) [0.5] -Fix: [MorphOS] updated make release to avoid the need to specify RELEASE when building
bjarni
parents:
5436
diff
changeset
|
955 |
$(Q)mkdir -p "/t/openttd-$(REV)-morphos/docs" |
f57b2ad04098
(svn r9384) [0.5] -Fix: [MorphOS] updated make release to avoid the need to specify RELEASE when building
bjarni
parents:
5436
diff
changeset
|
956 |
$(Q)mkdir -p "/t/openttd-$(REV)-morphos/data" |
f57b2ad04098
(svn r9384) [0.5] -Fix: [MorphOS] updated make release to avoid the need to specify RELEASE when building
bjarni
parents:
5436
diff
changeset
|
957 |
$(Q)mkdir -p "/t/openttd-$(REV)-morphos/lang" |
f57b2ad04098
(svn r9384) [0.5] -Fix: [MorphOS] updated make release to avoid the need to specify RELEASE when building
bjarni
parents:
5436
diff
changeset
|
958 |
$(Q)mkdir -p "/t/openttd-$(REV)-morphos/scenario" |
f57b2ad04098
(svn r9384) [0.5] -Fix: [MorphOS] updated make release to avoid the need to specify RELEASE when building
bjarni
parents:
5436
diff
changeset
|
959 |
$(Q)mkdir -p "/t/openttd-$(REV)-morphos/scenario/heightmap" |
f57b2ad04098
(svn r9384) [0.5] -Fix: [MorphOS] updated make release to avoid the need to specify RELEASE when building
bjarni
parents:
5436
diff
changeset
|
960 |
$(Q)cp -R $(TTD) "/t/openttd-$(REV)-morphos/" |
f57b2ad04098
(svn r9384) [0.5] -Fix: [MorphOS] updated make release to avoid the need to specify RELEASE when building
bjarni
parents:
5436
diff
changeset
|
961 |
$(Q)cp data/* "/t/openttd-$(REV)-morphos/data/" |
f57b2ad04098
(svn r9384) [0.5] -Fix: [MorphOS] updated make release to avoid the need to specify RELEASE when building
bjarni
parents:
5436
diff
changeset
|
962 |
$(Q)cp lang/*.lng "/t/openttd-$(REV)-morphos/lang/" |
f57b2ad04098
(svn r9384) [0.5] -Fix: [MorphOS] updated make release to avoid the need to specify RELEASE when building
bjarni
parents:
5436
diff
changeset
|
963 |
$(Q)-cp scenario/*.scn "/t/openttd-$(REV)-morphos/scenario/" |
f57b2ad04098
(svn r9384) [0.5] -Fix: [MorphOS] updated make release to avoid the need to specify RELEASE when building
bjarni
parents:
5436
diff
changeset
|
964 |
$(Q)-cp scenario/heightmap/* "/t/openttd-$(REV)-morphos/scenario/heightmap/" |
f57b2ad04098
(svn r9384) [0.5] -Fix: [MorphOS] updated make release to avoid the need to specify RELEASE when building
bjarni
parents:
5436
diff
changeset
|
965 |
$(Q)cp readme.txt "/t/openttd-$(REV)-morphos/docs/ReadMe" |
f57b2ad04098
(svn r9384) [0.5] -Fix: [MorphOS] updated make release to avoid the need to specify RELEASE when building
bjarni
parents:
5436
diff
changeset
|
966 |
$(Q)cp COPYING "/t/openttd-$(REV)-morphos/docs/" |
f57b2ad04098
(svn r9384) [0.5] -Fix: [MorphOS] updated make release to avoid the need to specify RELEASE when building
bjarni
parents:
5436
diff
changeset
|
967 |
$(Q)cp changelog.txt "/t/openttd-$(REV)-morphos/docs/ChangeLog" |
f57b2ad04098
(svn r9384) [0.5] -Fix: [MorphOS] updated make release to avoid the need to specify RELEASE when building
bjarni
parents:
5436
diff
changeset
|
968 |
$(Q)cp known-bugs.txt "/t/openttd-$(REV)-morphos/docs/known-bugs.txt" |
f57b2ad04098
(svn r9384) [0.5] -Fix: [MorphOS] updated make release to avoid the need to specify RELEASE when building
bjarni
parents:
5436
diff
changeset
|
969 |
$(Q)cp os/morphos/icons/openttd.info "/t/openttd-$(REV)-morphos/$(TTD).info" |
f57b2ad04098
(svn r9384) [0.5] -Fix: [MorphOS] updated make release to avoid the need to specify RELEASE when building
bjarni
parents:
5436
diff
changeset
|
970 |
$(Q)cp os/morphos/icons/docs.info "/t/openttd-$(REV)-morphos/docs.info" |
f57b2ad04098
(svn r9384) [0.5] -Fix: [MorphOS] updated make release to avoid the need to specify RELEASE when building
bjarni
parents:
5436
diff
changeset
|
971 |
$(Q)cp os/morphos/icons/drawer.info "/t/openttd-$(REV)-morphos.info" |
f57b2ad04098
(svn r9384) [0.5] -Fix: [MorphOS] updated make release to avoid the need to specify RELEASE when building
bjarni
parents:
5436
diff
changeset
|
972 |
$(Q)strip --strip-all --strip-unneeded --remove-section .comment "/t/openttd-$(REV)-morphos/$(TTD)" |
f57b2ad04098
(svn r9384) [0.5] -Fix: [MorphOS] updated make release to avoid the need to specify RELEASE when building
bjarni
parents:
5436
diff
changeset
|
973 |
$(Q)lha a -r "t:openttd-$(REV)-morphos.lha" "t:openttd-$(REV)-morphos" |
f57b2ad04098
(svn r9384) [0.5] -Fix: [MorphOS] updated make release to avoid the need to specify RELEASE when building
bjarni
parents:
5436
diff
changeset
|
974 |
$(Q)lha a "t:openttd-$(REV)-morphos.lha" "t:openttd-$(REV)-morphos.info" |
f57b2ad04098
(svn r9384) [0.5] -Fix: [MorphOS] updated make release to avoid the need to specify RELEASE when building
bjarni
parents:
5436
diff
changeset
|
975 |
$(Q)rm -fr "/t/openttd-$(REV)-morphos" |
f57b2ad04098
(svn r9384) [0.5] -Fix: [MorphOS] updated make release to avoid the need to specify RELEASE when building
bjarni
parents:
5436
diff
changeset
|
976 |
$(Q)rm -fr "/t/openttd-$(REV)-morphos.info" |
770
89dab23f04ca
(svn r1236) MorphOS: added make release like in OSX (tokai)
bjarni
parents:
730
diff
changeset
|
977 |
@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
|
978 |
|
1251 | 979 |
.PHONY: release |
770
89dab23f04ca
(svn r1236) MorphOS: added make release like in OSX (tokai)
bjarni
parents:
730
diff
changeset
|
980 |
endif |
89dab23f04ca
(svn r1236) MorphOS: added make release like in OSX (tokai)
bjarni
parents:
730
diff
changeset
|
981 |
|
0 | 982 |
rev.c: FORCE |
983 |
@# 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
|
984 |
@echo 'const char _openttd_revision[] = "$(REV)";' >>rev.c.new |
0 | 985 |
@# some additions for MorphOS versions tag |
986 |
@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
|
987 |
@echo 'const char morphos_versions_tag[] = "\\0$$VER: OpenTTD $(REV) ('${BUILDDATE}') © OpenTTD Team [MorphOS, PowerPC]";' >>rev.c.new |
0 | 988 |
@echo '#endif' >>rev.c.new |
989 |
@# Only update the real rev.c if it actually changed, to prevent |
|
990 |
@# useless rebuilds. |
|
991 |
@cmp -s rev.c rev.c.new 2>/dev/null || mv rev.c.new rev.c |
|
992 |
@rm -f rev.c.new |
|
993 |
||
994 |
FORCE: |
|
995 |
||
996 |
||
997 |
clean: |
|
1118 | 998 |
@echo '===> Cleaning up' |
1721
64d59b181596
(svn r2225) -Fix: split the endian-detection to target/host. Now cross-compiling
truelight
parents:
1720
diff
changeset
|
999 |
# endian.h is out-dated and no longer in use, so it can be removed soon |
4562 | 1000 |
$(Q)rm -rf .deps *~ $(TTD) $(STRGEN) core table/strings.h $(LANGS) $(OBJS) $(OSX_MIDI_PLAYER_FILE) endian.h endian_host.h endian_target.h $(ENDIAN_CHECK) .OSX |
0 | 1001 |
|
1002 |
mrproper: clean |
|
1413
4a93d8682e11
(svn r1917) - Makefile: Revamped VERBOSE support, build mechanics changed.
pasky
parents:
1411
diff
changeset
|
1003 |
$(Q)rm -rf $(MAKE_CONFIG) |
0 | 1004 |
|
1005 |
ifndef OSX |
|
1006 |
ifndef MORPHOS |
|
1007 |
install: |
|
285 | 1008 |
ifeq ($(INSTALL),) |
1009 |
$(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
|
1010 |
tested very much - use at your own risk - to use run \"make install INSTALL:=1\" - make sure Makefile.config\ |
0 | 1011 |
is set correctly up - run \"make upgradeconf\") |
285 | 1012 |
endif |
1013 |
||
543
e3b43338096b
(svn r942) -Merged branch/network back into the trunk
truelight
parents:
532
diff
changeset
|
1014 |
ifeq ($(PREFIX), ) |
1492
e03a8c6f7efd
(svn r1996) makefile.config -> Makefile.config, that's its name.
pasky
parents:
1491
diff
changeset
|
1015 |
$(error no prefix set - check Makefile.config) |
285 | 1016 |
endif |
1017 |
# We compare against the non prefixed version here, so we won't install |
|
1018 |
# if only the prefix has been set |
|
1019 |
ifeq ($(DATA_DIR),) |
|
1492
e03a8c6f7efd
(svn r1996) makefile.config -> Makefile.config, that's its name.
pasky
parents:
1491
diff
changeset
|
1020 |
$(error no data path set - check Makefile.config) |
285 | 1021 |
endif |
1022 |
ifeq ($(BINARY_DIR),) |
|
1492
e03a8c6f7efd
(svn r1996) makefile.config -> Makefile.config, that's its name.
pasky
parents:
1491
diff
changeset
|
1023 |
$(error no binary path set - check Makefile.config) |
285 | 1024 |
endif |
1025 |
# We'll install in $DEST_DIR instead of root if it is set (we don't |
|
1026 |
# 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
|
1027 |
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
|
1028 |
$(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
|
1029 |
$(DATA_DIR_INSTALL)/gm \ |
2948
edc063de1950
(svn r3507) - Fix: [Makefile] Make sure the ICON_DIR gets created before copying files there.
matthijs
parents:
2918
diff
changeset
|
1030 |
$(ICON_DIR_INSTALL) \ |
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
|
1031 |
$(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
|
1032 |
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
|
1033 |
mkdir -p $(PERSONAL_DIR)/scenario |
4374
ac31b17785dd
(svn r6104) -Fix: make install did not create a directory for the heightmaps
rubidium
parents:
4370
diff
changeset
|
1034 |
mkdir -p $(PERSONAL_DIR)/scenario/heightmap |
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
|
1035 |
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
|
1036 |
mkdir -p $(DATA_DIR_INSTALL)/scenario |
4374
ac31b17785dd
(svn r6104) -Fix: make install did not create a directory for the heightmaps
rubidium
parents:
4370
diff
changeset
|
1037 |
mkdir -p $(DATA_DIR_INSTALL)/scenario/heightmap |
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
|
1038 |
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
|
1039 |
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
|
1040 |
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
|
1041 |
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
|
1042 |
install -m 644 data/opntitle.dat $(DATA_DIR_INSTALL)/data |
5362
4a0088602828
(svn r7662) -Backport from trunk (r7557, r7624):
Darkvater
parents:
5305
diff
changeset
|
1043 |
# Generic menu icon |
2901
6adc1bdca953
(svn r3456) - Feature: [Makefile] Icons can now be installed in a seperate directory.
matthijs
parents:
2835
diff
changeset
|
1044 |
install -m 644 media/openttd.64.png $(ICON_DIR_INSTALL) |
5362
4a0088602828
(svn r7662) -Backport from trunk (r7557, r7624):
Darkvater
parents:
5305
diff
changeset
|
1045 |
# Debian menu icon |
2901
6adc1bdca953
(svn r3456) - Feature: [Makefile] Icons can now be installed in a seperate directory.
matthijs
parents:
2835
diff
changeset
|
1046 |
install -m 644 media/openttd.32.xpm $(ICON_DIR_INSTALL) |
5362
4a0088602828
(svn r7662) -Backport from trunk (r7557, r7624):
Darkvater
parents:
5305
diff
changeset
|
1047 |
# Window icon |
4a0088602828
(svn r7662) -Backport from trunk (r7557, r7624):
Darkvater
parents:
5305
diff
changeset
|
1048 |
install -m 644 media/openttd.32.bmp $(ICON_DIR_INSTALL) |
0 | 1049 |
else #MorphOS |
1050 |
install: |
|
1051 |
$(error make install is not supported on MorphOS) |
|
1052 |
endif |
|
1053 |
else # OSX |
|
1054 |
install: |
|
1055 |
$(error make install is not supported on MacOSX) |
|
1056 |
endif |
|
1057 |
||
1058 |
||
1059 |
love: |
|
1060 |
@echo "YES! I thought you would never ask. We will have a great time. You can keep me turned on all night" |
|
1061 |
||
2576
8f68e7d7d941
(svn r3113) -Fix: The Makefile had 64bit code which was obsolete, not to say wrong.
truelight
parents:
2555
diff
changeset
|
1062 |
.PHONY: clean all $(OSX) install love |
0 | 1063 |
|
1064 |
||
1065 |
### Automatic configuration |
|
1066 |
-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
|
1067 |
|
0 | 1068 |
|
1069 |
# Export all variables set to subprocesses (a bit dirty) |
|
1070 |
.EXPORT_ALL_VARIABLES: |
|
1071 |
upgradeconf: $(MAKE_CONFIG) |
|
1413
4a93d8682e11
(svn r1917) - Makefile: Revamped VERBOSE support, build mechanics changed.
pasky
parents:
1411
diff
changeset
|
1072 |
$(Q)rm $(MAKE_CONFIG) |
4a93d8682e11
(svn r1917) - Makefile: Revamped VERBOSE support, build mechanics changed.
pasky
parents:
1411
diff
changeset
|
1073 |
$(Q)$(MAKE) $(MAKE_CONFIG) |
0 | 1074 |
|
1075 |
.PHONY: upgradeconf |
|
1076 |
||
1077 |
||
1078 |
### Internal build rules |
|
1079 |
||
1080 |
# 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
|
1081 |
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
|
1082 |
|
8295dd48c42c
(svn r3340) Fix dependency calculation: dependencies didn't get recalculated if a header file changed
tron
parents:
2779
diff
changeset
|
1083 |
depend: |
8295dd48c42c
(svn r3340) Fix dependency calculation: dependencies didn't get recalculated if a header file changed
tron
parents:
2779
diff
changeset
|
1084 |
@true # The include handles this automagically |
0 | 1085 |
|
1086 |
# Introduce the dependencies |
|
4562 | 1087 |
ifeq ($(findstring $(MAKECMDGOALS), clean info mrproper upgradeconf $(MAKE_CONFIG)),) |
1167
d8b7601118cf
(svn r1669) Rename all ttd_XXX to just XXX, because we already know who we are (;
tron
parents:
1164
diff
changeset
|
1088 |
-include $(DEPS) |
2315
a6dc17991fa5
(svn r2841) Pimp the Makefile: Determining the header dependencies is now a separate step.
tron
parents:
2302
diff
changeset
|
1089 |
endif |
0 | 1090 |
|
2792
8295dd48c42c
(svn r3340) Fix dependency calculation: dependencies didn't get recalculated if a header file changed
tron
parents:
2779
diff
changeset
|
1091 |
# 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
|
1092 |
%.h: |
8295dd48c42c
(svn r3340) Fix dependency calculation: dependencies didn't get recalculated if a header file changed
tron
parents:
2779
diff
changeset
|
1093 |
@true |
1170
1cd3103acd66
(svn r1672) Simplify dependency tracking and actually implement it for C++ files, too.
tron
parents:
1169
diff
changeset
|
1094 |
|
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
|
1095 |
.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
|
1096 |
@echo '===> DEP $<' |
4094
a83fac319c4e
(svn r5426) - Makefile: Make the configure script work properly for setting target compilers; Set CC_TARGET / CXX_TARGET
peter1138
parents:
3994
diff
changeset
|
1097 |
$(Q)$(CC_TARGET) $(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
|
1098 |
|
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
|
1099 |
.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
|
1100 |
@echo '===> DEP $<' |
4094
a83fac319c4e
(svn r5426) - Makefile: Make the configure script work properly for setting target compilers; Set CC_TARGET / CXX_TARGET
peter1138
parents:
3994
diff
changeset
|
1101 |
$(Q)$(CXX_TARGET) $(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
|
1102 |
|
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
|
1103 |
.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
|
1104 |
@echo '===> DEP $<' |
4094
a83fac319c4e
(svn r5426) - Makefile: Make the configure script work properly for setting target compilers; Set CC_TARGET / CXX_TARGET
peter1138
parents:
3994
diff
changeset
|
1105 |
$(Q)$(CC_TARGET) $(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
|
1106 |
|
a6dc17991fa5
(svn r2841) Pimp the Makefile: Determining the header dependencies is now a separate step.
tron
parents:
2302
diff
changeset
|
1107 |
|
3901
5f173c71d053
(svn r4989) -Fix: make the OSX Makefile stuff to work with the compile-farm
truelight
parents:
3900
diff
changeset
|
1108 |
ifndef MACOSX_BUILD |
3354
88222b8dafef
(svn r4149) -Codechange: [OSX] rewrite of how universal binaries are compiled
bjarni
parents:
3341
diff
changeset
|
1109 |
# OSX uses os/macosx/Makefile to compile files |
2315
a6dc17991fa5
(svn r2841) Pimp the Makefile: Determining the header dependencies is now a separate step.
tron
parents:
2302
diff
changeset
|
1110 |
%.o: %.c $(MAKE_CONFIG) |
a6dc17991fa5
(svn r2841) Pimp the Makefile: Determining the header dependencies is now a separate step.
tron
parents:
2302
diff
changeset
|
1111 |
@echo '===> Compiling $<' |
4094
a83fac319c4e
(svn r5426) - Makefile: Make the configure script work properly for setting target compilers; Set CC_TARGET / CXX_TARGET
peter1138
parents:
3994
diff
changeset
|
1112 |
$(Q)$(CC_TARGET) $(CC_CFLAGS) $(CFLAGS) $(CDEFS) -c -o $@ $< |
2315
a6dc17991fa5
(svn r2841) Pimp the Makefile: Determining the header dependencies is now a separate step.
tron
parents:
2302
diff
changeset
|
1113 |
|
a6dc17991fa5
(svn r2841) Pimp the Makefile: Determining the header dependencies is now a separate step.
tron
parents:
2302
diff
changeset
|
1114 |
%.o: %.cpp $(MAKE_CONFIG) |
a6dc17991fa5
(svn r2841) Pimp the Makefile: Determining the header dependencies is now a separate step.
tron
parents:
2302
diff
changeset
|
1115 |
@echo '===> Compiling $<' |
4094
a83fac319c4e
(svn r5426) - Makefile: Make the configure script work properly for setting target compilers; Set CC_TARGET / CXX_TARGET
peter1138
parents:
3994
diff
changeset
|
1116 |
$(Q)$(CXX_TARGET) $(CFLAGS) $(CDEFS) -c -o $@ $< |
2315
a6dc17991fa5
(svn r2841) Pimp the Makefile: Determining the header dependencies is now a separate step.
tron
parents:
2302
diff
changeset
|
1117 |
|
a6dc17991fa5
(svn r2841) Pimp the Makefile: Determining the header dependencies is now a separate step.
tron
parents:
2302
diff
changeset
|
1118 |
%.o: %.m $(MAKE_CONFIG) |
a6dc17991fa5
(svn r2841) Pimp the Makefile: Determining the header dependencies is now a separate step.
tron
parents:
2302
diff
changeset
|
1119 |
@echo '===> Compiling $<' |
4094
a83fac319c4e
(svn r5426) - Makefile: Make the configure script work properly for setting target compilers; Set CC_TARGET / CXX_TARGET
peter1138
parents:
3994
diff
changeset
|
1120 |
$(Q)$(CC_TARGET) $(CC_CFLAGS) $(CFLAGS) $(CDEFS) -c -o $@ $< |
3211
044f84240f65
(svn r3882) -Codechange: [OSX] changed the way universal and tripple binaries are build
bjarni
parents:
3197
diff
changeset
|
1121 |
endif |
1163
044430212516
(svn r1665) Remove VERBOSE flag, because it was only partially implemented
tron
parents:
1162
diff
changeset
|
1122 |
|
2742
bfa51fe0dac5
(svn r3287) Turn the winres.o: openttd.rc special case into a normal %.o: %.rc rule
tron
parents:
2736
diff
changeset
|
1123 |
%.o: %.rc |
bfa51fe0dac5
(svn r3287) Turn the winres.o: openttd.rc special case into a normal %.o: %.rc rule
tron
parents:
2736
diff
changeset
|
1124 |
@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
|
1125 |
$(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
|
1126 |
|
1163
044430212516
(svn r1665) Remove VERBOSE flag, because it was only partially implemented
tron
parents:
1162
diff
changeset
|
1127 |
|
044430212516
(svn r1665) Remove VERBOSE flag, because it was only partially implemented
tron
parents:
1162
diff
changeset
|
1128 |
info: |
1435
89d0c6a56a9b
(svn r1939) Revert part of r1938 which accidently crept in
tron
parents:
1434
diff
changeset
|
1129 |
@echo 'CFLAGS = $(CFLAGS)' |
1163
044430212516
(svn r1665) Remove VERBOSE flag, because it was only partially implemented
tron
parents:
1162
diff
changeset
|
1130 |
@echo 'LDFLAGS = $(LDFLAGS)' |
044430212516
(svn r1665) Remove VERBOSE flag, because it was only partially implemented
tron
parents:
1162
diff
changeset
|
1131 |
@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
|
1132 |
@echo 'CDEFS = $(CDEFS)' |