author | miham |
Wed, 17 Aug 2005 12:30:07 +0000 | |
changeset 2349 | df02d0ffb588 |
parent 2340 | 0a9f3eeccb96 |
child 2356 | 9277224514f6 |
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 |
|
46 |
# |
|
47 |
# Summary of other defines: |
|
48 |
# MANUAL_CONFIG: do not use Makefile.config, config options set manually |
|
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 |
285 | 82 |
# PERSONAL_DIR: The directory where openttd.cfg and the save folder will be |
83 |
# stored. You cannot use ~ here, define USE_HOMEDIR for that. |
|
84 |
# USE_HOMEDIR: If this variable is set, PERSONAL_DIR will be prefixed with |
|
85 |
# ~/ at runtime (the user's homedir) |
|
561
e3b9689745ab
(svn r970) Added 2nd data path for all non-windows OSes
bjarni
parents:
551
diff
changeset
|
86 |
# SECOND_DATA_PATH Use this data dir if a file is not found in the data dir in the data path |
1251 | 87 |
# 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
|
88 |
# 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
|
89 |
# NOTE: both SECOND_DATA_PATH and CUSTOM_LANG_PATH uses paths relative to where OTTD is opened |
285 | 90 |
# |
91 |
# DEST_DIR: make install will use this directory instead of the filesystem |
|
92 |
# root to install its files. This should normally not be used by |
|
93 |
# ordinary users, currently it is only used for the debian |
|
94 |
# packaging. This value should only be set when calling `make |
|
95 |
# 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
|
96 |
# (Note that DESTDIR is checked if DEST_DIR is not set.) |
0 | 97 |
# |
98 |
# STATIC: link statically |
|
99 |
# CYGWIN: build in Cygwin environment |
|
100 |
# MINGW: build with MingW compiler, link with MingW libraries |
|
101 |
# |
|
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
|
102 |
# 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
|
103 |
# |
1692
2587eee1c632
(svn r2196) -Change: updated the Makefile, now it works for crossplatform compiling
TrueLight
parents:
1629
diff
changeset
|
104 |
# 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
|
105 |
# |
2587eee1c632
(svn r2196) -Change: updated the Makefile, now it works for crossplatform compiling
TrueLight
parents:
1629
diff
changeset
|
106 |
# ENDIAN_FORCE: forces the endian-check to give a certain result. Can be either BE or LE. |
2587eee1c632
(svn r2196) -Change: updated the Makefile, now it works for crossplatform compiling
TrueLight
parents:
1629
diff
changeset
|
107 |
# WINDRES: the location of your windres |
2587eee1c632
(svn r2196) -Change: updated the Makefile, now it works for crossplatform compiling
TrueLight
parents:
1629
diff
changeset
|
108 |
# 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
|
109 |
# 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
|
110 |
# windows executables on linux. (just: CFLAGS_HOST:='-I' or something) |
0 | 111 |
|
112 |
||
113 |
############################################################################## |
|
114 |
# |
|
115 |
# Configuration |
|
116 |
# |
|
117 |
||
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
|
118 |
|
180
47ee14fe2b35
(svn r181) Makefile: enabled ability to supress output of missing strings in lng files
bjarni
parents:
164
diff
changeset
|
119 |
# Makefile version tag |
1492
e03a8c6f7efd
(svn r1996) makefile.config -> Makefile.config, that's its name.
pasky
parents:
1491
diff
changeset
|
120 |
# it checks if the version tag in Makefile.config is the same and force update outdated config files |
1692
2587eee1c632
(svn r2196) -Change: updated the Makefile, now it works for crossplatform compiling
TrueLight
parents:
1629
diff
changeset
|
121 |
MAKEFILE_VERSION:=7 |
180
47ee14fe2b35
(svn r181) Makefile: enabled ability to supress output of missing strings in lng files
bjarni
parents:
164
diff
changeset
|
122 |
|
1146 | 123 |
# CONFIG_WRITER has to be found even for manual configuration |
0 | 124 |
CONFIG_WRITER=makefiledir/Makefile.config_writer |
125 |
||
126 |
ifndef MANUAL_CONFIG |
|
127 |
# Automatic configuration |
|
128 |
MAKE_CONFIG:=Makefile.config |
|
129 |
MAKEFILE:=Makefile |
|
130 |
LIB_DETECTION=makefiledir/Makefile.libdetection |
|
131 |
CONFIG_WRITER=makefiledir/Makefile.config_writer |
|
132 |
||
133 |
# Apply automatic configuration |
|
134 |
# See target section for how this is built, suppress errors |
|
135 |
# since first time it isn't found but make reads this twice |
|
136 |
-include $(MAKE_CONFIG) |
|
137 |
else |
|
138 |
CONFIG_INCLUDED:=1 |
|
139 |
endif |
|
140 |
||
1955
52a84e880864
(svn r2461) -Feature [Makefile] libpng-config can now be called something else in Makefile.config
bjarni
parents:
1952
diff
changeset
|
141 |
ifndef LIBPNG-CONFIG |
52a84e880864
(svn r2461) -Feature [Makefile] libpng-config can now be called something else in Makefile.config
bjarni
parents:
1952
diff
changeset
|
142 |
LIBPNG-CONFIG :=libpng-config |
52a84e880864
(svn r2461) -Feature [Makefile] libpng-config can now be called something else in Makefile.config
bjarni
parents:
1952
diff
changeset
|
143 |
endif |
52a84e880864
(svn r2461) -Feature [Makefile] libpng-config can now be called something else in Makefile.config
bjarni
parents:
1952
diff
changeset
|
144 |
|
1492
e03a8c6f7efd
(svn r1996) makefile.config -> Makefile.config, that's its name.
pasky
parents:
1491
diff
changeset
|
145 |
# 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
|
146 |
ifneq ($(MAKEFILE_VERSION),$(CONFIG_VERSION)) |
189
4d133909845a
(svn r190) Makefile: fixed bug, that prevented compilation with MANUAL_CONFIG enabled
bjarni
parents:
180
diff
changeset
|
147 |
ifndef MANUAL_CONFIG # manual config should not check this |
4d133909845a
(svn r190) Makefile: fixed bug, that prevented compilation with MANUAL_CONFIG enabled
bjarni
parents:
180
diff
changeset
|
148 |
UPDATECONFIG:=upgradeconf |
4d133909845a
(svn r190) Makefile: fixed bug, that prevented compilation with MANUAL_CONFIG enabled
bjarni
parents:
180
diff
changeset
|
149 |
CONFIG_INCLUDED:= |
4d133909845a
(svn r190) Makefile: fixed bug, that prevented compilation with MANUAL_CONFIG enabled
bjarni
parents:
180
diff
changeset
|
150 |
else |
4d133909845a
(svn r190) Makefile: fixed bug, that prevented compilation with MANUAL_CONFIG enabled
bjarni
parents:
180
diff
changeset
|
151 |
# this should define SDL-CONFIG for manual configuration |
4d133909845a
(svn r190) Makefile: fixed bug, that prevented compilation with MANUAL_CONFIG enabled
bjarni
parents:
180
diff
changeset
|
152 |
ifeq ($(shell uname),FreeBSD) |
4d133909845a
(svn r190) Makefile: fixed bug, that prevented compilation with MANUAL_CONFIG enabled
bjarni
parents:
180
diff
changeset
|
153 |
SDL-CONFIG:=sdl11-config |
4d133909845a
(svn r190) Makefile: fixed bug, that prevented compilation with MANUAL_CONFIG enabled
bjarni
parents:
180
diff
changeset
|
154 |
else |
4d133909845a
(svn r190) Makefile: fixed bug, that prevented compilation with MANUAL_CONFIG enabled
bjarni
parents:
180
diff
changeset
|
155 |
SDL-CONFIG:=sdl-config |
4d133909845a
(svn r190) Makefile: fixed bug, that prevented compilation with MANUAL_CONFIG enabled
bjarni
parents:
180
diff
changeset
|
156 |
endif |
4d133909845a
(svn r190) Makefile: fixed bug, that prevented compilation with MANUAL_CONFIG enabled
bjarni
parents:
180
diff
changeset
|
157 |
endif |
1693
e3a6eedee876
(svn r2197) -fix [Makefile]: SDL_CONFIG from makefile.config is now not always overwritten
bjarni
parents:
1692
diff
changeset
|
158 |
endif |
e3a6eedee876
(svn r2197) -fix [Makefile]: SDL_CONFIG from makefile.config is now not always overwritten
bjarni
parents:
1692
diff
changeset
|
159 |
|
e3a6eedee876
(svn r2197) -fix [Makefile]: SDL_CONFIG from makefile.config is now not always overwritten
bjarni
parents:
1692
diff
changeset
|
160 |
ifndef SDL-CONFIG |
e3a6eedee876
(svn r2197) -fix [Makefile]: SDL_CONFIG from makefile.config is now not always overwritten
bjarni
parents:
1692
diff
changeset
|
161 |
UPDATECONFIG:=upgradeconf |
e3a6eedee876
(svn r2197) -fix [Makefile]: SDL_CONFIG from makefile.config is now not always overwritten
bjarni
parents:
1692
diff
changeset
|
162 |
CONFIG_INCLUDED:= |
0 | 163 |
endif |
164 |
||
1492
e03a8c6f7efd
(svn r1996) makefile.config -> Makefile.config, that's its name.
pasky
parents:
1491
diff
changeset
|
165 |
# this is used if there aren't any Makefile.config |
0 | 166 |
ifndef CONFIG_INCLUDED |
285 | 167 |
# 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
|
168 |
ENABLE_NETWORK:=1 |
285 | 169 |
|
170 |
# paths for make install |
|
171 |
# disabled as they would break it for some (many?) people if they were default |
|
172 |
#PREFIX:=/usr/local |
|
173 |
#DATA_DIR:=share/games/openttd |
|
174 |
#BINARY_DIR:=games |
|
175 |
#PERSONAL_DIR:=.openttd |
|
176 |
#USE_HOMEDIR:=1 |
|
177 |
||
0 | 178 |
-include $(LIB_DETECTION) |
179 |
endif |
|
180 |
||
180
47ee14fe2b35
(svn r181) Makefile: enabled ability to supress output of missing strings in lng files
bjarni
parents:
164
diff
changeset
|
181 |
ifdef SUPRESS_LANG_ERRORS |
47ee14fe2b35
(svn r181) Makefile: enabled ability to supress output of missing strings in lng files
bjarni
parents:
164
diff
changeset
|
182 |
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
|
183 |
endif |
47ee14fe2b35
(svn r181) Makefile: enabled ability to supress output of missing strings in lng files
bjarni
parents:
164
diff
changeset
|
184 |
|
0 | 185 |
ifdef STATIC |
186 |
ifndef WIN32 |
|
187 |
ifndef OSX |
|
188 |
ifndef MORPHOS |
|
189 |
ifndef SKIP_STATIC_CHECK |
|
1492
e03a8c6f7efd
(svn r1996) makefile.config -> Makefile.config, that's its name.
pasky
parents:
1491
diff
changeset
|
190 |
$(error Static is only known to work on MorphOS and MacOSX!!! --- Check Makefile.config for more info and howto bypass this check) |
0 | 191 |
endif |
192 |
endif |
|
193 |
endif |
|
194 |
endif |
|
195 |
endif |
|
196 |
||
580
be080525ea08
(svn r1000) Makefile: added check for static build releases on mac. Most users can't use a dynamic build
bjarni
parents:
574
diff
changeset
|
197 |
ifdef RELEASE |
be080525ea08
(svn r1000) Makefile: added check for static build releases on mac. Most users can't use a dynamic build
bjarni
parents:
574
diff
changeset
|
198 |
ifdef OSX |
be080525ea08
(svn r1000) Makefile: added check for static build releases on mac. Most users can't use a dynamic build
bjarni
parents:
574
diff
changeset
|
199 |
ifndef STATIC |
be080525ea08
(svn r1000) Makefile: added check for static build releases on mac. Most users can't use a dynamic build
bjarni
parents:
574
diff
changeset
|
200 |
$(error do not make dynamically linked releases. Most users can't use those) |
be080525ea08
(svn r1000) Makefile: added check for static build releases on mac. Most users can't use a dynamic build
bjarni
parents:
574
diff
changeset
|
201 |
endif |
be080525ea08
(svn r1000) Makefile: added check for static build releases on mac. Most users can't use a dynamic build
bjarni
parents:
574
diff
changeset
|
202 |
endif |
be080525ea08
(svn r1000) Makefile: added check for static build releases on mac. Most users can't use a dynamic build
bjarni
parents:
574
diff
changeset
|
203 |
endif |
0 | 204 |
|
205 |
# Force SDL on UNIX platforms |
|
206 |
ifndef WITH_SDL |
|
207 |
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
|
208 |
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
|
209 |
$(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 | 210 |
endif |
211 |
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
|
212 |
endif |
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
|
213 |
|
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
|
214 |
# remove the dependancy for sdl if DEDICALTED is used |
1952
499b7bd9f63c
(svn r2458) -Fix: Quickfix to make dedicated-server compile again. We need a more ellegant way to fix this...
truelight
parents:
1951
diff
changeset
|
215 |
# and add -lpthread to LDFLAGS, because SDL normally adds that... |
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
|
216 |
ifdef DEDICATED |
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
|
217 |
WITH_SDL:= |
2298
64a87da01248
(svn r2822) -Fix: don't compile pthread for win32 dedicated servers
truelight
parents:
2291
diff
changeset
|
218 |
ifndef WIN32 |
2299
480d89e53ab1
(svn r2823) -Fix: MorphOS doesn't have pthread either!
truelight
parents:
2298
diff
changeset
|
219 |
ifndef MORPHOS |
2300
d85dbbd78fd5
(svn r2824) -Fix: OSX can now also produce dedicated servers
truelight
parents:
2299
diff
changeset
|
220 |
ifndef OSX |
1952
499b7bd9f63c
(svn r2458) -Fix: Quickfix to make dedicated-server compile again. We need a more ellegant way to fix this...
truelight
parents:
1951
diff
changeset
|
221 |
LDFLAGS+=-lpthread |
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
|
222 |
endif |
2298
64a87da01248
(svn r2822) -Fix: don't compile pthread for win32 dedicated servers
truelight
parents:
2291
diff
changeset
|
223 |
endif |
2299
480d89e53ab1
(svn r2823) -Fix: MorphOS doesn't have pthread either!
truelight
parents:
2298
diff
changeset
|
224 |
endif |
2300
d85dbbd78fd5
(svn r2824) -Fix: OSX can now also produce dedicated servers
truelight
parents:
2299
diff
changeset
|
225 |
ifdef OSX |
d85dbbd78fd5
(svn r2824) -Fix: OSX can now also produce dedicated servers
truelight
parents:
2299
diff
changeset
|
226 |
LDFLAGS+=-framework Cocoa |
d85dbbd78fd5
(svn r2824) -Fix: OSX can now also produce dedicated servers
truelight
parents:
2299
diff
changeset
|
227 |
endif |
d85dbbd78fd5
(svn r2824) -Fix: OSX can now also produce dedicated servers
truelight
parents:
2299
diff
changeset
|
228 |
endif |
0 | 229 |
|
230 |
||
231 |
############################################################################## |
|
232 |
# |
|
233 |
# Compiler configuration |
|
234 |
# |
|
235 |
||
236 |
# Executable file extension |
|
237 |
ifdef WIN32 |
|
238 |
EXE=.exe |
|
239 |
else |
|
240 |
EXE= |
|
241 |
endif |
|
242 |
||
243 |
# Set output executable names |
|
32 | 244 |
TTD=openttd$(EXE) |
157
dd017fa3bad8
(svn r158) -Fix: make endianess check 100% accurate (hopefully ;))
truelight
parents:
126
diff
changeset
|
245 |
ENDIAN_CHECK=endian_check$(EXE) |
0 | 246 |
STRGEN=strgen/strgen$(EXE) |
247 |
OSXAPP="OpenTTD.app" |
|
248 |
||
249 |
ifdef RELEASE |
|
250 |
REV:=$(RELEASE) |
|
251 |
else |
|
450 | 252 |
REV := $(shell if test -d .svn; then svnversion . | awk '{ print "r"$$0 }'; fi) |
0 | 253 |
endif |
254 |
||
255 |
# 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
|
256 |
BUILDDATE=`date +%d.%m.%y` |
0 | 257 |
|
258 |
# AMD64 needs a little more settings to work |
|
259 |
ifeq ($(shell uname -m), x86_64) |
|
260 |
endwarnings:=endwarnings |
|
261 |
64_bit_warnings:=64_bit_warnings |
|
157
dd017fa3bad8
(svn r158) -Fix: make endianess check 100% accurate (hopefully ;))
truelight
parents:
126
diff
changeset
|
262 |
BASECFLAGS += -m64 |
0 | 263 |
endif |
264 |
||
1692
2587eee1c632
(svn r2196) -Change: updated the Makefile, now it works for crossplatform compiling
TrueLight
parents:
1629
diff
changeset
|
265 |
# 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
|
266 |
ifndef WINDRES |
2587eee1c632
(svn r2196) -Change: updated the Makefile, now it works for crossplatform compiling
TrueLight
parents:
1629
diff
changeset
|
267 |
WINDRES = windres |
2587eee1c632
(svn r2196) -Change: updated the Makefile, now it works for crossplatform compiling
TrueLight
parents:
1629
diff
changeset
|
268 |
endif |
2587eee1c632
(svn r2196) -Change: updated the Makefile, now it works for crossplatform compiling
TrueLight
parents:
1629
diff
changeset
|
269 |
|
2587eee1c632
(svn r2196) -Change: updated the Makefile, now it works for crossplatform compiling
TrueLight
parents:
1629
diff
changeset
|
270 |
# Check if we have a new target |
2587eee1c632
(svn r2196) -Change: updated the Makefile, now it works for crossplatform compiling
TrueLight
parents:
1629
diff
changeset
|
271 |
ifdef CC_TARGET |
2587eee1c632
(svn r2196) -Change: updated the Makefile, now it works for crossplatform compiling
TrueLight
parents:
1629
diff
changeset
|
272 |
CC = $(CC_TARGET) |
2587eee1c632
(svn r2196) -Change: updated the Makefile, now it works for crossplatform compiling
TrueLight
parents:
1629
diff
changeset
|
273 |
endif |
2587eee1c632
(svn r2196) -Change: updated the Makefile, now it works for crossplatform compiling
TrueLight
parents:
1629
diff
changeset
|
274 |
|
2587eee1c632
(svn r2196) -Change: updated the Makefile, now it works for crossplatform compiling
TrueLight
parents:
1629
diff
changeset
|
275 |
# 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
|
276 |
ifndef CC_HOST |
2587eee1c632
(svn r2196) -Change: updated the Makefile, now it works for crossplatform compiling
TrueLight
parents:
1629
diff
changeset
|
277 |
CC_HOST = $(CC) |
2587eee1c632
(svn r2196) -Change: updated the Makefile, now it works for crossplatform compiling
TrueLight
parents:
1629
diff
changeset
|
278 |
endif |
2587eee1c632
(svn r2196) -Change: updated the Makefile, now it works for crossplatform compiling
TrueLight
parents:
1629
diff
changeset
|
279 |
ifndef CFLAGS_HOST |
2587eee1c632
(svn r2196) -Change: updated the Makefile, now it works for crossplatform compiling
TrueLight
parents:
1629
diff
changeset
|
280 |
CFLAGS_HOST = $(BASECFLAGS) |
2587eee1c632
(svn r2196) -Change: updated the Makefile, now it works for crossplatform compiling
TrueLight
parents:
1629
diff
changeset
|
281 |
endif |
0 | 282 |
|
283 |
||
1069
922f5c7be173
(svn r1570) Make the gcc version test work with old versions of test (i.e. don't use the < operator)
tron
parents:
1052
diff
changeset
|
284 |
CC_VERSION = $(shell $(CC) -dumpversion | cut -c 1,3) |
1052
53e669371277
(svn r1553) Check which gcc version is present and only set availible compiler flags
tron
parents:
1051
diff
changeset
|
285 |
|
53e669371277
(svn r1553) Check which gcc version is present and only set availible compiler flags
tron
parents:
1051
diff
changeset
|
286 |
# 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
|
287 |
# 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
|
288 |
ifeq ($(shell expr $(CC_VERSION) \>= 29), 1) |
1093
e8d26c7dc42f
(svn r1594) Convert all undefined parameter lists to (void) and add the appropriate warning flags in the Makefile
tron
parents:
1069
diff
changeset
|
289 |
CFLAGS += -O -Wall -Wno-multichar -Wsign-compare -Wstrict-prototypes |
1324
ff8b7799b44f
(svn r1828) New warning flag especially for truelight (:<
tron
parents:
1317
diff
changeset
|
290 |
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
|
291 |
endif |
2240
8f18d87a4b5c
(svn r2760) Remove stale comments, long unused stuff and simplify some checks
tron
parents:
2236
diff
changeset
|
292 |
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
|
293 |
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
|
294 |
endif |
2240
8f18d87a4b5c
(svn r2760) Remove stale comments, long unused stuff and simplify some checks
tron
parents:
2236
diff
changeset
|
295 |
ifeq ($(shell expr $(CC_VERSION) \>= 34), 1) |
1093
e8d26c7dc42f
(svn r1594) Convert all undefined parameter lists to (void) and add the appropriate warning flags in the Makefile
tron
parents:
1069
diff
changeset
|
296 |
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
|
297 |
endif |
53e669371277
(svn r1553) Check which gcc version is present and only set availible compiler flags
tron
parents:
1051
diff
changeset
|
298 |
|
1240
90b225e69c23
(svn r1744) DEBUG and PROFILE can be used at the same time.
tron
parents:
1211
diff
changeset
|
299 |
ifdef DEBUG |
1479
3bb687fbe344
(svn r1983) Introduce multiple compile time debug levels
tron
parents:
1476
diff
changeset
|
300 |
ifeq ($(shell expr $(DEBUG) \>= 1), 1) |
3bb687fbe344
(svn r1983) Introduce multiple compile time debug levels
tron
parents:
1476
diff
changeset
|
301 |
CFLAGS += -g -D_DEBUG |
3bb687fbe344
(svn r1983) Introduce multiple compile time debug levels
tron
parents:
1476
diff
changeset
|
302 |
endif |
3bb687fbe344
(svn r1983) Introduce multiple compile time debug levels
tron
parents:
1476
diff
changeset
|
303 |
ifeq ($(shell expr $(DEBUG) \>= 2), 1) |
3bb687fbe344
(svn r1983) Introduce multiple compile time debug levels
tron
parents:
1476
diff
changeset
|
304 |
CFLAGS += -fno-inline |
3bb687fbe344
(svn r1983) Introduce multiple compile time debug levels
tron
parents:
1476
diff
changeset
|
305 |
endif |
3bb687fbe344
(svn r1983) Introduce multiple compile time debug levels
tron
parents:
1476
diff
changeset
|
306 |
ifeq ($(shell expr $(DEBUG) \>= 3), 1) |
3bb687fbe344
(svn r1983) Introduce multiple compile time debug levels
tron
parents:
1476
diff
changeset
|
307 |
CFLAGS += -O0 |
3bb687fbe344
(svn r1983) Introduce multiple compile time debug levels
tron
parents:
1476
diff
changeset
|
308 |
endif |
1240
90b225e69c23
(svn r1744) DEBUG and PROFILE can be used at the same time.
tron
parents:
1211
diff
changeset
|
309 |
endif |
90b225e69c23
(svn r1744) DEBUG and PROFILE can be used at the same time.
tron
parents:
1211
diff
changeset
|
310 |
|
90b225e69c23
(svn r1744) DEBUG and PROFILE can be used at the same time.
tron
parents:
1211
diff
changeset
|
311 |
ifdef PROFILE |
90b225e69c23
(svn r1744) DEBUG and PROFILE can be used at the same time.
tron
parents:
1211
diff
changeset
|
312 |
CFLAGS += -pg |
90b225e69c23
(svn r1744) DEBUG and PROFILE can be used at the same time.
tron
parents:
1211
diff
changeset
|
313 |
LDFLAGS += -pg |
90b225e69c23
(svn r1744) DEBUG and PROFILE can be used at the same time.
tron
parents:
1211
diff
changeset
|
314 |
endif |
90b225e69c23
(svn r1744) DEBUG and PROFILE can be used at the same time.
tron
parents:
1211
diff
changeset
|
315 |
|
0 | 316 |
CDEFS=-DWITH_REV |
317 |
||
1240
90b225e69c23
(svn r1744) DEBUG and PROFILE can be used at the same time.
tron
parents:
1211
diff
changeset
|
318 |
ifndef DEBUG |
90b225e69c23
(svn r1744) DEBUG and PROFILE can be used at the same time.
tron
parents:
1211
diff
changeset
|
319 |
ifndef PROFILE |
0 | 320 |
# Release mode |
321 |
ifndef MORPHOS |
|
1810
bf33a29287e5
(svn r2314) - Feature: [ 1187490 ] Patches for building on IRIX (jgilje)
Darkvater
parents:
1722
diff
changeset
|
322 |
ifndef IRIX |
0 | 323 |
# automatical strip breaks under morphos |
324 |
BASECFLAGS += -s |
|
325 |
LDFLAGS += -s |
|
326 |
endif |
|
327 |
endif |
|
1810
bf33a29287e5
(svn r2314) - Feature: [ 1187490 ] Patches for building on IRIX (jgilje)
Darkvater
parents:
1722
diff
changeset
|
328 |
endif |
0 | 329 |
|
330 |
ifdef OSX |
|
331 |
# these compilerflags makes the app run as fast as possible without making the app unstable. It works on G3 or newer |
|
1169
30e8657f61d0
(svn r1671) Remove WARNING_DISPLAY, because it contained no warning, but an optimization flag
tron
parents:
1168
diff
changeset
|
332 |
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 -mpowerpc-gpopt -force_cpusubtype_ALL |
0 | 333 |
else |
334 |
ifdef MORPHOS |
|
1291 | 335 |
BASECFLAGS += -O2 -noixemul -fstrict-aliasing -fexpensive-optimizations |
336 |
BASECFLAGS += -mcpu=604 -fno-inline -mstring -mmultiple |
|
0 | 337 |
else |
1169
30e8657f61d0
(svn r1671) Remove WARNING_DISPLAY, because it contained no warning, but an optimization flag
tron
parents:
1168
diff
changeset
|
338 |
BASECFLAGS += -O2 |
0 | 339 |
endif |
340 |
ifndef PROFILE |
|
1810
bf33a29287e5
(svn r2314) - Feature: [ 1187490 ] Patches for building on IRIX (jgilje)
Darkvater
parents:
1722
diff
changeset
|
341 |
ifndef IRIX |
0 | 342 |
BASECFLAGS += -fomit-frame-pointer |
343 |
endif |
|
344 |
endif |
|
345 |
endif |
|
1810
bf33a29287e5
(svn r2314) - Feature: [ 1187490 ] Patches for building on IRIX (jgilje)
Darkvater
parents:
1722
diff
changeset
|
346 |
endif |
0 | 347 |
|
348 |
ifdef STATIC |
|
349 |
ifndef OSX # OSX can't build static if -static flag is used |
|
350 |
LDFLAGS += -static |
|
351 |
endif |
|
352 |
endif |
|
353 |
||
798 | 354 |
# If building on MingW don't link with Cygwin libs |
0 | 355 |
ifdef WIN32 |
798 | 356 |
ifdef CYGWIN |
357 |
BASECFLAGS += -mwin32 |
|
358 |
LDFLAGS += -mwin32 |
|
359 |
endif |
|
0 | 360 |
ifdef MINGW |
361 |
BASECFLAGS += -mno-cygwin |
|
362 |
LDFLAGS += -mno-cygwin |
|
363 |
endif |
|
364 |
endif |
|
365 |
||
366 |
CFLAGS += $(BASECFLAGS) |
|
367 |
||
2033
1eb15b79b6f3
(svn r2542) -Add: [GPMI] Added GPMI (http://sourceforge.net/projects/libgpmi/)
truelight
parents:
2008
diff
changeset
|
368 |
# See if we want to enable GPMI |
1eb15b79b6f3
(svn r2542) -Add: [GPMI] Added GPMI (http://sourceforge.net/projects/libgpmi/)
truelight
parents:
2008
diff
changeset
|
369 |
ifdef GPMI |
1eb15b79b6f3
(svn r2542) -Add: [GPMI] Added GPMI (http://sourceforge.net/projects/libgpmi/)
truelight
parents:
2008
diff
changeset
|
370 |
CFLAGS += -DGPMI |
1eb15b79b6f3
(svn r2542) -Add: [GPMI] Added GPMI (http://sourceforge.net/projects/libgpmi/)
truelight
parents:
2008
diff
changeset
|
371 |
GPMI_STATIC_PATH = `gpmi-config --static` |
1eb15b79b6f3
(svn r2542) -Add: [GPMI] Added GPMI (http://sourceforge.net/projects/libgpmi/)
truelight
parents:
2008
diff
changeset
|
372 |
LDFLAGS += -rdynamic `gpmi-config --libs` |
1eb15b79b6f3
(svn r2542) -Add: [GPMI] Added GPMI (http://sourceforge.net/projects/libgpmi/)
truelight
parents:
2008
diff
changeset
|
373 |
# Static link paths into the game |
1eb15b79b6f3
(svn r2542) -Add: [GPMI] Added GPMI (http://sourceforge.net/projects/libgpmi/)
truelight
parents:
2008
diff
changeset
|
374 |
LDFLAGS += $(GPMI_STATIC_PATH)/paths-static.o |
1eb15b79b6f3
(svn r2542) -Add: [GPMI] Added GPMI (http://sourceforge.net/projects/libgpmi/)
truelight
parents:
2008
diff
changeset
|
375 |
endif |
1eb15b79b6f3
(svn r2542) -Add: [GPMI] Added GPMI (http://sourceforge.net/projects/libgpmi/)
truelight
parents:
2008
diff
changeset
|
376 |
|
0 | 377 |
ifdef UNIX |
378 |
CDEFS += -DUNIX |
|
379 |
endif |
|
380 |
||
421
0b9bdcdfe0c5
(svn r619) Add the necessary bits to make building under BeOS using GNU Make work
tron
parents:
413
diff
changeset
|
381 |
ifdef BEOS |
0b9bdcdfe0c5
(svn r619) Add the necessary bits to make building under BeOS using GNU Make work
tron
parents:
413
diff
changeset
|
382 |
CDEFS += -DBEOS |
0b9bdcdfe0c5
(svn r619) Add the necessary bits to make building under BeOS using GNU Make work
tron
parents:
413
diff
changeset
|
383 |
LDFLAGS += -lmidi -lbe |
0b9bdcdfe0c5
(svn r619) Add the necessary bits to make building under BeOS using GNU Make work
tron
parents:
413
diff
changeset
|
384 |
ifdef WITH_NETWORK |
0b9bdcdfe0c5
(svn r619) Add the necessary bits to make building under BeOS using GNU Make work
tron
parents:
413
diff
changeset
|
385 |
ifdef BEOS_NET_SERVER |
1051 | 386 |
CDEFS += -DBEOS_NET_SERVER |
387 |
else |
|
388 |
# Zeta needs a few more libraries than R5 |
|
389 |
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
|
390 |
endif |
0b9bdcdfe0c5
(svn r619) Add the necessary bits to make building under BeOS using GNU Make work
tron
parents:
413
diff
changeset
|
391 |
endif |
0b9bdcdfe0c5
(svn r619) Add the necessary bits to make building under BeOS using GNU Make work
tron
parents:
413
diff
changeset
|
392 |
endif |
0b9bdcdfe0c5
(svn r619) Add the necessary bits to make building under BeOS using GNU Make work
tron
parents:
413
diff
changeset
|
393 |
|
1164
01c12c2f1973
(svn r1666) Move some MorphOS compile flags to a place where they actually belong
tron
parents:
1163
diff
changeset
|
394 |
ifdef MORPHOS |
1291 | 395 |
# -Wstrict-prototypes generates much noise because of system headers |
396 |
CFLAGS += -Wno-strict-prototypes |
|
1164
01c12c2f1973
(svn r1666) Move some MorphOS compile flags to a place where they actually belong
tron
parents:
1163
diff
changeset
|
397 |
endif |
01c12c2f1973
(svn r1666) Move some MorphOS compile flags to a place where they actually belong
tron
parents:
1163
diff
changeset
|
398 |
|
446
20304ea8e94e
(svn r655) Add the necessary bits to make building on SunOS/Solaris work
tron
parents:
421
diff
changeset
|
399 |
ifdef SUNOS |
20304ea8e94e
(svn r655) Add the necessary bits to make building on SunOS/Solaris work
tron
parents:
421
diff
changeset
|
400 |
CDEFS += -DSUNOS |
20304ea8e94e
(svn r655) Add the necessary bits to make building on SunOS/Solaris work
tron
parents:
421
diff
changeset
|
401 |
ifdef WITH_NETWORK |
20304ea8e94e
(svn r655) Add the necessary bits to make building on SunOS/Solaris work
tron
parents:
421
diff
changeset
|
402 |
LDFLAGS += -lnsl -lsocket |
20304ea8e94e
(svn r655) Add the necessary bits to make building on SunOS/Solaris work
tron
parents:
421
diff
changeset
|
403 |
endif |
20304ea8e94e
(svn r655) Add the necessary bits to make building on SunOS/Solaris work
tron
parents:
421
diff
changeset
|
404 |
endif |
20304ea8e94e
(svn r655) Add the necessary bits to make building on SunOS/Solaris work
tron
parents:
421
diff
changeset
|
405 |
|
0 | 406 |
# SDL config |
407 |
ifdef WITH_SDL |
|
408 |
CDEFS += -DWITH_SDL |
|
1254
c3705f146d8a
(svn r1758) Replace `` with $(shell), because the latter is only evaluated once instead of over and over again
tron
parents:
1251
diff
changeset
|
409 |
CFLAGS += $(shell $(SDL-CONFIG) --cflags) |
0 | 410 |
ifdef STATIC |
1254
c3705f146d8a
(svn r1758) Replace `` with $(shell), because the latter is only evaluated once instead of over and over again
tron
parents:
1251
diff
changeset
|
411 |
LIBS += $(shell $(SDL-CONFIG) --static-libs) |
0 | 412 |
else |
1254
c3705f146d8a
(svn r1758) Replace `` with $(shell), because the latter is only evaluated once instead of over and over again
tron
parents:
1251
diff
changeset
|
413 |
LIBS += $(shell $(SDL-CONFIG) --libs) |
0 | 414 |
endif |
415 |
endif |
|
416 |
||
417 |
||
418 |
# zlib config |
|
419 |
ifdef WITH_ZLIB |
|
420 |
CDEFS += -DWITH_ZLIB |
|
421 |
ifdef STATIC |
|
422 |
ifdef OSX |
|
423 |
# zlib is default on OSX, so everybody have it. No need for static linking |
|
424 |
LIBS += -lz |
|
425 |
else |
|
426 |
ifndef STATIC_ZLIB_PATH |
|
427 |
ifndef MANUAL_CONFIG |
|
1492
e03a8c6f7efd
(svn r1996) makefile.config -> Makefile.config, that's its name.
pasky
parents:
1491
diff
changeset
|
428 |
# updates Makefile.config with the zlib path |
0 | 429 |
UPDATECONFIG:=upgradeconf |
430 |
endif |
|
431 |
TEMP:=$(shell ls /lib 2>/dev/null | grep "zlib.a")$(shell ls /lib 2>/dev/null | grep "libz.a") |
|
432 |
ifdef TEMP |
|
433 |
STATIC_ZLIB_PATH:=/lib/$(TEMP) |
|
434 |
else |
|
435 |
TEMP:=$(shell ls /usr/lib 2>/dev/null | grep "zlib.a")$(shell ls /usr/lib 2>/dev/null | grep "libz.a") |
|
436 |
ifdef TEMP |
|
437 |
STATIC_ZLIB_PATH:=/usr/lib/$(TEMP) |
|
438 |
else |
|
439 |
TEMP:=$(shell ls /usr/local/lib 2>/dev/null | grep "zlib.a")$(shell ls /usr/local/lib 2>/dev/null | grep "libz.a") |
|
440 |
ifdef TEMP |
|
441 |
STATIC_ZLIB_PATH:=/usr/local/lib/$(TEMP) |
|
442 |
endif |
|
443 |
endif |
|
444 |
endif |
|
445 |
endif |
|
446 |
LIBS += $(STATIC_ZLIB_PATH) |
|
447 |
endif |
|
448 |
else |
|
449 |
LIBS += -lz |
|
450 |
endif |
|
451 |
endif |
|
452 |
||
453 |
# libpng config |
|
454 |
ifdef WITH_PNG |
|
455 |
CDEFS += -DWITH_PNG |
|
2315
a6dc17991fa5
(svn r2841) Pimp the Makefile: Determining the header dependencies is now a separate step.
tron
parents:
2302
diff
changeset
|
456 |
CFLAGS += $(shell $(LIBPNG-CONFIG) --cppflags --I_opts) |
551
48dc69ef0e94
(svn r951) Makefile: fixed missing flag for libpng, which prevented lib detection if SDL was not used
bjarni
parents:
549
diff
changeset
|
457 |
|
0 | 458 |
# seems like older libpng versions are broken and need this |
459 |
PNGCONFIG_FLAGS = --ldflags --libs |
|
460 |
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
|
461 |
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
|
462 |
# Seems like we need a tiny hack for OSX static to work |
1955
52a84e880864
(svn r2461) -Feature [Makefile] libpng-config can now be called something else in Makefile.config
bjarni
parents:
1952
diff
changeset
|
463 |
LIBS += $(shell $(LIBPNG-CONFIG) --prefix)/lib/libpng.a |
583
3bcdf7a0c2f7
(svn r1003) Mac: reintroduced the static libpng hack in makefile since it appears to be needed in the nightly builds
bjarni
parents:
580
diff
changeset
|
464 |
else |
1955
52a84e880864
(svn r2461) -Feature [Makefile] libpng-config can now be called something else in Makefile.config
bjarni
parents:
1952
diff
changeset
|
465 |
LIBS += $(shell $(LIBPNG-CONFIG) --static $(PNGCONFIG_FLAGS)) |
583
3bcdf7a0c2f7
(svn r1003) Mac: reintroduced the static libpng hack in makefile since it appears to be needed in the nightly builds
bjarni
parents:
580
diff
changeset
|
466 |
endif |
0 | 467 |
else |
1955
52a84e880864
(svn r2461) -Feature [Makefile] libpng-config can now be called something else in Makefile.config
bjarni
parents:
1952
diff
changeset
|
468 |
LIBS += $(shell $(LIBPNG-CONFIG) --L_opts $(PNGCONFIG_FLAGS)) |
0 | 469 |
endif |
470 |
endif |
|
471 |
||
347
892935295937
(svn r530) Makefile: added ability to switch asserts on and off
bjarni
parents:
285
diff
changeset
|
472 |
# enables/disables assert() |
348
959f425dc282
(svn r531) Makefile: made asserts enabled by default
bjarni
parents:
347
diff
changeset
|
473 |
ifdef DISABLE_ASSERTS |
959f425dc282
(svn r531) Makefile: made asserts enabled by default
bjarni
parents:
347
diff
changeset
|
474 |
CFLAGS += -DNDEBUG |
959f425dc282
(svn r531) Makefile: made asserts enabled by default
bjarni
parents:
347
diff
changeset
|
475 |
endif |
959f425dc282
(svn r531) Makefile: made asserts enabled by default
bjarni
parents:
347
diff
changeset
|
476 |
|
959f425dc282
(svn r531) Makefile: made asserts enabled by default
bjarni
parents:
347
diff
changeset
|
477 |
# automatically disables asserts for release |
959f425dc282
(svn r531) Makefile: made asserts enabled by default
bjarni
parents:
347
diff
changeset
|
478 |
ifdef RELEASE |
347
892935295937
(svn r530) Makefile: added ability to switch asserts on and off
bjarni
parents:
285
diff
changeset
|
479 |
ifndef ENABLE_ASSERTS |
892935295937
(svn r530) Makefile: added ability to switch asserts on and off
bjarni
parents:
285
diff
changeset
|
480 |
CFLAGS += -DNDEBUG |
892935295937
(svn r530) Makefile: added ability to switch asserts on and off
bjarni
parents:
285
diff
changeset
|
481 |
endif |
348
959f425dc282
(svn r531) Makefile: made asserts enabled by default
bjarni
parents:
347
diff
changeset
|
482 |
endif |
0 | 483 |
|
484 |
ifdef TRANSLATOR |
|
485 |
STRGEN_FLAGS=-t |
|
486 |
else |
|
487 |
STRGEN_FLAGS= |
|
488 |
endif |
|
489 |
||
490 |
||
491 |
# MIDI setup |
|
492 |
ifdef OSX |
|
493 |
ifndef MIDI |
|
1951
dea2c67cc9a8
(svn r2457) -Fix: typo in Makefile for OSX builds
truelight
parents:
1942
diff
changeset
|
494 |
MIDI:=$(OSXAPP)/Contents/MacOS/track_starter |
0 | 495 |
endif |
561
e3b9689745ab
(svn r970) Added 2nd data path for all non-windows OSes
bjarni
parents:
551
diff
changeset
|
496 |
ifndef SECOND_DATA_PATH |
1720
b53cf8e5cd44
(svn r2224) -Fix: capital-correctness for OSX-dir-names
truelight
parents:
1694
diff
changeset
|
497 |
SECOND_DATA_PATH:="$(OSXAPP)/Contents/Data/" |
561
e3b9689745ab
(svn r970) Added 2nd data path for all non-windows OSes
bjarni
parents:
551
diff
changeset
|
498 |
endif |
e3b9689745ab
(svn r970) Added 2nd data path for all non-windows OSes
bjarni
parents:
551
diff
changeset
|
499 |
ifndef CUSTOM_LANG_DIR |
1720
b53cf8e5cd44
(svn r2224) -Fix: capital-correctness for OSX-dir-names
truelight
parents:
1694
diff
changeset
|
500 |
CUSTOM_LANG_DIR:="$(OSXAPP)/Contents/Lang/" |
561
e3b9689745ab
(svn r970) Added 2nd data path for all non-windows OSes
bjarni
parents:
551
diff
changeset
|
501 |
endif |
0 | 502 |
endif |
503 |
||
504 |
ifdef MIDI |
|
505 |
CDEFS += -DEXTERNAL_PLAYER=\"$(MIDI)\" |
|
506 |
ifdef MIDI_ARG |
|
507 |
CDEFS += -DMIDI_ARG=\"$(MIDI_ARG)\" |
|
508 |
endif |
|
509 |
endif |
|
510 |
||
511 |
ifdef WITH_NETWORK |
|
512 |
CDEFS += -DENABLE_NETWORK |
|
543
e3b43338096b
(svn r942) -Merged branch/network back into the trunk
truelight
parents:
532
diff
changeset
|
513 |
ifdef QNX |
e3b43338096b
(svn r942) -Merged branch/network back into the trunk
truelight
parents:
532
diff
changeset
|
514 |
LIBS += -lsocket |
e3b43338096b
(svn r942) -Merged branch/network back into the trunk
truelight
parents:
532
diff
changeset
|
515 |
endif |
0 | 516 |
endif |
517 |
||
561
e3b9689745ab
(svn r970) Added 2nd data path for all non-windows OSes
bjarni
parents:
551
diff
changeset
|
518 |
|
e3b9689745ab
(svn r970) Added 2nd data path for all non-windows OSes
bjarni
parents:
551
diff
changeset
|
519 |
ifdef SECOND_DATA_PATH |
e3b9689745ab
(svn r970) Added 2nd data path for all non-windows OSes
bjarni
parents:
551
diff
changeset
|
520 |
CDEFS += -DSECOND_DATA_DIR=\"$(SECOND_DATA_PATH)/\" |
e3b9689745ab
(svn r970) Added 2nd data path for all non-windows OSes
bjarni
parents:
551
diff
changeset
|
521 |
endif |
e3b9689745ab
(svn r970) Added 2nd data path for all non-windows OSes
bjarni
parents:
551
diff
changeset
|
522 |
|
e3b9689745ab
(svn r970) Added 2nd data path for all non-windows OSes
bjarni
parents:
551
diff
changeset
|
523 |
ifdef CUSTOM_LANG_DIR |
e3b9689745ab
(svn r970) Added 2nd data path for all non-windows OSes
bjarni
parents:
551
diff
changeset
|
524 |
CDEFS += -DCUSTOM_LANG_DIR=\"$(CUSTOM_LANG_DIR)/\" |
e3b9689745ab
(svn r970) Added 2nd data path for all non-windows OSes
bjarni
parents:
551
diff
changeset
|
525 |
endif |
e3b9689745ab
(svn r970) Added 2nd data path for all non-windows OSes
bjarni
parents:
551
diff
changeset
|
526 |
|
0 | 527 |
ifdef WITH_DIRECTMUSIC |
528 |
CDEFS += -DWIN32_ENABLE_DIRECTMUSIC_SUPPORT |
|
529 |
endif |
|
530 |
||
531 |
ifdef WIN32 |
|
1692
2587eee1c632
(svn r2196) -Change: updated the Makefile, now it works for crossplatform compiling
TrueLight
parents:
1629
diff
changeset
|
532 |
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
|
533 |
ifdef WITH_DIRECTMUSIC |
2587eee1c632
(svn r2196) -Change: updated the Makefile, now it works for crossplatform compiling
TrueLight
parents:
1629
diff
changeset
|
534 |
LIBS += -lstdc++ |
2587eee1c632
(svn r2196) -Change: updated the Makefile, now it works for crossplatform compiling
TrueLight
parents:
1629
diff
changeset
|
535 |
endif |
0 | 536 |
TTDLDFLAGS += -Wl,--subsystem,windows |
537 |
endif |
|
538 |
||
1476
abbcea18a01c
(svn r1980) Check $DESTDIR if $DEST_DIR was not set.
pasky
parents:
1435
diff
changeset
|
539 |
ifndef DEST_DIR |
abbcea18a01c
(svn r1980) Check $DESTDIR if $DEST_DIR was not set.
pasky
parents:
1435
diff
changeset
|
540 |
DEST_DIR = $(DESTDIR) |
abbcea18a01c
(svn r1980) Check $DESTDIR if $DEST_DIR was not set.
pasky
parents:
1435
diff
changeset
|
541 |
endif |
abbcea18a01c
(svn r1980) Check $DESTDIR if $DEST_DIR was not set.
pasky
parents:
1435
diff
changeset
|
542 |
|
0 | 543 |
# sets up the paths for use for make install |
285 | 544 |
ifdef INSTALL |
545 |
# We use _PREFIXED vars here, so the paths are recalculated every time, and |
|
546 |
# the prefix is not prepended in the makefile config |
|
547 |
BINARY_DIR_PREFIXED:=$(PREFIX)/$(BINARY_DIR) |
|
548 |
DATA_DIR_PREFIXED:=$(PREFIX)/$(DATA_DIR) |
|
549 |
# We use _INSTALL vars here, these vars are the locations where the files will |
|
550 |
# be installed |
|
551 |
DATA_DIR_INSTALL=$(DEST_DIR)/$(DATA_DIR_PREFIXED) |
|
552 |
BINARY_DIR_INSTALL=$(DEST_DIR)/$(BINARY_DIR_PREFIXED) |
|
553 |
# Let the code know where to find stuff |
|
554 |
ifdef DATA_DIR_PREFIXED |
|
555 |
CDEFS += -DGAME_DATA_DIR=\"$(DATA_DIR_PREFIXED)/\" |
|
0 | 556 |
endif |
285 | 557 |
|
558 |
ifdef PERSONAL_DIR |
|
559 |
CDEFS += -DPERSONAL_DIR=\"$(PERSONAL_DIR)/\" |
|
560 |
endif |
|
561 |
||
562 |
ifdef USE_HOMEDIR |
|
563 |
CDEFS += -DUSE_HOMEDIR |
|
564 |
endif |
|
0 | 565 |
endif |
566 |
||
567 |
############################################################################## |
|
568 |
# |
|
569 |
# What to compile |
|
570 |
# (users do not want to modify anything below) |
|
571 |
# |
|
572 |
||
573 |
||
574 |
### Sources |
|
575 |
||
2096
3043c62401d0
(svn r2606) -Codechange: renamed ai.c to ai_old.c, and ai.h to ai_new.h to make room
truelight
parents:
2075
diff
changeset
|
576 |
C_SOURCES += ai_old.c |
677 | 577 |
C_SOURCES += ai_build.c |
578 |
C_SOURCES += ai_new.c |
|
579 |
C_SOURCES += ai_pathfinder.c |
|
580 |
C_SOURCES += ai_shared.c |
|
581 |
C_SOURCES += aircraft_cmd.c |
|
582 |
C_SOURCES += aircraft_gui.c |
|
583 |
C_SOURCES += airport.c |
|
584 |
C_SOURCES += airport_gui.c |
|
585 |
C_SOURCES += aystar.c |
|
586 |
C_SOURCES += bridge_gui.c |
|
587 |
C_SOURCES += callback_table.c |
|
588 |
C_SOURCES += clear_cmd.c |
|
589 |
C_SOURCES += command.c |
|
590 |
C_SOURCES += console.c |
|
591 |
C_SOURCES += console_cmds.c |
|
2291
2b064aa97f91
(svn r2815) Store the currency information in one central place instead of scattering it in several unrelated files
tron
parents:
2285
diff
changeset
|
592 |
C_SOURCES += currency.c |
1299
0a6510cc889b
(svn r1803) Move debugging stuff into files of it's own
tron
parents:
1292
diff
changeset
|
593 |
C_SOURCES += debug.c |
677 | 594 |
C_SOURCES += dedicated.c |
1313
bba6afb8a995
(svn r1817) -Codechange: Moved depot-functions to depot.c
truelight
parents:
1299
diff
changeset
|
595 |
C_SOURCES += depot.c |
677 | 596 |
C_SOURCES += disaster_cmd.c |
597 |
C_SOURCES += dock_gui.c |
|
2171
008122046f7f
(svn r2685) -Codechange: Split the music/sound/video drivers into separate files and move them into subfolders.
tron
parents:
2106
diff
changeset
|
598 |
C_SOURCES += driver.c |
677 | 599 |
C_SOURCES += dummy_land.c |
600 |
C_SOURCES += economy.c |
|
601 |
C_SOURCES += engine.c |
|
602 |
C_SOURCES += engine_gui.c |
|
603 |
C_SOURCES += fileio.c |
|
604 |
C_SOURCES += gfx.c |
|
2340
0a9f3eeccb96
(svn r2866) Move all functions and tables which aren't directly involved in managing the sprite heap to a new file gfxinit.c.
tron
parents:
2327
diff
changeset
|
605 |
C_SOURCES += gfxinit.c |
677 | 606 |
C_SOURCES += graph_gui.c |
607 |
C_SOURCES += newgrf.c |
|
608 |
C_SOURCES += industry_cmd.c |
|
609 |
C_SOURCES += industry_gui.c |
|
610 |
C_SOURCES += intro_gui.c |
|
611 |
C_SOURCES += landscape.c |
|
612 |
C_SOURCES += main_gui.c |
|
679
e959706a3e4d
(svn r1117) Move map arrays and some related macros into their own files map.c and map.h
tron
parents:
677
diff
changeset
|
613 |
C_SOURCES += map.c |
677 | 614 |
C_SOURCES += md5.c |
2075
7f0ca01392db
(svn r2585) - Fix [Makefile]: some small cleanups, remove warnings, and add mersenne to makefile (Luca)
Darkvater
parents:
2033
diff
changeset
|
615 |
C_SOURCES += mersenne.c |
677 | 616 |
C_SOURCES += minilzo.c |
617 |
C_SOURCES += misc.c |
|
618 |
C_SOURCES += misc_cmd.c |
|
619 |
C_SOURCES += misc_gui.c |
|
1496
3d0b86f5dcb8
(svn r2000) Split the sound system into backend (mixer.[ch]) and frontend (sound.[ch])
tron
parents:
1492
diff
changeset
|
620 |
C_SOURCES += mixer.c |
677 | 621 |
C_SOURCES += music_gui.c |
622 |
C_SOURCES += namegen.c |
|
623 |
C_SOURCES += network.c |
|
624 |
C_SOURCES += network_client.c |
|
625 |
C_SOURCES += network_data.c |
|
626 |
C_SOURCES += network_gamelist.c |
|
627 |
C_SOURCES += network_gui.c |
|
628 |
C_SOURCES += network_server.c |
|
629 |
C_SOURCES += network_udp.c |
|
630 |
C_SOURCES += news_gui.c |
|
1247 | 631 |
C_SOURCES += npf.c |
677 | 632 |
C_SOURCES += oldloader.c |
633 |
C_SOURCES += order_cmd.c |
|
634 |
C_SOURCES += order_gui.c |
|
1985
c4ec1653a337
(svn r2491) -Fix: Solved a performance problem introduced in r2467. While busy
celestar
parents:
1955
diff
changeset
|
635 |
C_SOURCES += openttd.c |
677 | 636 |
C_SOURCES += pathfind.c |
2008
c9d6585c96c8
(svn r2516) - Feature: [pbs] Implement path-based-signalling. This allows multiple trains within the same signal block, provided their paths dont intersect. For this the block must have all exit and entry signals be pbs signals. Place these by ctrl-clicking 4 times on a normal signal.
hackykid
parents:
1985
diff
changeset
|
637 |
C_SOURCES += pbs.c |
677 | 638 |
C_SOURCES += player_gui.c |
639 |
C_SOURCES += players.c |
|
1259
6dc9a1521c00
(svn r1763) -Add: pool.c / pool.h: generalized routines for dynamic arrays (MemoryPools)
truelight
parents:
1257
diff
changeset
|
640 |
C_SOURCES += pool.c |
677 | 641 |
C_SOURCES += queue.c |
1942
634961366cdc
(svn r2448) General cleanup of rail related code, more to follow.
matthijs
parents:
1891
diff
changeset
|
642 |
C_SOURCES += rail.c |
677 | 643 |
C_SOURCES += rail_cmd.c |
644 |
C_SOURCES += rail_gui.c |
|
645 |
C_SOURCES += rev.c |
|
646 |
C_SOURCES += road_cmd.c |
|
647 |
C_SOURCES += road_gui.c |
|
648 |
C_SOURCES += roadveh_cmd.c |
|
649 |
C_SOURCES += roadveh_gui.c |
|
650 |
C_SOURCES += saveload.c |
|
651 |
C_SOURCES += screenshot.c |
|
652 |
C_SOURCES += settings.c |
|
653 |
C_SOURCES += settings_gui.c |
|
654 |
C_SOURCES += ship_cmd.c |
|
655 |
C_SOURCES += ship_gui.c |
|
988
2482369a61ff
(svn r1486) -Codechange: moved all 'signs' stuff to signs.c/h and prepared it for
truelight
parents:
978
diff
changeset
|
656 |
C_SOURCES += signs.c |
677 | 657 |
C_SOURCES += smallmap_gui.c |
658 |
C_SOURCES += sound.c |
|
659 |
C_SOURCES += sprite.c |
|
660 |
C_SOURCES += spritecache.c |
|
661 |
C_SOURCES += station_cmd.c |
|
662 |
C_SOURCES += station_gui.c |
|
1317
f382f1b439c7
(svn r1821) Move generic string handling functions to string.[ch] and introduce stre{cpy,cat}, see string.h for their semantics
tron
parents:
1313
diff
changeset
|
663 |
C_SOURCES += string.c |
677 | 664 |
C_SOURCES += strings.c |
665 |
C_SOURCES += subsidy_gui.c |
|
666 |
C_SOURCES += terraform_gui.c |
|
667 |
C_SOURCES += texteff.c |
|
2285
3193cbd1ba88
(svn r2809) Implement more generic threading functions, which allow more than one thread
tron
parents:
2240
diff
changeset
|
668 |
C_SOURCES += thread.c |
1211 | 669 |
C_SOURCES += tile.c |
677 | 670 |
C_SOURCES += town_cmd.c |
671 |
C_SOURCES += town_gui.c |
|
672 |
C_SOURCES += train_cmd.c |
|
673 |
C_SOURCES += train_gui.c |
|
674 |
C_SOURCES += tree_cmd.c |
|
675 |
C_SOURCES += tunnelbridge_cmd.c |
|
676 |
C_SOURCES += unmovable_cmd.c |
|
677 |
C_SOURCES += vehicle.c |
|
678 |
C_SOURCES += vehicle_gui.c |
|
679 |
C_SOURCES += viewport.c |
|
680 |
C_SOURCES += water_cmd.c |
|
1542
2ca6d1624e6d
(svn r2046) -Codechange: moved all waypoint code to waypoint.c/waypoint.h
truelight
parents:
1496
diff
changeset
|
681 |
C_SOURCES += waypoint.c |
677 | 682 |
C_SOURCES += widget.c |
683 |
C_SOURCES += window.c |
|
2174
41d7c884dc52
(svn r2688) MSVC and Watcom can't handle identical file names in different directories, oh my...
tron
parents:
2171
diff
changeset
|
684 |
C_SOURCES += music/null_m.c |
41d7c884dc52
(svn r2688) MSVC and Watcom can't handle identical file names in different directories, oh my...
tron
parents:
2171
diff
changeset
|
685 |
C_SOURCES += sound/null_s.c |
2177
73d67828ea5e
(svn r2691) Separate dedicated video driver and fix bemidi declarations
tron
parents:
2174
diff
changeset
|
686 |
C_SOURCES += video/dedicated_v.c |
2174
41d7c884dc52
(svn r2688) MSVC and Watcom can't handle identical file names in different directories, oh my...
tron
parents:
2171
diff
changeset
|
687 |
C_SOURCES += video/null_v.c |
677 | 688 |
|
421
0b9bdcdfe0c5
(svn r619) Add the necessary bits to make building under BeOS using GNU Make work
tron
parents:
413
diff
changeset
|
689 |
CXX_SOURCES = |
0 | 690 |
|
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
|
691 |
OBJC_SOURCES = |
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
|
692 |
|
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
|
693 |
ifdef WITH_SDL |
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
|
694 |
C_SOURCES += sdl.c |
2174
41d7c884dc52
(svn r2688) MSVC and Watcom can't handle identical file names in different directories, oh my...
tron
parents:
2171
diff
changeset
|
695 |
C_SOURCES += sound/sdl_s.c |
41d7c884dc52
(svn r2688) MSVC and Watcom can't handle identical file names in different directories, oh my...
tron
parents:
2171
diff
changeset
|
696 |
C_SOURCES += 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
|
697 |
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
|
698 |
|
0 | 699 |
ifdef WIN32 |
2171
008122046f7f
(svn r2685) -Codechange: Split the music/sound/video drivers into separate files and move them into subfolders.
tron
parents:
2106
diff
changeset
|
700 |
C_SOURCES += win32.c |
2174
41d7c884dc52
(svn r2688) MSVC and Watcom can't handle identical file names in different directories, oh my...
tron
parents:
2171
diff
changeset
|
701 |
C_SOURCES += music/win32_m.c |
41d7c884dc52
(svn r2688) MSVC and Watcom can't handle identical file names in different directories, oh my...
tron
parents:
2171
diff
changeset
|
702 |
C_SOURCES += sound/win32_s.c |
41d7c884dc52
(svn r2688) MSVC and Watcom can't handle identical file names in different directories, oh my...
tron
parents:
2171
diff
changeset
|
703 |
C_SOURCES += video/win32_v.c |
0 | 704 |
else |
2171
008122046f7f
(svn r2685) -Codechange: Split the music/sound/video drivers into separate files and move them into subfolders.
tron
parents:
2106
diff
changeset
|
705 |
C_SOURCES += unix.c |
008122046f7f
(svn r2685) -Codechange: Split the music/sound/video drivers into separate files and move them into subfolders.
tron
parents:
2106
diff
changeset
|
706 |
C_SOURCES += music/extmidi.c |
0 | 707 |
endif |
708 |
||
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
|
709 |
ifdef OSX |
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
|
710 |
OBJC_SOURCES += os/macosx/macos.m |
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
|
711 |
endif |
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
|
712 |
|
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
|
713 |
OBJS = $(C_SOURCES:%.c=%.o) $(CXX_SOURCES:%.cpp=%.o) $(OBJC_SOURCES:%.m=%.o) |
421
0b9bdcdfe0c5
(svn r619) Add the necessary bits to make building under BeOS using GNU Make work
tron
parents:
413
diff
changeset
|
714 |
|
0b9bdcdfe0c5
(svn r619) Add the necessary bits to make building under BeOS using GNU Make work
tron
parents:
413
diff
changeset
|
715 |
ifdef BEOS |
2171
008122046f7f
(svn r2685) -Codechange: Split the music/sound/video drivers into separate files and move them into subfolders.
tron
parents:
2106
diff
changeset
|
716 |
CXX_SOURCES += 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
|
717 |
endif |
0 | 718 |
|
719 |
ifdef WIN32 |
|
720 |
# Resource file |
|
1167
d8b7601118cf
(svn r1669) Rename all ttd_XXX to just XXX, because we already know who we are (;
tron
parents:
1164
diff
changeset
|
721 |
OBJS += winres.o |
0 | 722 |
endif |
723 |
||
724 |
ifdef WITH_DIRECTMUSIC |
|
2197 | 725 |
CXX_SOURCES += music/dmusic.cpp |
0 | 726 |
endif |
727 |
||
1170
1cd3103acd66
(svn r1672) Simplify dependency tracking and actually implement it for C++ files, too.
tron
parents:
1169
diff
changeset
|
728 |
DEPS = $(OBJS:%.o=.deps/%.d) |
0 | 729 |
|
730 |
LANG_TXT = $(filter-out %.unfinished.txt,$(wildcard lang/*.txt)) |
|
731 |
LANGS = $(LANG_TXT:%.txt=%.lng) |
|
732 |
||
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
|
733 |
|
0 | 734 |
############################################################################## |
735 |
# |
|
1413
4a93d8682e11
(svn r1917) - Makefile: Revamped VERBOSE support, build mechanics changed.
pasky
parents:
1411
diff
changeset
|
736 |
# Build commands |
4a93d8682e11
(svn r1917) - Makefile: Revamped VERBOSE support, build mechanics changed.
pasky
parents:
1411
diff
changeset
|
737 |
# |
4a93d8682e11
(svn r1917) - Makefile: Revamped VERBOSE support, build mechanics changed.
pasky
parents:
1411
diff
changeset
|
738 |
|
4a93d8682e11
(svn r1917) - Makefile: Revamped VERBOSE support, build mechanics changed.
pasky
parents:
1411
diff
changeset
|
739 |
# If we are verbose, we will show commands prefixed by $(Q) (which acts as |
1435
89d0c6a56a9b
(svn r1939) Revert part of r1938 which accidently crept in
tron
parents:
1434
diff
changeset
|
740 |
# @ in the non-verbose mode), and we will show the "real" cmds instead of |
89d0c6a56a9b
(svn r1939) Revert part of r1938 which accidently crept in
tron
parents:
1434
diff
changeset
|
741 |
# their quiet versions (which are used in the non-verbose mode). |
1413
4a93d8682e11
(svn r1917) - Makefile: Revamped VERBOSE support, build mechanics changed.
pasky
parents:
1411
diff
changeset
|
742 |
# Inspired by the Linux kernel build system. |
4a93d8682e11
(svn r1917) - Makefile: Revamped VERBOSE support, build mechanics changed.
pasky
parents:
1411
diff
changeset
|
743 |
ifdef VERBOSE |
4a93d8682e11
(svn r1917) - Makefile: Revamped VERBOSE support, build mechanics changed.
pasky
parents:
1411
diff
changeset
|
744 |
Q = |
1435
89d0c6a56a9b
(svn r1939) Revert part of r1938 which accidently crept in
tron
parents:
1434
diff
changeset
|
745 |
quiet = |
1413
4a93d8682e11
(svn r1917) - Makefile: Revamped VERBOSE support, build mechanics changed.
pasky
parents:
1411
diff
changeset
|
746 |
else |
4a93d8682e11
(svn r1917) - Makefile: Revamped VERBOSE support, build mechanics changed.
pasky
parents:
1411
diff
changeset
|
747 |
Q = @ |
1435
89d0c6a56a9b
(svn r1939) Revert part of r1938 which accidently crept in
tron
parents:
1434
diff
changeset
|
748 |
quiet = quiet_ |
1413
4a93d8682e11
(svn r1917) - Makefile: Revamped VERBOSE support, build mechanics changed.
pasky
parents:
1411
diff
changeset
|
749 |
endif |
4a93d8682e11
(svn r1917) - Makefile: Revamped VERBOSE support, build mechanics changed.
pasky
parents:
1411
diff
changeset
|
750 |
|
4a93d8682e11
(svn r1917) - Makefile: Revamped VERBOSE support, build mechanics changed.
pasky
parents:
1411
diff
changeset
|
751 |
|
4a93d8682e11
(svn r1917) - Makefile: Revamped VERBOSE support, build mechanics changed.
pasky
parents:
1411
diff
changeset
|
752 |
############################################################################## |
4a93d8682e11
(svn r1917) - Makefile: Revamped VERBOSE support, build mechanics changed.
pasky
parents:
1411
diff
changeset
|
753 |
# |
0 | 754 |
# Targets |
755 |
# |
|
756 |
||
757 |
||
758 |
### Normal build rules |
|
759 |
||
760 |
||
761 |
ifdef OSX |
|
762 |
OSX:=OSX |
|
1822
8113e6ba4d8d
(svn r2327) -fix [MacOSX] default path for midi player on mac is now correct again
bjarni
parents:
1810
diff
changeset
|
763 |
OSX_MIDI_PLAYER_FILE:=os/macos/OpenTTDMidi.class |
0 | 764 |
endif |
765 |
||
766 |
||
1721
64d59b181596
(svn r2225) -Fix: split the endian-detection to target/host. Now cross-compiling
truelight
parents:
1720
diff
changeset
|
767 |
all: endian_target.h endian_host.h $(UPDATECONFIG) $(LANGS) $(TTD) $(OSX) $(endwarnings) |
0 | 768 |
|
1721
64d59b181596
(svn r2225) -Fix: split the endian-detection to target/host. Now cross-compiling
truelight
parents:
1720
diff
changeset
|
769 |
endian_host.h: $(ENDIAN_CHECK) |
64d59b181596
(svn r2225) -Fix: split the endian-detection to target/host. Now cross-compiling
truelight
parents:
1720
diff
changeset
|
770 |
@echo '===> Testing endianness for host' |
64d59b181596
(svn r2225) -Fix: split the endian-detection to target/host. Now cross-compiling
truelight
parents:
1720
diff
changeset
|
771 |
$(Q)./$(ENDIAN_CHECK) > $@ |
64d59b181596
(svn r2225) -Fix: split the endian-detection to target/host. Now cross-compiling
truelight
parents:
1720
diff
changeset
|
772 |
|
64d59b181596
(svn r2225) -Fix: split the endian-detection to target/host. Now cross-compiling
truelight
parents:
1720
diff
changeset
|
773 |
endian_target.h: $(ENDIAN_CHECK) |
64d59b181596
(svn r2225) -Fix: split the endian-detection to target/host. Now cross-compiling
truelight
parents:
1720
diff
changeset
|
774 |
@echo '===> Testing endianness for target' |
1692
2587eee1c632
(svn r2196) -Change: updated the Makefile, now it works for crossplatform compiling
TrueLight
parents:
1629
diff
changeset
|
775 |
$(Q)./$(ENDIAN_CHECK) $(ENDIAN_FORCE) > $@ |
157
dd017fa3bad8
(svn r158) -Fix: make endianess check 100% accurate (hopefully ;))
truelight
parents:
126
diff
changeset
|
776 |
|
dd017fa3bad8
(svn r158) -Fix: make endianess check 100% accurate (hopefully ;))
truelight
parents:
126
diff
changeset
|
777 |
$(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
|
778 |
@echo '===> Compiling and Linking $@' |
a6dc17991fa5
(svn r2841) Pimp the Makefile: Determining the header dependencies is now a separate step.
tron
parents:
2302
diff
changeset
|
779 |
$(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
|
780 |
|
0 | 781 |
|
2315
a6dc17991fa5
(svn r2841) Pimp the Makefile: Determining the header dependencies is now a separate step.
tron
parents:
2302
diff
changeset
|
782 |
$(TTD): $(OBJS) $(MAKE_CONFIG) |
a6dc17991fa5
(svn r2841) Pimp the Makefile: Determining the header dependencies is now a separate step.
tron
parents:
2302
diff
changeset
|
783 |
@echo '===> Linking $@' |
a6dc17991fa5
(svn r2841) Pimp the Makefile: Determining the header dependencies is now a separate step.
tron
parents:
2302
diff
changeset
|
784 |
$(Q)$(CC) $(LDFLAGS) $(TTDLDFLAGS) $(OBJS) $(LIBS) -o $@ |
0 | 785 |
|
728
c8728c17f505
(svn r1180) Makefile: fixed dependancies so the flag -j can be used. It makes the compilation process into more than one job which makes it able to benefit from multiple CPUs. Using -j without setting a limit of jobs (like -j2) is not a great idea (thanks to ln-- for reporting the need for this one)
bjarni
parents:
679
diff
changeset
|
786 |
$(OSX): $(TTD) |
1413
4a93d8682e11
(svn r1917) - Makefile: Revamped VERBOSE support, build mechanics changed.
pasky
parents:
1411
diff
changeset
|
787 |
$(Q)rm -fr "$(OSXAPP)" |
4a93d8682e11
(svn r1917) - Makefile: Revamped VERBOSE support, build mechanics changed.
pasky
parents:
1411
diff
changeset
|
788 |
$(Q)mkdir -p "$(OSXAPP)"/Contents/MacOS |
4a93d8682e11
(svn r1917) - Makefile: Revamped VERBOSE support, build mechanics changed.
pasky
parents:
1411
diff
changeset
|
789 |
$(Q)mkdir -p "$(OSXAPP)"/Contents/Resources |
4a93d8682e11
(svn r1917) - Makefile: Revamped VERBOSE support, build mechanics changed.
pasky
parents:
1411
diff
changeset
|
790 |
$(Q)mkdir -p "$(OSXAPP)"/Contents/Data |
4a93d8682e11
(svn r1917) - Makefile: Revamped VERBOSE support, build mechanics changed.
pasky
parents:
1411
diff
changeset
|
791 |
$(Q)mkdir -p "$(OSXAPP)"/Contents/Lang |
4a93d8682e11
(svn r1917) - Makefile: Revamped VERBOSE support, build mechanics changed.
pasky
parents:
1411
diff
changeset
|
792 |
$(Q)echo "APPL????" > "$(OSXAPP)"/Contents/PkgInfo |
1694
bbddafc87744
(svn r2198) renamed MacOS to MacOSX where it was written wrong. Made myself MacOSX porter as well as coder
bjarni
parents:
1693
diff
changeset
|
793 |
$(Q)cp os/macosx/openttd.icns "$(OSXAPP)"/Contents/Resources/openttd.icns |
bbddafc87744
(svn r2198) renamed MacOS to MacOSX where it was written wrong. Made myself MacOSX porter as well as coder
bjarni
parents:
1693
diff
changeset
|
794 |
$(Q)os/macosx/plistgen.sh "$(OSXAPP)" "$(REV)" |
1722
b388cfbae4c9
(svn r2226) -Fix: 2 other capital problems for the OSX part of the Makefile
truelight
parents:
1721
diff
changeset
|
795 |
$(Q)cp os/macosx/track_starter "$(OSXAPP)"/Contents/MacOS |
1694
bbddafc87744
(svn r2198) renamed MacOS to MacOSX where it was written wrong. Made myself MacOSX porter as well as coder
bjarni
parents:
1693
diff
changeset
|
796 |
$(Q)ls os/macosx | grep -q "\.class" || \ |
bbddafc87744
(svn r2198) renamed MacOS to MacOSX where it was written wrong. Made myself MacOSX porter as well as coder
bjarni
parents:
1693
diff
changeset
|
797 |
javac os/macosx/OpenTTDMidi.java |
1722
b388cfbae4c9
(svn r2226) -Fix: 2 other capital problems for the OSX part of the Makefile
truelight
parents:
1721
diff
changeset
|
798 |
$(Q)cp os/macosx/OpenTTDMidi.class "$(OSXAPP)"/Contents/MacOS |
1720
b53cf8e5cd44
(svn r2224) -Fix: capital-correctness for OSX-dir-names
truelight
parents:
1694
diff
changeset
|
799 |
$(Q)cp data/* "$(OSXAPP)"/Contents/Data/ |
b53cf8e5cd44
(svn r2224) -Fix: capital-correctness for OSX-dir-names
truelight
parents:
1694
diff
changeset
|
800 |
$(Q)cp lang/*.lng "$(OSXAPP)"/Contents/Lang/ |
1413
4a93d8682e11
(svn r1917) - Makefile: Revamped VERBOSE support, build mechanics changed.
pasky
parents:
1411
diff
changeset
|
801 |
$(Q)cp $(TTD) "$(OSXAPP)"/Contents/MacOS/$(TTD) |
0 | 802 |
|
803 |
$(endwarnings): $(64_bit_warnings) |
|
804 |
||
805 |
$(64_bit_warnings): |
|
806 |
$(warning 64 bit CPUs will get some 64 bit specific bugs!) |
|
807 |
$(warning If you see any bugs, include in your bug report that you use a 64 bit CPU) |
|
808 |
||
1721
64d59b181596
(svn r2225) -Fix: split the endian-detection to target/host. Now cross-compiling
truelight
parents:
1720
diff
changeset
|
809 |
$(STRGEN): strgen/strgen.c endian_host.h |
2315
a6dc17991fa5
(svn r2841) Pimp the Makefile: Determining the header dependencies is now a separate step.
tron
parents:
2302
diff
changeset
|
810 |
@echo '===> Compiling and Linking $@' |
a6dc17991fa5
(svn r2841) Pimp the Makefile: Determining the header dependencies is now a separate step.
tron
parents:
2302
diff
changeset
|
811 |
$(Q)$(CC_HOST) $(CFLAGS_HOST) $(CDEFS) $< -o $@ |
0 | 812 |
|
474 | 813 |
table/strings.h: lang/english.txt $(STRGEN) |
1118 | 814 |
@echo '===> Generating $@' |
1413
4a93d8682e11
(svn r1917) - Makefile: Revamped VERBOSE support, build mechanics changed.
pasky
parents:
1411
diff
changeset
|
815 |
$(Q)$(STRGEN) |
222
b88456001397
(svn r223) -Fix: Const correctness and miscellaneous fixes. Thank you Tron for your diligent fixing of warnings (and some possibly bugs) (Tron)
darkvater
parents:
221
diff
changeset
|
816 |
|
476
ad012336ed61
(svn r727) The langauge files depend on english.txt, not strings.h
tron
parents:
475
diff
changeset
|
817 |
lang/%.lng: lang/%.txt $(STRGEN) lang/english.txt |
1118 | 818 |
@echo '===> Compiling language $(*F)' |
2106
e0cbbec2e6e9
(svn r2616) Don't stop when compiling a language fails, just delete the defective .lng
tron
parents:
2096
diff
changeset
|
819 |
$(Q)$(STRGEN) $(STRGEN_FLAGS) $< $(LANG_ERRORS) || rm -f $@ |
0 | 820 |
|
1891
92a3b0aa0946
(svn r2397) - CodeChange: rename all "ttd" files to "openttd" files.
Darkvater
parents:
1865
diff
changeset
|
821 |
winres.o: openttd.rc |
1118 | 822 |
@echo '===> Compiling resource $<' |
1692
2587eee1c632
(svn r2196) -Change: updated the Makefile, now it works for crossplatform compiling
TrueLight
parents:
1629
diff
changeset
|
823 |
$(Q)$(WINDRES) -o $@ $< |
0 | 824 |
|
770
89dab23f04ca
(svn r1236) MorphOS: added make release like in OSX (tokai)
bjarni
parents:
730
diff
changeset
|
825 |
ifdef MORPHOS |
89dab23f04ca
(svn r1236) MorphOS: added make release like in OSX (tokai)
bjarni
parents:
730
diff
changeset
|
826 |
release: all |
1413
4a93d8682e11
(svn r1917) - Makefile: Revamped VERBOSE support, build mechanics changed.
pasky
parents:
1411
diff
changeset
|
827 |
$(Q)rm -fr "/t/openttd-$(RELEASE)-morphos.lha" |
4a93d8682e11
(svn r1917) - Makefile: Revamped VERBOSE support, build mechanics changed.
pasky
parents:
1411
diff
changeset
|
828 |
$(Q)mkdir -p "/t/" |
4a93d8682e11
(svn r1917) - Makefile: Revamped VERBOSE support, build mechanics changed.
pasky
parents:
1411
diff
changeset
|
829 |
$(Q)mkdir -p "/t/openttd-$(RELEASE)-morphos" |
4a93d8682e11
(svn r1917) - Makefile: Revamped VERBOSE support, build mechanics changed.
pasky
parents:
1411
diff
changeset
|
830 |
$(Q)mkdir -p "/t/openttd-$(RELEASE)-morphos/docs" |
4a93d8682e11
(svn r1917) - Makefile: Revamped VERBOSE support, build mechanics changed.
pasky
parents:
1411
diff
changeset
|
831 |
$(Q)mkdir -p "/t/openttd-$(RELEASE)-morphos/data" |
4a93d8682e11
(svn r1917) - Makefile: Revamped VERBOSE support, build mechanics changed.
pasky
parents:
1411
diff
changeset
|
832 |
$(Q)mkdir -p "/t/openttd-$(RELEASE)-morphos/lang" |
4a93d8682e11
(svn r1917) - Makefile: Revamped VERBOSE support, build mechanics changed.
pasky
parents:
1411
diff
changeset
|
833 |
$(Q)mkdir -p "/t/openttd-$(RELEASE)-morphos/scenario" |
4a93d8682e11
(svn r1917) - Makefile: Revamped VERBOSE support, build mechanics changed.
pasky
parents:
1411
diff
changeset
|
834 |
$(Q)cp -R $(TTD) "/t/openttd-$(RELEASE)-morphos/" |
4a93d8682e11
(svn r1917) - Makefile: Revamped VERBOSE support, build mechanics changed.
pasky
parents:
1411
diff
changeset
|
835 |
$(Q)cp data/* "/t/openttd-$(RELEASE)-morphos/data/" |
4a93d8682e11
(svn r1917) - Makefile: Revamped VERBOSE support, build mechanics changed.
pasky
parents:
1411
diff
changeset
|
836 |
$(Q)cp lang/*.lng "/t/openttd-$(RELEASE)-morphos/lang/" |
4a93d8682e11
(svn r1917) - Makefile: Revamped VERBOSE support, build mechanics changed.
pasky
parents:
1411
diff
changeset
|
837 |
$(Q)cp scenario/* "/t/openttd-$(RELEASE)-morphos/scenario/" |
4a93d8682e11
(svn r1917) - Makefile: Revamped VERBOSE support, build mechanics changed.
pasky
parents:
1411
diff
changeset
|
838 |
$(Q)cp readme.txt "/t/openttd-$(RELEASE)-morphos/docs/ReadMe" |
4a93d8682e11
(svn r1917) - Makefile: Revamped VERBOSE support, build mechanics changed.
pasky
parents:
1411
diff
changeset
|
839 |
$(Q)cp docs/console.txt "/t/openttd-$(RELEASE)-morphos/docs/Console" |
4a93d8682e11
(svn r1917) - Makefile: Revamped VERBOSE support, build mechanics changed.
pasky
parents:
1411
diff
changeset
|
840 |
$(Q)cp COPYING "/t/openttd-$(RELEASE)-morphos/docs/" |
4a93d8682e11
(svn r1917) - Makefile: Revamped VERBOSE support, build mechanics changed.
pasky
parents:
1411
diff
changeset
|
841 |
$(Q)cp changelog.txt "/t/openttd-$(RELEASE)-morphos/docs/ChangeLog" |
4a93d8682e11
(svn r1917) - Makefile: Revamped VERBOSE support, build mechanics changed.
pasky
parents:
1411
diff
changeset
|
842 |
$(Q)cp known-bugs.txt "/t/openttd-$(RELEASE)-morphos/docs/known-bugs.txt" |
4a93d8682e11
(svn r1917) - Makefile: Revamped VERBOSE support, build mechanics changed.
pasky
parents:
1411
diff
changeset
|
843 |
$(Q)cp os/morphos/icons/openttd.info "/t/openttd-$(RELEASE)-morphos/$(TTD).info" |
4a93d8682e11
(svn r1917) - Makefile: Revamped VERBOSE support, build mechanics changed.
pasky
parents:
1411
diff
changeset
|
844 |
$(Q)cp os/morphos/icons/docs.info "/t/openttd-$(RELEASE)-morphos/docs.info" |
4a93d8682e11
(svn r1917) - Makefile: Revamped VERBOSE support, build mechanics changed.
pasky
parents:
1411
diff
changeset
|
845 |
$(Q)cp os/morphos/icons/drawer.info "/t/openttd-$(RELEASE)-morphos.info" |
4a93d8682e11
(svn r1917) - Makefile: Revamped VERBOSE support, build mechanics changed.
pasky
parents:
1411
diff
changeset
|
846 |
$(Q)cp os/morphos/icons/document.info "/t/openttd-$(RELEASE)-morphos/docs/ReadMe.info" |
4a93d8682e11
(svn r1917) - Makefile: Revamped VERBOSE support, build mechanics changed.
pasky
parents:
1411
diff
changeset
|
847 |
$(Q)cp os/morphos/icons/document.info "/t/openttd-$(RELEASE)-morphos/docs/Console.info" |
4a93d8682e11
(svn r1917) - Makefile: Revamped VERBOSE support, build mechanics changed.
pasky
parents:
1411
diff
changeset
|
848 |
$(Q)cp os/morphos/icons/document.info "/t/openttd-$(RELEASE)-morphos/docs/COPYING.info" |
4a93d8682e11
(svn r1917) - Makefile: Revamped VERBOSE support, build mechanics changed.
pasky
parents:
1411
diff
changeset
|
849 |
$(Q)cp os/morphos/icons/document.info "/t/openttd-$(RELEASE)-morphos/docs/ChangeLog.info" |
4a93d8682e11
(svn r1917) - Makefile: Revamped VERBOSE support, build mechanics changed.
pasky
parents:
1411
diff
changeset
|
850 |
$(Q)strip --strip-all --strip-unneeded --remove-section .comment "/t/openttd-$(RELEASE)-morphos/$(TTD)" |
4a93d8682e11
(svn r1917) - Makefile: Revamped VERBOSE support, build mechanics changed.
pasky
parents:
1411
diff
changeset
|
851 |
$(Q)lha a -r "t:openttd-$(RELEASE)-morphos.lha" "t:openttd-$(RELEASE)-morphos" |
4a93d8682e11
(svn r1917) - Makefile: Revamped VERBOSE support, build mechanics changed.
pasky
parents:
1411
diff
changeset
|
852 |
$(Q)lha a "t:openttd-$(RELEASE)-morphos.lha" "t:openttd-$(RELEASE)-morphos.info" |
4a93d8682e11
(svn r1917) - Makefile: Revamped VERBOSE support, build mechanics changed.
pasky
parents:
1411
diff
changeset
|
853 |
$(Q)rm -fr "/t/openttd-$(RELEASE)-morphos" |
4a93d8682e11
(svn r1917) - Makefile: Revamped VERBOSE support, build mechanics changed.
pasky
parents:
1411
diff
changeset
|
854 |
$(Q)rm -fr "/t/openttd-$(RELEASE)-morphos.info" |
770
89dab23f04ca
(svn r1236) MorphOS: added make release like in OSX (tokai)
bjarni
parents:
730
diff
changeset
|
855 |
@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
|
856 |
|
1251 | 857 |
.PHONY: release |
770
89dab23f04ca
(svn r1236) MorphOS: added make release like in OSX (tokai)
bjarni
parents:
730
diff
changeset
|
858 |
endif |
89dab23f04ca
(svn r1236) MorphOS: added make release like in OSX (tokai)
bjarni
parents:
730
diff
changeset
|
859 |
|
563
f60fe5a7d56f
(svn r972) Makefile: added make release (currently only works on mac)
bjarni
parents:
561
diff
changeset
|
860 |
ifdef OSX |
f60fe5a7d56f
(svn r972) Makefile: added make release (currently only works on mac)
bjarni
parents:
561
diff
changeset
|
861 |
release: all |
1413
4a93d8682e11
(svn r1917) - Makefile: Revamped VERBOSE support, build mechanics changed.
pasky
parents:
1411
diff
changeset
|
862 |
$(Q)mkdir -p "OpenTTD $(RELEASE)" |
4a93d8682e11
(svn r1917) - Makefile: Revamped VERBOSE support, build mechanics changed.
pasky
parents:
1411
diff
changeset
|
863 |
$(Q)mkdir -p "OpenTTD $(RELEASE)"/docs |
4a93d8682e11
(svn r1917) - Makefile: Revamped VERBOSE support, build mechanics changed.
pasky
parents:
1411
diff
changeset
|
864 |
$(Q)mkdir -p "OpenTTD $(RELEASE)"/scenario |
4a93d8682e11
(svn r1917) - Makefile: Revamped VERBOSE support, build mechanics changed.
pasky
parents:
1411
diff
changeset
|
865 |
$(Q)cp -R $(OSXAPP) "OpenTTD $(RELEASE)"/ |
4a93d8682e11
(svn r1917) - Makefile: Revamped VERBOSE support, build mechanics changed.
pasky
parents:
1411
diff
changeset
|
866 |
$(Q)cp docs/OSX_where_did_the_package_go.txt "OpenTTD $(RELEASE)"/Where\ did\ the\ package\ go.txt |
4a93d8682e11
(svn r1917) - Makefile: Revamped VERBOSE support, build mechanics changed.
pasky
parents:
1411
diff
changeset
|
867 |
$(Q)cp readme.txt "OpenTTD $(RELEASE)"/docs/ |
4a93d8682e11
(svn r1917) - Makefile: Revamped VERBOSE support, build mechanics changed.
pasky
parents:
1411
diff
changeset
|
868 |
$(Q)cp docs/README_if_game_crashed_on_OSX.txt "OpenTTD $(RELEASE)"/docs/readme\ if\ crashed\ on\ OSX.txt |
4a93d8682e11
(svn r1917) - Makefile: Revamped VERBOSE support, build mechanics changed.
pasky
parents:
1411
diff
changeset
|
869 |
$(Q)cp docs/console.txt "OpenTTD $(RELEASE)"/docs/ |
4a93d8682e11
(svn r1917) - Makefile: Revamped VERBOSE support, build mechanics changed.
pasky
parents:
1411
diff
changeset
|
870 |
$(Q)cp COPYING "OpenTTD $(RELEASE)"/docs/ |
4a93d8682e11
(svn r1917) - Makefile: Revamped VERBOSE support, build mechanics changed.
pasky
parents:
1411
diff
changeset
|
871 |
$(Q)cp changelog.txt "OpenTTD $(RELEASE)"/docs/ |
4a93d8682e11
(svn r1917) - Makefile: Revamped VERBOSE support, build mechanics changed.
pasky
parents:
1411
diff
changeset
|
872 |
$(Q)cp docs/README_if_game_crashed_on_OSX.txt "OpenTTD $(RELEASE)"/docs/ |
1694
bbddafc87744
(svn r2198) renamed MacOS to MacOSX where it was written wrong. Made myself MacOSX porter as well as coder
bjarni
parents:
1693
diff
changeset
|
873 |
$(Q)cp os/macosx/*.webloc "OpenTTD $(RELEASE)" |
1413
4a93d8682e11
(svn r1917) - Makefile: Revamped VERBOSE support, build mechanics changed.
pasky
parents:
1411
diff
changeset
|
874 |
$(Q)cp known-bugs.txt "OpenTTD $(RELEASE)"/known-bugs.txt |
4a93d8682e11
(svn r1917) - Makefile: Revamped VERBOSE support, build mechanics changed.
pasky
parents:
1411
diff
changeset
|
875 |
$(Q)cp scenario/* "OpenTTD $(RELEASE)"/scenario/ |
4a93d8682e11
(svn r1917) - Makefile: Revamped VERBOSE support, build mechanics changed.
pasky
parents:
1411
diff
changeset
|
876 |
$(Q)/usr/bin/hdiutil create -ov -format UDZO -srcfolder "OpenTTD $(RELEASE)" openttd-"$(RELEASE)"-osx.dmg |
4a93d8682e11
(svn r1917) - Makefile: Revamped VERBOSE support, build mechanics changed.
pasky
parents:
1411
diff
changeset
|
877 |
$(Q)rm -fr "OpenTTD $(RELEASE)" |
563
f60fe5a7d56f
(svn r972) Makefile: added make release (currently only works on mac)
bjarni
parents:
561
diff
changeset
|
878 |
|
564
39e0d73fa19d
(svn r973) Makefile: added make nightly_build (only on mac)
bjarni
parents:
563
diff
changeset
|
879 |
nightly_build: all |
1413
4a93d8682e11
(svn r1917) - Makefile: Revamped VERBOSE support, build mechanics changed.
pasky
parents:
1411
diff
changeset
|
880 |
$(Q)mkdir -p "OpenTTD_nightly_$(DATE)" |
4a93d8682e11
(svn r1917) - Makefile: Revamped VERBOSE support, build mechanics changed.
pasky
parents:
1411
diff
changeset
|
881 |
$(Q)mkdir -p "OpenTTD_nightly_$(DATE)"/docs |
4a93d8682e11
(svn r1917) - Makefile: Revamped VERBOSE support, build mechanics changed.
pasky
parents:
1411
diff
changeset
|
882 |
$(Q)cp -R $(OSXAPP) "OpenTTD_nightly_$(DATE)"/ |
4a93d8682e11
(svn r1917) - Makefile: Revamped VERBOSE support, build mechanics changed.
pasky
parents:
1411
diff
changeset
|
883 |
$(Q)cp docs/OSX_where_did_the_package_go.txt "OpenTTD_nightly_$(DATE)"/Where\ did\ the\ package\ go.txt |
4a93d8682e11
(svn r1917) - Makefile: Revamped VERBOSE support, build mechanics changed.
pasky
parents:
1411
diff
changeset
|
884 |
$(Q)cp readme.txt "OpenTTD_nightly_$(DATE)"/docs/ |
4a93d8682e11
(svn r1917) - Makefile: Revamped VERBOSE support, build mechanics changed.
pasky
parents:
1411
diff
changeset
|
885 |
$(Q)cp docs/README_if_game_crashed_on_OSX.txt "OpenTTD_nightly_$(DATE)"/docs/readme\ if\ crashed\ on\ OSX.txt |
4a93d8682e11
(svn r1917) - Makefile: Revamped VERBOSE support, build mechanics changed.
pasky
parents:
1411
diff
changeset
|
886 |
$(Q)cp docs/console.txt "OpenTTD_nightly_$(DATE)"/docs/ |
4a93d8682e11
(svn r1917) - Makefile: Revamped VERBOSE support, build mechanics changed.
pasky
parents:
1411
diff
changeset
|
887 |
$(Q)cp COPYING "OpenTTD_nightly_$(DATE)"/docs/ |
4a93d8682e11
(svn r1917) - Makefile: Revamped VERBOSE support, build mechanics changed.
pasky
parents:
1411
diff
changeset
|
888 |
$(Q)cp revisionlog.txt "OpenTTD_nightly_$(DATE)"/revisionlog.txt |
4a93d8682e11
(svn r1917) - Makefile: Revamped VERBOSE support, build mechanics changed.
pasky
parents:
1411
diff
changeset
|
889 |
$(Q)cp docs/README_if_game_crashed_on_OSX.txt "OpenTTD_nightly_$(DATE)"/docs/ |
1694
bbddafc87744
(svn r2198) renamed MacOS to MacOSX where it was written wrong. Made myself MacOSX porter as well as coder
bjarni
parents:
1693
diff
changeset
|
890 |
$(Q)cp os/macosx/*.webloc "OpenTTD_nightly_$(DATE)"/ |
1413
4a93d8682e11
(svn r1917) - Makefile: Revamped VERBOSE support, build mechanics changed.
pasky
parents:
1411
diff
changeset
|
891 |
$(Q)/usr/bin/hdiutil create -ov -format UDZO -srcfolder "OpenTTD_nightly_$(DATE)" openttd-nightly-"$(DATE)".dmg |
4a93d8682e11
(svn r1917) - Makefile: Revamped VERBOSE support, build mechanics changed.
pasky
parents:
1411
diff
changeset
|
892 |
$(Q)rm -fr "OpenTTD_nightly_$(DATE)" |
564
39e0d73fa19d
(svn r973) Makefile: added make nightly_build (only on mac)
bjarni
parents:
563
diff
changeset
|
893 |
|
39e0d73fa19d
(svn r973) Makefile: added make nightly_build (only on mac)
bjarni
parents:
563
diff
changeset
|
894 |
.PHONY: release nightly_build |
563
f60fe5a7d56f
(svn r972) Makefile: added make release (currently only works on mac)
bjarni
parents:
561
diff
changeset
|
895 |
endif |
0 | 896 |
|
897 |
rev.c: FORCE |
|
898 |
@# 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
|
899 |
@echo 'const char _openttd_revision[] = "$(REV)";' >>rev.c.new |
0 | 900 |
@# some additions for MorphOS versions tag |
901 |
@echo '#ifdef __MORPHOS__' >>rev.c.new |
|
615
3a22cf31bb29
(svn r1039) Makefile: now RELEASE flag can contain () too
bjarni
parents:
610
diff
changeset
|
902 |
@echo 'const char morphos_versions_tag[] = "\\0$$VER: OpenTTD $(REV) ('${BUILDDATE}') © OpenTTD Team [MorphOS, PowerPC]";' >>rev.c.new |
0 | 903 |
@echo '#endif' >>rev.c.new |
904 |
@# Only update the real rev.c if it actually changed, to prevent |
|
905 |
@# useless rebuilds. |
|
906 |
@cmp -s rev.c rev.c.new 2>/dev/null || mv rev.c.new rev.c |
|
907 |
@rm -f rev.c.new |
|
908 |
||
909 |
FORCE: |
|
910 |
||
911 |
||
912 |
clean: |
|
1118 | 913 |
@echo '===> Cleaning up' |
1721
64d59b181596
(svn r2225) -Fix: split the endian-detection to target/host. Now cross-compiling
truelight
parents:
1720
diff
changeset
|
914 |
# endian.h is out-dated and no longer in use, so it can be removed soon |
64d59b181596
(svn r2225) -Fix: split the endian-detection to target/host. Now cross-compiling
truelight
parents:
1720
diff
changeset
|
915 |
$(Q)rm -rf .deps *~ $(TTD) $(STRGEN) core table/strings.h $(LANGS) $(OBJS) $(OSX_MIDI_PLAYER_FILE) endian.h endian_host.h endian_target.h $(ENDIAN_CHECK) |
0 | 916 |
|
917 |
mrproper: clean |
|
1413
4a93d8682e11
(svn r1917) - Makefile: Revamped VERBOSE support, build mechanics changed.
pasky
parents:
1411
diff
changeset
|
918 |
$(Q)rm -rf $(MAKE_CONFIG) |
0 | 919 |
|
920 |
ifndef OSX |
|
921 |
ifndef MORPHOS |
|
922 |
install: |
|
285 | 923 |
ifeq ($(INSTALL),) |
924 |
$(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
|
925 |
tested very much - use at your own risk - to use run \"make install INSTALL:=1\" - make sure Makefile.config\ |
0 | 926 |
is set correctly up - run \"make upgradeconf\") |
285 | 927 |
endif |
928 |
||
543
e3b43338096b
(svn r942) -Merged branch/network back into the trunk
truelight
parents:
532
diff
changeset
|
929 |
ifeq ($(PREFIX), ) |
1492
e03a8c6f7efd
(svn r1996) makefile.config -> Makefile.config, that's its name.
pasky
parents:
1491
diff
changeset
|
930 |
$(error no prefix set - check Makefile.config) |
285 | 931 |
endif |
932 |
# We compare against the non prefixed version here, so we won't install |
|
933 |
# if only the prefix has been set |
|
934 |
ifeq ($(DATA_DIR),) |
|
1492
e03a8c6f7efd
(svn r1996) makefile.config -> Makefile.config, that's its name.
pasky
parents:
1491
diff
changeset
|
935 |
$(error no data path set - check Makefile.config) |
285 | 936 |
endif |
937 |
ifeq ($(BINARY_DIR),) |
|
1492
e03a8c6f7efd
(svn r1996) makefile.config -> Makefile.config, that's its name.
pasky
parents:
1491
diff
changeset
|
938 |
$(error no binary path set - check Makefile.config) |
285 | 939 |
endif |
940 |
# We'll install in $DEST_DIR instead of root if it is set (we don't |
|
941 |
# 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
|
942 |
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
|
943 |
$(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
|
944 |
$(DATA_DIR_INSTALL)/gm \ |
d010857e470a
(svn r1995) Makefile: Use the install tool instead of mkdir+cp for installing the system-wide stuff, more secure. Based on Peter Brett's patch 1152428.
pasky
parents:
1479
diff
changeset
|
945 |
$(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
|
946 |
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
|
947 |
mkdir -p $(PERSONAL_DIR)/scenario |
8f237a5b1a5f
(svn r2371) - Fix: [ 1144510 ] make install tries to install scenarios in the (non-existing) personal dir when USE_HOMEDIR is specified.
matthijs
parents:
1829
diff
changeset
|
948 |
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
|
949 |
mkdir -p $(DATA_DIR_INSTALL)/scenario |
8f237a5b1a5f
(svn r2371) - Fix: [ 1144510 ] make install tries to install scenarios in the (non-existing) personal dir when USE_HOMEDIR is specified.
matthijs
parents:
1829
diff
changeset
|
950 |
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
|
951 |
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
|
952 |
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
|
953 |
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
|
954 |
install -m 644 data/opntitle.dat $(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
|
955 |
install -m 644 media/openttd.64.png $(DATA_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
|
956 |
install -m 644 media/openttd.32.xpm $(DATA_DIR_INSTALL) |
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
|
957 |
ifndef USE_HOMEDIR |
1160
467d3ff0ad97
(svn r1661) Makefile: added scenario to make install
bjarni
parents:
1158
diff
changeset
|
958 |
cp scenario/* $(PERSONAL_DIR)/scenario/ |
1865
8f237a5b1a5f
(svn r2371) - Fix: [ 1144510 ] make install tries to install scenarios in the (non-existing) personal dir when USE_HOMEDIR is specified.
matthijs
parents:
1829
diff
changeset
|
959 |
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
|
960 |
cp scenario/* $(DATA_DIR_INSTALL)/scenario/ |
8f237a5b1a5f
(svn r2371) - Fix: [ 1144510 ] make install tries to install scenarios in the (non-existing) personal dir when USE_HOMEDIR is specified.
matthijs
parents:
1829
diff
changeset
|
961 |
endif |
0 | 962 |
else #MorphOS |
963 |
install: |
|
964 |
$(error make install is not supported on MorphOS) |
|
965 |
endif |
|
966 |
else # OSX |
|
967 |
install: |
|
968 |
$(error make install is not supported on MacOSX) |
|
969 |
endif |
|
970 |
||
971 |
||
972 |
love: |
|
973 |
@echo "YES! I thought you would never ask. We will have a great time. You can keep me turned on all night" |
|
974 |
||
730
939c4654fdea
(svn r1182) -Fix: Makefile had a small glitch, making it impossible to compile the game (Oskar_)
truelight
parents:
728
diff
changeset
|
975 |
.PHONY: clean all $(OSX) install $(64_bit_warnings) $(endwarnings) love |
0 | 976 |
|
977 |
||
978 |
### Automatic configuration |
|
979 |
-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
|
980 |
|
0 | 981 |
|
982 |
# Export all variables set to subprocesses (a bit dirty) |
|
983 |
.EXPORT_ALL_VARIABLES: |
|
984 |
upgradeconf: $(MAKE_CONFIG) |
|
1413
4a93d8682e11
(svn r1917) - Makefile: Revamped VERBOSE support, build mechanics changed.
pasky
parents:
1411
diff
changeset
|
985 |
$(Q)rm $(MAKE_CONFIG) |
4a93d8682e11
(svn r1917) - Makefile: Revamped VERBOSE support, build mechanics changed.
pasky
parents:
1411
diff
changeset
|
986 |
$(Q)$(MAKE) $(MAKE_CONFIG) |
0 | 987 |
|
988 |
.PHONY: upgradeconf |
|
989 |
||
990 |
||
991 |
### Internal build rules |
|
992 |
||
993 |
# This makes sure the .deps dir is always around. |
|
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
|
994 |
DEPS_MAGIC := $(shell mkdir -p .deps .deps/music .deps/sound .deps/video .deps/os .deps/os/macosx) |
0 | 995 |
|
996 |
# Introduce the dependencies |
|
2315
a6dc17991fa5
(svn r2841) Pimp the Makefile: Determining the header dependencies is now a separate step.
tron
parents:
2302
diff
changeset
|
997 |
ifneq ($(MAKECMDGOALS), clean) |
1167
d8b7601118cf
(svn r1669) Rename all ttd_XXX to just XXX, because we already know who we are (;
tron
parents:
1164
diff
changeset
|
998 |
-include $(DEPS) |
2315
a6dc17991fa5
(svn r2841) Pimp the Makefile: Determining the header dependencies is now a separate step.
tron
parents:
2302
diff
changeset
|
999 |
endif |
0 | 1000 |
|
2315
a6dc17991fa5
(svn r2841) Pimp the Makefile: Determining the header dependencies is now a separate step.
tron
parents:
2302
diff
changeset
|
1001 |
%.o: .deps/%.d |
1170
1cd3103acd66
(svn r1672) Simplify dependency tracking and actually implement it for C++ files, too.
tron
parents:
1169
diff
changeset
|
1002 |
|
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
|
1003 |
.deps/%.d: %.c $(MAKE_CONFIG) table/strings.h endian_target.h |
2315
a6dc17991fa5
(svn r2841) Pimp the Makefile: Determining the header dependencies is now a separate step.
tron
parents:
2302
diff
changeset
|
1004 |
@echo '===> Determining dependencies of $<' |
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
|
1005 |
$(Q)$(CC) $(CFLAGS) $(CDEFS) -M $< > $@ |
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
|
1006 |
|
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
|
1007 |
.deps/%.d: %.cpp $(MAKE_CONFIG) table/strings.h endian_target.h |
2315
a6dc17991fa5
(svn r2841) Pimp the Makefile: Determining the header dependencies is now a separate step.
tron
parents:
2302
diff
changeset
|
1008 |
@echo '===> Determining dependencies of $<' |
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
|
1009 |
$(Q)$(CXX) $(CFLAGS) $(CDEFS) -M $< > $@ |
2315
a6dc17991fa5
(svn r2841) Pimp the Makefile: Determining the header dependencies is now a separate step.
tron
parents:
2302
diff
changeset
|
1010 |
|
2327
076c79dea490
(svn r2853) Add missing dependencies and flags to the dependency targets and make the info target more informative
tron
parents:
2317
diff
changeset
|
1011 |
.deps/%.d: %.m $(MAKE_CONFIG) table/strings.h endian_target.h |
2315
a6dc17991fa5
(svn r2841) Pimp the Makefile: Determining the header dependencies is now a separate step.
tron
parents:
2302
diff
changeset
|
1012 |
@echo '===> Determining dependencies of $<' |
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
|
1013 |
$(Q)$(CC) $(CFLAGS) $(CDEFS) -M $< > $@ |
2315
a6dc17991fa5
(svn r2841) Pimp the Makefile: Determining the header dependencies is now a separate step.
tron
parents:
2302
diff
changeset
|
1014 |
|
a6dc17991fa5
(svn r2841) Pimp the Makefile: Determining the header dependencies is now a separate step.
tron
parents:
2302
diff
changeset
|
1015 |
|
a6dc17991fa5
(svn r2841) Pimp the Makefile: Determining the header dependencies is now a separate step.
tron
parents:
2302
diff
changeset
|
1016 |
%.o: %.c $(MAKE_CONFIG) |
a6dc17991fa5
(svn r2841) Pimp the Makefile: Determining the header dependencies is now a separate step.
tron
parents:
2302
diff
changeset
|
1017 |
@echo '===> Compiling $<' |
a6dc17991fa5
(svn r2841) Pimp the Makefile: Determining the header dependencies is now a separate step.
tron
parents:
2302
diff
changeset
|
1018 |
$(Q)$(CC) $(CFLAGS) $(CDEFS) -c -o $@ $< |
a6dc17991fa5
(svn r2841) Pimp the Makefile: Determining the header dependencies is now a separate step.
tron
parents:
2302
diff
changeset
|
1019 |
|
a6dc17991fa5
(svn r2841) Pimp the Makefile: Determining the header dependencies is now a separate step.
tron
parents:
2302
diff
changeset
|
1020 |
%.o: %.cpp $(MAKE_CONFIG) |
a6dc17991fa5
(svn r2841) Pimp the Makefile: Determining the header dependencies is now a separate step.
tron
parents:
2302
diff
changeset
|
1021 |
@echo '===> Compiling $<' |
a6dc17991fa5
(svn r2841) Pimp the Makefile: Determining the header dependencies is now a separate step.
tron
parents:
2302
diff
changeset
|
1022 |
$(Q)$(CXX) $(CFLAGS) $(CDEFS) -c -o $@ $< |
a6dc17991fa5
(svn r2841) Pimp the Makefile: Determining the header dependencies is now a separate step.
tron
parents:
2302
diff
changeset
|
1023 |
|
a6dc17991fa5
(svn r2841) Pimp the Makefile: Determining the header dependencies is now a separate step.
tron
parents:
2302
diff
changeset
|
1024 |
%.o: %.m $(MAKE_CONFIG) |
a6dc17991fa5
(svn r2841) Pimp the Makefile: Determining the header dependencies is now a separate step.
tron
parents:
2302
diff
changeset
|
1025 |
@echo '===> Compiling $<' |
2317
1221c9576436
(svn r2843) OSX doesn't like OBJC, so give it back its beloved CC, because it's the only ObjectiveC consumer
tron
parents:
2315
diff
changeset
|
1026 |
$(Q)$(CC) $(CFLAGS) $(CDEFS) -c -o $@ $< |
1163
044430212516
(svn r1665) Remove VERBOSE flag, because it was only partially implemented
tron
parents:
1162
diff
changeset
|
1027 |
|
044430212516
(svn r1665) Remove VERBOSE flag, because it was only partially implemented
tron
parents:
1162
diff
changeset
|
1028 |
|
044430212516
(svn r1665) Remove VERBOSE flag, because it was only partially implemented
tron
parents:
1162
diff
changeset
|
1029 |
info: |
1435
89d0c6a56a9b
(svn r1939) Revert part of r1938 which accidently crept in
tron
parents:
1434
diff
changeset
|
1030 |
@echo 'CFLAGS = $(CFLAGS)' |
1163
044430212516
(svn r1665) Remove VERBOSE flag, because it was only partially implemented
tron
parents:
1162
diff
changeset
|
1031 |
@echo 'LDFLAGS = $(LDFLAGS)' |
044430212516
(svn r1665) Remove VERBOSE flag, because it was only partially implemented
tron
parents:
1162
diff
changeset
|
1032 |
@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
|
1033 |
@echo 'CDEFS = $(CDEFS)' |