| author | celestar |
| Sun, 26 Jun 2005 21:59:21 +0000 | |
| changeset 1985 | c4ec1653a337 |
| parent 1955 | 52a84e880864 |
| child 2008 | c9d6585c96c8 |
| permissions | -rw-r--r-- |
| 0 | 1 |
# This Makefile is partially based on "a completely generic Makefile", |
2 |
# originally created by Justin Husted <husted@cs> |
|
3 |
# |
|
4 |
# Rewrite and sane dependencies support by Petr Baudis <pasky@ucw.cz> |
|
5 |
# Cygwin support and configuration by Jaen Saul <slowbyte@hot.ee> |
|
6 |
# A lot of modifications by Bjarni Corfitzen <bjarni@openttd.com> |
|
7 |
# |
|
8 |
# Last modified by: $Author: strigeus $ |
|
9 |
# On: $Date: 2004/03/11 19:15:06 $ |
|
10 |
||
11 |
||
12 |
############################################################################## |
|
13 |
# |
|
14 |
# Usage |
|
15 |
# |
|
16 |
||
17 |
# Synopsis: |
|
18 |
# |
|
19 |
# make WITH_ZLIB=1 UNIX=1 MANUAL_CONFIG=1 |
|
20 |
# |
|
21 |
# (See below for the list of possible options.) |
|
22 |
# |
|
23 |
# Alternately, you can run make without the MANUAL_CONFIG part. It then |
|
24 |
# generates Makefile.config, where you can customize all the options. |
|
25 |
# However beware that for all subsequent calls the option values from |
|
26 |
# Makefile.config take precedence to the commandline options. |
|
27 |
# |
|
28 |
# (That means that you probably want to either specify the options on command |
|
29 |
# line together with MANUAL_CONFIG=1 or you want to specify no commandline |
|
30 |
# options at all.) |
|
31 |
||
32 |
# Targets: |
|
33 |
# |
|
34 |
# Defaults to building binary |
|
35 |
# clean: remove intermediate build files |
|
36 |
# mrproper: remove intermediate files and makefile configuration |
|
37 |
# upgradeconf: add new options to old Makefile.config |
|
38 |
# osx: OS X application |
|
|
563
f60fe5a7d56f
(svn r972) Makefile: added make release (currently only works on mac)
bjarni
parents:
561
diff
changeset
|
39 |
# release: used by OSX to make a dmg file ready to release |
| 0 | 40 |
|
41 |
# Options: |
|
42 |
# |
|
43 |
# Summary of OS choice defines |
|
44 |
# WIN32: building on Windows |
|
45 |
# UNIX: building on *nix derivate (Linux, FreeBSD) |
|
46 |
# OSX: building on Mac OS X |
|
47 |
# 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
|
48 |
# BEOS: building on BeOS |
|
446
20304ea8e94e
(svn r655) Add the necessary bits to make building on SunOS/Solaris work
tron
parents:
421
diff
changeset
|
49 |
# SUNOS: building on SunOS (Solaris) |
| 0 | 50 |
# |
51 |
# Summary of library choice defines |
|
52 |
# WITH_ZLIB: savegames using zlib |
|
53 |
# WITH_PNG: screenshots using PNG |
|
54 |
# WITH_SDL: SDL video driver support |
|
55 |
# |
|
56 |
# Summary of other defines: |
|
57 |
# MANUAL_CONFIG: do not use Makefile.config, config options set manually |
|
58 |
# DEBUG: build in debug mode |
|
59 |
# PROFILE: build in profile mode, disables -s and -fomit-frame-pointer |
|
60 |
# TRANSLATOR: build in translator mode (untranslated strings are prepended by |
|
61 |
# a <TODO> mark) |
|
62 |
# RELEASE: this will be the released version number. It replaces all places |
|
63 |
# 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
|
64 |
# 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
|
65 |
# 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
|
66 |
# This can still be overriden by the music.extmidi openttd.cfg option. |
|
804
06aaddf6742b
(svn r1274) Makefile: networking is not longer experimental
bjarni
parents:
798
diff
changeset
|
67 |
# WITH_NETWORK: enable networking |
|
06aaddf6742b
(svn r1274) Makefile: networking is not longer experimental
bjarni
parents:
798
diff
changeset
|
68 |
# DEDICATED: allows compilation on UNIX without SDL. Useful for dedicated servers |
| 0 | 69 |
# |
| 285 | 70 |
# Paths: |
71 |
# 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
|
72 |
# store everything (lang, data, gm, save and openttd.cfg), this is the `old' behaviour. |
| 285 | 73 |
# In this case, none of the following paths are used, you also should _not_ |
74 |
# use `make install', but copy the required stuff yourself (or just play out |
|
75 |
# of you source directory, which should work fine). |
|
76 |
# If you want to use `make install' to install the game globally, you should |
|
77 |
# define it _before_ you build the game. If you only define INSTALL when you |
|
78 |
# do `make install', the game won't be able to find it's files (so you should |
|
79 |
# also define all the following paths before building). |
|
80 |
# |
|
81 |
# So, the following paths should be defined if INSTALL is defined. |
|
82 |
# None of these paths have to end with / |
|
83 |
# PREFIX: Normally /usr/local |
|
84 |
# BINARY_DIR: The location of the binary, normally games. (Will be prefixed |
|
85 |
# 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
|
86 |
# 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
|
87 |
# 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
|
88 |
# 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
|
89 |
# PERSONAL_DIR/scenario |
| 285 | 90 |
# PERSONAL_DIR: The directory where openttd.cfg and the save folder will be |
91 |
# stored. You cannot use ~ here, define USE_HOMEDIR for that. |
|
92 |
# USE_HOMEDIR: If this variable is set, PERSONAL_DIR will be prefixed with |
|
93 |
# ~/ at runtime (the user's homedir) |
|
|
561
e3b9689745ab
(svn r970) Added 2nd data path for all non-windows OSes
bjarni
parents:
551
diff
changeset
|
94 |
# SECOND_DATA_PATH Use this data dir if a file is not found in the data dir in the data path |
| 1251 | 95 |
# 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
|
96 |
# 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
|
97 |
# NOTE: both SECOND_DATA_PATH and CUSTOM_LANG_PATH uses paths relative to where OTTD is opened |
| 285 | 98 |
# |
99 |
# DEST_DIR: make install will use this directory instead of the filesystem |
|
100 |
# root to install its files. This should normally not be used by |
|
101 |
# ordinary users, currently it is only used for the debian |
|
102 |
# packaging. This value should only be set when calling `make |
|
103 |
# 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
|
104 |
# (Note that DESTDIR is checked if DEST_DIR is not set.) |
| 0 | 105 |
# |
106 |
# STATIC: link statically |
|
107 |
# CYGWIN: build in Cygwin environment |
|
108 |
# MINGW: build with MingW compiler, link with MingW libraries |
|
109 |
# |
|
|
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
|
110 |
# 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
|
111 |
# |
|
1692
2587eee1c632
(svn r2196) -Change: updated the Makefile, now it works for crossplatform compiling
TrueLight
parents:
1629
diff
changeset
|
112 |
# 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
|
113 |
# |
|
2587eee1c632
(svn r2196) -Change: updated the Makefile, now it works for crossplatform compiling
TrueLight
parents:
1629
diff
changeset
|
114 |
# 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
|
115 |
# WINDRES: the location of your windres |
|
2587eee1c632
(svn r2196) -Change: updated the Makefile, now it works for crossplatform compiling
TrueLight
parents:
1629
diff
changeset
|
116 |
# 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
|
117 |
# 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
|
118 |
# windows executables on linux. (just: CFLAGS_HOST:='-I' or something) |
|
2587eee1c632
(svn r2196) -Change: updated the Makefile, now it works for crossplatform compiling
TrueLight
parents:
1629
diff
changeset
|
119 |
# |
| 0 | 120 |
# Experimental (does not work properly): |
121 |
# WITH_DIRECTMUSIC: enable DirectMusic MIDI support |
|
122 |
||
123 |
||
124 |
############################################################################## |
|
125 |
# |
|
126 |
# Configuration |
|
127 |
# |
|
128 |
||
|
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
|
129 |
|
|
180
47ee14fe2b35
(svn r181) Makefile: enabled ability to supress output of missing strings in lng files
bjarni
parents:
164
diff
changeset
|
130 |
# Makefile version tag |
|
1492
e03a8c6f7efd
(svn r1996) makefile.config -> Makefile.config, that's its name.
pasky
parents:
1491
diff
changeset
|
131 |
# 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
|
132 |
MAKEFILE_VERSION:=7 |
|
180
47ee14fe2b35
(svn r181) Makefile: enabled ability to supress output of missing strings in lng files
bjarni
parents:
164
diff
changeset
|
133 |
|
| 1146 | 134 |
# CONFIG_WRITER has to be found even for manual configuration |
| 0 | 135 |
CONFIG_WRITER=makefiledir/Makefile.config_writer |
136 |
||
137 |
ifndef MANUAL_CONFIG |
|
138 |
# Automatic configuration |
|
139 |
MAKE_CONFIG:=Makefile.config |
|
140 |
MAKEFILE:=Makefile |
|
141 |
LIB_DETECTION=makefiledir/Makefile.libdetection |
|
142 |
CONFIG_WRITER=makefiledir/Makefile.config_writer |
|
143 |
||
144 |
# Apply automatic configuration |
|
145 |
# See target section for how this is built, suppress errors |
|
146 |
# since first time it isn't found but make reads this twice |
|
147 |
-include $(MAKE_CONFIG) |
|
148 |
else |
|
149 |
CONFIG_INCLUDED:=1 |
|
150 |
endif |
|
151 |
||
|
1955
52a84e880864
(svn r2461) -Feature [Makefile] libpng-config can now be called something else in Makefile.config
bjarni
parents:
1952
diff
changeset
|
152 |
ifndef LIBPNG-CONFIG |
|
52a84e880864
(svn r2461) -Feature [Makefile] libpng-config can now be called something else in Makefile.config
bjarni
parents:
1952
diff
changeset
|
153 |
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
|
154 |
endif |
|
52a84e880864
(svn r2461) -Feature [Makefile] libpng-config can now be called something else in Makefile.config
bjarni
parents:
1952
diff
changeset
|
155 |
|
|
1492
e03a8c6f7efd
(svn r1996) makefile.config -> Makefile.config, that's its name.
pasky
parents:
1491
diff
changeset
|
156 |
# 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
|
157 |
ifneq ($(MAKEFILE_VERSION),$(CONFIG_VERSION)) |
|
189
4d133909845a
(svn r190) Makefile: fixed bug, that prevented compilation with MANUAL_CONFIG enabled
bjarni
parents:
180
diff
changeset
|
158 |
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
|
159 |
UPDATECONFIG:=upgradeconf |
|
4d133909845a
(svn r190) Makefile: fixed bug, that prevented compilation with MANUAL_CONFIG enabled
bjarni
parents:
180
diff
changeset
|
160 |
CONFIG_INCLUDED:= |
|
4d133909845a
(svn r190) Makefile: fixed bug, that prevented compilation with MANUAL_CONFIG enabled
bjarni
parents:
180
diff
changeset
|
161 |
else |
|
4d133909845a
(svn r190) Makefile: fixed bug, that prevented compilation with MANUAL_CONFIG enabled
bjarni
parents:
180
diff
changeset
|
162 |
# 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
|
163 |
ifeq ($(shell uname),FreeBSD) |
|
4d133909845a
(svn r190) Makefile: fixed bug, that prevented compilation with MANUAL_CONFIG enabled
bjarni
parents:
180
diff
changeset
|
164 |
SDL-CONFIG:=sdl11-config |
|
4d133909845a
(svn r190) Makefile: fixed bug, that prevented compilation with MANUAL_CONFIG enabled
bjarni
parents:
180
diff
changeset
|
165 |
else |
|
4d133909845a
(svn r190) Makefile: fixed bug, that prevented compilation with MANUAL_CONFIG enabled
bjarni
parents:
180
diff
changeset
|
166 |
SDL-CONFIG:=sdl-config |
|
4d133909845a
(svn r190) Makefile: fixed bug, that prevented compilation with MANUAL_CONFIG enabled
bjarni
parents:
180
diff
changeset
|
167 |
endif |
|
4d133909845a
(svn r190) Makefile: fixed bug, that prevented compilation with MANUAL_CONFIG enabled
bjarni
parents:
180
diff
changeset
|
168 |
endif |
|
1693
e3a6eedee876
(svn r2197) -fix [Makefile]: SDL_CONFIG from makefile.config is now not always overwritten
bjarni
parents:
1692
diff
changeset
|
169 |
endif |
|
e3a6eedee876
(svn r2197) -fix [Makefile]: SDL_CONFIG from makefile.config is now not always overwritten
bjarni
parents:
1692
diff
changeset
|
170 |
|
|
e3a6eedee876
(svn r2197) -fix [Makefile]: SDL_CONFIG from makefile.config is now not always overwritten
bjarni
parents:
1692
diff
changeset
|
171 |
ifndef SDL-CONFIG |
|
e3a6eedee876
(svn r2197) -fix [Makefile]: SDL_CONFIG from makefile.config is now not always overwritten
bjarni
parents:
1692
diff
changeset
|
172 |
UPDATECONFIG:=upgradeconf |
|
e3a6eedee876
(svn r2197) -fix [Makefile]: SDL_CONFIG from makefile.config is now not always overwritten
bjarni
parents:
1692
diff
changeset
|
173 |
CONFIG_INCLUDED:= |
| 0 | 174 |
endif |
175 |
||
|
1492
e03a8c6f7efd
(svn r1996) makefile.config -> Makefile.config, that's its name.
pasky
parents:
1491
diff
changeset
|
176 |
# this is used if there aren't any Makefile.config |
| 0 | 177 |
ifndef CONFIG_INCLUDED |
| 285 | 178 |
# 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
|
179 |
ENABLE_NETWORK:=1 |
| 285 | 180 |
|
181 |
# paths for make install |
|
182 |
# disabled as they would break it for some (many?) people if they were default |
|
183 |
#PREFIX:=/usr/local |
|
184 |
#DATA_DIR:=share/games/openttd |
|
185 |
#BINARY_DIR:=games |
|
186 |
#PERSONAL_DIR:=.openttd |
|
187 |
#USE_HOMEDIR:=1 |
|
188 |
||
| 0 | 189 |
-include $(LIB_DETECTION) |
190 |
endif |
|
191 |
||
|
180
47ee14fe2b35
(svn r181) Makefile: enabled ability to supress output of missing strings in lng files
bjarni
parents:
164
diff
changeset
|
192 |
ifdef SUPRESS_LANG_ERRORS |
|
47ee14fe2b35
(svn r181) Makefile: enabled ability to supress output of missing strings in lng files
bjarni
parents:
164
diff
changeset
|
193 |
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
|
194 |
endif |
|
47ee14fe2b35
(svn r181) Makefile: enabled ability to supress output of missing strings in lng files
bjarni
parents:
164
diff
changeset
|
195 |
|
| 0 | 196 |
ifdef STATIC |
197 |
ifndef WIN32 |
|
198 |
ifndef OSX |
|
199 |
ifndef MORPHOS |
|
200 |
ifndef SKIP_STATIC_CHECK |
|
|
1492
e03a8c6f7efd
(svn r1996) makefile.config -> Makefile.config, that's its name.
pasky
parents:
1491
diff
changeset
|
201 |
$(error Static is only known to work on MorphOS and MacOSX!!! --- Check Makefile.config for more info and howto bypass this check) |
| 0 | 202 |
endif |
203 |
endif |
|
204 |
endif |
|
205 |
endif |
|
206 |
endif |
|
207 |
||
|
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
|
208 |
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
|
209 |
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
|
210 |
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
|
211 |
$(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
|
212 |
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
|
213 |
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
|
214 |
endif |
| 0 | 215 |
|
216 |
# Force SDL on UNIX platforms |
|
217 |
ifndef WITH_SDL |
|
218 |
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
|
219 |
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
|
220 |
$(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 | 221 |
endif |
222 |
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
|
223 |
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
|
224 |
|
|
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
|
225 |
# 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
|
226 |
# 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
|
227 |
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
|
228 |
WITH_SDL:= |
|
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
|
229 |
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
|
230 |
endif |
| 0 | 231 |
|
232 |
||
233 |
############################################################################## |
|
234 |
# |
|
235 |
# Compiler configuration |
|
236 |
# |
|
237 |
||
238 |
# Executable file extension |
|
239 |
ifdef WIN32 |
|
240 |
EXE=.exe |
|
241 |
else |
|
242 |
EXE= |
|
243 |
endif |
|
244 |
||
245 |
# Set output executable names |
|
| 32 | 246 |
TTD=openttd$(EXE) |
|
157
dd017fa3bad8
(svn r158) -Fix: make endianess check 100% accurate (hopefully ;))
truelight
parents:
126
diff
changeset
|
247 |
ENDIAN_CHECK=endian_check$(EXE) |
| 0 | 248 |
STRGEN=strgen/strgen$(EXE) |
249 |
OSXAPP="OpenTTD.app" |
|
250 |
||
251 |
# What revision are we compiling, if we have an idea? |
|
252 |
REV_NUMBER := $(shell if test -d .svn; then svnversion . | tr -dc 0-9; fi) |
|
253 |
||
254 |
ifdef RELEASE |
|
255 |
REV:=$(RELEASE) |
|
256 |
else |
|
| 450 | 257 |
REV := $(shell if test -d .svn; then svnversion . | awk '{ print "r"$$0 }'; fi)
|
| 0 | 258 |
tmp_test:=$(shell echo "$(REV)" | grep "M" ) |
259 |
ifdef tmp_test |
|
260 |
REV_NUMBER:=1 |
|
261 |
endif |
|
262 |
endif |
|
263 |
||
264 |
ifndef REV_NUMBER |
|
265 |
REV_NUMBER:=0 |
|
266 |
endif |
|
267 |
||
268 |
# 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
|
269 |
BUILDDATE=`date +%d.%m.%y` |
| 0 | 270 |
|
271 |
# AMD64 needs a little more settings to work |
|
272 |
ifeq ($(shell uname -m), x86_64) |
|
273 |
endwarnings:=endwarnings |
|
274 |
64_bit_warnings:=64_bit_warnings |
|
|
157
dd017fa3bad8
(svn r158) -Fix: make endianess check 100% accurate (hopefully ;))
truelight
parents:
126
diff
changeset
|
275 |
BASECFLAGS += -m64 |
| 0 | 276 |
endif |
277 |
||
|
1692
2587eee1c632
(svn r2196) -Change: updated the Makefile, now it works for crossplatform compiling
TrueLight
parents:
1629
diff
changeset
|
278 |
# 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
|
279 |
ifndef WINDRES |
|
2587eee1c632
(svn r2196) -Change: updated the Makefile, now it works for crossplatform compiling
TrueLight
parents:
1629
diff
changeset
|
280 |
WINDRES = windres |
|
2587eee1c632
(svn r2196) -Change: updated the Makefile, now it works for crossplatform compiling
TrueLight
parents:
1629
diff
changeset
|
281 |
endif |
|
2587eee1c632
(svn r2196) -Change: updated the Makefile, now it works for crossplatform compiling
TrueLight
parents:
1629
diff
changeset
|
282 |
|
|
2587eee1c632
(svn r2196) -Change: updated the Makefile, now it works for crossplatform compiling
TrueLight
parents:
1629
diff
changeset
|
283 |
# 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
|
284 |
ifdef CC_TARGET |
|
2587eee1c632
(svn r2196) -Change: updated the Makefile, now it works for crossplatform compiling
TrueLight
parents:
1629
diff
changeset
|
285 |
CC = $(CC_TARGET) |
|
2587eee1c632
(svn r2196) -Change: updated the Makefile, now it works for crossplatform compiling
TrueLight
parents:
1629
diff
changeset
|
286 |
endif |
|
2587eee1c632
(svn r2196) -Change: updated the Makefile, now it works for crossplatform compiling
TrueLight
parents:
1629
diff
changeset
|
287 |
|
|
2587eee1c632
(svn r2196) -Change: updated the Makefile, now it works for crossplatform compiling
TrueLight
parents:
1629
diff
changeset
|
288 |
# 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
|
289 |
ifndef CC_HOST |
|
2587eee1c632
(svn r2196) -Change: updated the Makefile, now it works for crossplatform compiling
TrueLight
parents:
1629
diff
changeset
|
290 |
CC_HOST = $(CC) |
|
2587eee1c632
(svn r2196) -Change: updated the Makefile, now it works for crossplatform compiling
TrueLight
parents:
1629
diff
changeset
|
291 |
endif |
|
2587eee1c632
(svn r2196) -Change: updated the Makefile, now it works for crossplatform compiling
TrueLight
parents:
1629
diff
changeset
|
292 |
ifndef CFLAGS_HOST |
|
2587eee1c632
(svn r2196) -Change: updated the Makefile, now it works for crossplatform compiling
TrueLight
parents:
1629
diff
changeset
|
293 |
CFLAGS_HOST = $(BASECFLAGS) |
|
2587eee1c632
(svn r2196) -Change: updated the Makefile, now it works for crossplatform compiling
TrueLight
parents:
1629
diff
changeset
|
294 |
endif |
| 0 | 295 |
|
296 |
# When calling the compiler, use these flags |
|
297 |
# -g debugging symbols |
|
298 |
# -Wall all warnings |
|
299 |
# -s automatic strip |
|
300 |
# |
|
301 |
# You may also want: |
|
302 |
# -O optimize or -O2 fully optimize (O's above 2 are not recommended) |
|
303 |
# -pg profile - generate profiling data. See "man gprof" to use this. |
|
304 |
||
|
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
|
305 |
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
|
306 |
|
|
53e669371277
(svn r1553) Check which gcc version is present and only set availible compiler flags
tron
parents:
1051
diff
changeset
|
307 |
# 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
|
308 |
# this is a workaround to test for >= |
|
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
|
309 |
ifeq ($(shell if test $(CC_VERSION) -ge 29; then echo true; fi), true) |
|
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
|
310 |
CFLAGS += -O -Wall -Wno-multichar -Wsign-compare -Wstrict-prototypes |
|
1324
ff8b7799b44f
(svn r1828) New warning flag especially for truelight (:<
tron
parents:
1317
diff
changeset
|
311 |
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
|
312 |
endif |
|
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
|
313 |
ifeq ($(shell if test $(CC_VERSION) -ge 30; then echo true; fi), true) |
|
1052
53e669371277
(svn r1553) Check which gcc version is present and only set availible compiler flags
tron
parents:
1051
diff
changeset
|
314 |
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
|
315 |
endif |
|
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
|
316 |
ifeq ($(shell if test $(CC_VERSION) -ge 34; then echo true; fi), true) |
|
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
|
317 |
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
|
318 |
endif |
|
53e669371277
(svn r1553) Check which gcc version is present and only set availible compiler flags
tron
parents:
1051
diff
changeset
|
319 |
|
|
1240
90b225e69c23
(svn r1744) DEBUG and PROFILE can be used at the same time.
tron
parents:
1211
diff
changeset
|
320 |
ifdef DEBUG |
|
1479
3bb687fbe344
(svn r1983) Introduce multiple compile time debug levels
tron
parents:
1476
diff
changeset
|
321 |
ifeq ($(shell expr $(DEBUG) \>= 1), 1) |
|
3bb687fbe344
(svn r1983) Introduce multiple compile time debug levels
tron
parents:
1476
diff
changeset
|
322 |
CFLAGS += -g -D_DEBUG |
|
3bb687fbe344
(svn r1983) Introduce multiple compile time debug levels
tron
parents:
1476
diff
changeset
|
323 |
endif |
|
3bb687fbe344
(svn r1983) Introduce multiple compile time debug levels
tron
parents:
1476
diff
changeset
|
324 |
ifeq ($(shell expr $(DEBUG) \>= 2), 1) |
|
3bb687fbe344
(svn r1983) Introduce multiple compile time debug levels
tron
parents:
1476
diff
changeset
|
325 |
CFLAGS += -fno-inline |
|
3bb687fbe344
(svn r1983) Introduce multiple compile time debug levels
tron
parents:
1476
diff
changeset
|
326 |
endif |
|
3bb687fbe344
(svn r1983) Introduce multiple compile time debug levels
tron
parents:
1476
diff
changeset
|
327 |
ifeq ($(shell expr $(DEBUG) \>= 3), 1) |
|
3bb687fbe344
(svn r1983) Introduce multiple compile time debug levels
tron
parents:
1476
diff
changeset
|
328 |
CFLAGS += -O0 |
|
3bb687fbe344
(svn r1983) Introduce multiple compile time debug levels
tron
parents:
1476
diff
changeset
|
329 |
endif |
|
1240
90b225e69c23
(svn r1744) DEBUG and PROFILE can be used at the same time.
tron
parents:
1211
diff
changeset
|
330 |
endif |
|
90b225e69c23
(svn r1744) DEBUG and PROFILE can be used at the same time.
tron
parents:
1211
diff
changeset
|
331 |
|
|
90b225e69c23
(svn r1744) DEBUG and PROFILE can be used at the same time.
tron
parents:
1211
diff
changeset
|
332 |
ifdef PROFILE |
|
90b225e69c23
(svn r1744) DEBUG and PROFILE can be used at the same time.
tron
parents:
1211
diff
changeset
|
333 |
CFLAGS += -pg |
|
90b225e69c23
(svn r1744) DEBUG and PROFILE can be used at the same time.
tron
parents:
1211
diff
changeset
|
334 |
LDFLAGS += -pg |
|
90b225e69c23
(svn r1744) DEBUG and PROFILE can be used at the same time.
tron
parents:
1211
diff
changeset
|
335 |
endif |
|
90b225e69c23
(svn r1744) DEBUG and PROFILE can be used at the same time.
tron
parents:
1211
diff
changeset
|
336 |
|
| 0 | 337 |
CDEFS=-DWITH_REV |
338 |
||
|
1240
90b225e69c23
(svn r1744) DEBUG and PROFILE can be used at the same time.
tron
parents:
1211
diff
changeset
|
339 |
ifndef DEBUG |
|
90b225e69c23
(svn r1744) DEBUG and PROFILE can be used at the same time.
tron
parents:
1211
diff
changeset
|
340 |
ifndef PROFILE |
| 0 | 341 |
# Release mode |
342 |
ifndef MORPHOS |
|
|
1810
bf33a29287e5
(svn r2314) - Feature: [ 1187490 ] Patches for building on IRIX (jgilje)
Darkvater
parents:
1722
diff
changeset
|
343 |
ifndef IRIX |
| 0 | 344 |
# automatical strip breaks under morphos |
345 |
BASECFLAGS += -s |
|
346 |
LDFLAGS += -s |
|
347 |
endif |
|
348 |
endif |
|
|
1810
bf33a29287e5
(svn r2314) - Feature: [ 1187490 ] Patches for building on IRIX (jgilje)
Darkvater
parents:
1722
diff
changeset
|
349 |
endif |
| 0 | 350 |
|
351 |
ifdef OSX |
|
352 |
# 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
|
353 |
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 | 354 |
else |
355 |
ifdef MORPHOS |
|
| 1291 | 356 |
BASECFLAGS += -O2 -noixemul -fstrict-aliasing -fexpensive-optimizations |
357 |
BASECFLAGS += -mcpu=604 -fno-inline -mstring -mmultiple |
|
| 0 | 358 |
else |
|
1169
30e8657f61d0
(svn r1671) Remove WARNING_DISPLAY, because it contained no warning, but an optimization flag
tron
parents:
1168
diff
changeset
|
359 |
BASECFLAGS += -O2 |
| 0 | 360 |
endif |
361 |
ifndef PROFILE |
|
|
1810
bf33a29287e5
(svn r2314) - Feature: [ 1187490 ] Patches for building on IRIX (jgilje)
Darkvater
parents:
1722
diff
changeset
|
362 |
ifndef IRIX |
| 0 | 363 |
BASECFLAGS += -fomit-frame-pointer |
364 |
endif |
|
365 |
endif |
|
366 |
endif |
|
|
1810
bf33a29287e5
(svn r2314) - Feature: [ 1187490 ] Patches for building on IRIX (jgilje)
Darkvater
parents:
1722
diff
changeset
|
367 |
endif |
| 0 | 368 |
|
369 |
ifdef STATIC |
|
370 |
ifndef OSX # OSX can't build static if -static flag is used |
|
371 |
LDFLAGS += -static |
|
372 |
endif |
|
373 |
endif |
|
374 |
||
| 798 | 375 |
# If building on MingW don't link with Cygwin libs |
| 0 | 376 |
ifdef WIN32 |
| 798 | 377 |
ifdef CYGWIN |
378 |
BASECFLAGS += -mwin32 |
|
379 |
LDFLAGS += -mwin32 |
|
380 |
endif |
|
| 0 | 381 |
ifdef MINGW |
382 |
BASECFLAGS += -mno-cygwin |
|
383 |
LDFLAGS += -mno-cygwin |
|
384 |
endif |
|
385 |
endif |
|
386 |
||
387 |
CFLAGS += $(BASECFLAGS) |
|
388 |
||
389 |
ifdef UNIX |
|
390 |
CDEFS += -DUNIX |
|
391 |
endif |
|
392 |
||
|
421
0b9bdcdfe0c5
(svn r619) Add the necessary bits to make building under BeOS using GNU Make work
tron
parents:
413
diff
changeset
|
393 |
ifdef BEOS |
|
0b9bdcdfe0c5
(svn r619) Add the necessary bits to make building under BeOS using GNU Make work
tron
parents:
413
diff
changeset
|
394 |
CDEFS += -DBEOS |
|
0b9bdcdfe0c5
(svn r619) Add the necessary bits to make building under BeOS using GNU Make work
tron
parents:
413
diff
changeset
|
395 |
LDFLAGS += -lmidi -lbe |
|
0b9bdcdfe0c5
(svn r619) Add the necessary bits to make building under BeOS using GNU Make work
tron
parents:
413
diff
changeset
|
396 |
ifdef WITH_NETWORK |
|
0b9bdcdfe0c5
(svn r619) Add the necessary bits to make building under BeOS using GNU Make work
tron
parents:
413
diff
changeset
|
397 |
ifdef BEOS_NET_SERVER |
| 1051 | 398 |
CDEFS += -DBEOS_NET_SERVER |
399 |
else |
|
400 |
# Zeta needs a few more libraries than R5 |
|
401 |
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
|
402 |
endif |
|
0b9bdcdfe0c5
(svn r619) Add the necessary bits to make building under BeOS using GNU Make work
tron
parents:
413
diff
changeset
|
403 |
endif |
|
0b9bdcdfe0c5
(svn r619) Add the necessary bits to make building under BeOS using GNU Make work
tron
parents:
413
diff
changeset
|
404 |
endif |
|
0b9bdcdfe0c5
(svn r619) Add the necessary bits to make building under BeOS using GNU Make work
tron
parents:
413
diff
changeset
|
405 |
|
|
1164
01c12c2f1973
(svn r1666) Move some MorphOS compile flags to a place where they actually belong
tron
parents:
1163
diff
changeset
|
406 |
ifdef MORPHOS |
| 1291 | 407 |
# -Wstrict-prototypes generates much noise because of system headers |
408 |
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
|
409 |
endif |
|
01c12c2f1973
(svn r1666) Move some MorphOS compile flags to a place where they actually belong
tron
parents:
1163
diff
changeset
|
410 |
|
|
446
20304ea8e94e
(svn r655) Add the necessary bits to make building on SunOS/Solaris work
tron
parents:
421
diff
changeset
|
411 |
ifdef SUNOS |
|
20304ea8e94e
(svn r655) Add the necessary bits to make building on SunOS/Solaris work
tron
parents:
421
diff
changeset
|
412 |
CDEFS += -DSUNOS |
|
20304ea8e94e
(svn r655) Add the necessary bits to make building on SunOS/Solaris work
tron
parents:
421
diff
changeset
|
413 |
ifdef WITH_NETWORK |
|
20304ea8e94e
(svn r655) Add the necessary bits to make building on SunOS/Solaris work
tron
parents:
421
diff
changeset
|
414 |
LDFLAGS += -lnsl -lsocket |
|
20304ea8e94e
(svn r655) Add the necessary bits to make building on SunOS/Solaris work
tron
parents:
421
diff
changeset
|
415 |
endif |
|
20304ea8e94e
(svn r655) Add the necessary bits to make building on SunOS/Solaris work
tron
parents:
421
diff
changeset
|
416 |
endif |
|
20304ea8e94e
(svn r655) Add the necessary bits to make building on SunOS/Solaris work
tron
parents:
421
diff
changeset
|
417 |
|
| 0 | 418 |
# SDL config |
419 |
ifdef WITH_SDL |
|
420 |
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
|
421 |
CFLAGS += $(shell $(SDL-CONFIG) --cflags) |
| 0 | 422 |
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
|
423 |
LIBS += $(shell $(SDL-CONFIG) --static-libs) |
| 0 | 424 |
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
|
425 |
LIBS += $(shell $(SDL-CONFIG) --libs) |
| 0 | 426 |
endif |
427 |
endif |
|
428 |
||
429 |
||
430 |
# zlib config |
|
431 |
ifdef WITH_ZLIB |
|
432 |
CDEFS += -DWITH_ZLIB |
|
433 |
ifdef STATIC |
|
434 |
ifdef OSX |
|
435 |
# zlib is default on OSX, so everybody have it. No need for static linking |
|
436 |
LIBS += -lz |
|
437 |
else |
|
438 |
ifndef STATIC_ZLIB_PATH |
|
439 |
ifndef MANUAL_CONFIG |
|
|
1492
e03a8c6f7efd
(svn r1996) makefile.config -> Makefile.config, that's its name.
pasky
parents:
1491
diff
changeset
|
440 |
# updates Makefile.config with the zlib path |
| 0 | 441 |
UPDATECONFIG:=upgradeconf |
442 |
endif |
|
443 |
TEMP:=$(shell ls /lib 2>/dev/null | grep "zlib.a")$(shell ls /lib 2>/dev/null | grep "libz.a") |
|
444 |
ifdef TEMP |
|
445 |
STATIC_ZLIB_PATH:=/lib/$(TEMP) |
|
446 |
else |
|
447 |
TEMP:=$(shell ls /usr/lib 2>/dev/null | grep "zlib.a")$(shell ls /usr/lib 2>/dev/null | grep "libz.a") |
|
448 |
ifdef TEMP |
|
449 |
STATIC_ZLIB_PATH:=/usr/lib/$(TEMP) |
|
450 |
else |
|
451 |
TEMP:=$(shell ls /usr/local/lib 2>/dev/null | grep "zlib.a")$(shell ls /usr/local/lib 2>/dev/null | grep "libz.a") |
|
452 |
ifdef TEMP |
|
453 |
STATIC_ZLIB_PATH:=/usr/local/lib/$(TEMP) |
|
454 |
endif |
|
455 |
endif |
|
456 |
endif |
|
457 |
endif |
|
458 |
LIBS += $(STATIC_ZLIB_PATH) |
|
459 |
endif |
|
460 |
else |
|
461 |
LIBS += -lz |
|
462 |
endif |
|
463 |
endif |
|
464 |
||
465 |
# libpng config |
|
466 |
ifdef WITH_PNG |
|
467 |
CDEFS += -DWITH_PNG |
|
|
1955
52a84e880864
(svn r2461) -Feature [Makefile] libpng-config can now be called something else in Makefile.config
bjarni
parents:
1952
diff
changeset
|
468 |
CFLAGS += $(shell $(LIBPNG-CONFIG) --cflags) |
|
551
48dc69ef0e94
(svn r951) Makefile: fixed missing flag for libpng, which prevented lib detection if SDL was not used
bjarni
parents:
549
diff
changeset
|
469 |
|
| 0 | 470 |
# seems like older libpng versions are broken and need this |
471 |
PNGCONFIG_FLAGS = --ldflags --libs |
|
472 |
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
|
473 |
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
|
474 |
# 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
|
475 |
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
|
476 |
else |
|
1955
52a84e880864
(svn r2461) -Feature [Makefile] libpng-config can now be called something else in Makefile.config
bjarni
parents:
1952
diff
changeset
|
477 |
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
|
478 |
endif |
| 0 | 479 |
else |
|
1955
52a84e880864
(svn r2461) -Feature [Makefile] libpng-config can now be called something else in Makefile.config
bjarni
parents:
1952
diff
changeset
|
480 |
LIBS += $(shell $(LIBPNG-CONFIG) --L_opts $(PNGCONFIG_FLAGS)) |
| 0 | 481 |
endif |
482 |
endif |
|
483 |
||
|
347
892935295937
(svn r530) Makefile: added ability to switch asserts on and off
bjarni
parents:
285
diff
changeset
|
484 |
# enables/disables assert() |
|
348
959f425dc282
(svn r531) Makefile: made asserts enabled by default
bjarni
parents:
347
diff
changeset
|
485 |
ifdef DISABLE_ASSERTS |
|
959f425dc282
(svn r531) Makefile: made asserts enabled by default
bjarni
parents:
347
diff
changeset
|
486 |
CFLAGS += -DNDEBUG |
|
959f425dc282
(svn r531) Makefile: made asserts enabled by default
bjarni
parents:
347
diff
changeset
|
487 |
endif |
|
959f425dc282
(svn r531) Makefile: made asserts enabled by default
bjarni
parents:
347
diff
changeset
|
488 |
|
|
959f425dc282
(svn r531) Makefile: made asserts enabled by default
bjarni
parents:
347
diff
changeset
|
489 |
# automatically disables asserts for release |
|
959f425dc282
(svn r531) Makefile: made asserts enabled by default
bjarni
parents:
347
diff
changeset
|
490 |
ifdef RELEASE |
|
347
892935295937
(svn r530) Makefile: added ability to switch asserts on and off
bjarni
parents:
285
diff
changeset
|
491 |
ifndef ENABLE_ASSERTS |
|
892935295937
(svn r530) Makefile: added ability to switch asserts on and off
bjarni
parents:
285
diff
changeset
|
492 |
CFLAGS += -DNDEBUG |
|
892935295937
(svn r530) Makefile: added ability to switch asserts on and off
bjarni
parents:
285
diff
changeset
|
493 |
endif |
|
348
959f425dc282
(svn r531) Makefile: made asserts enabled by default
bjarni
parents:
347
diff
changeset
|
494 |
endif |
| 0 | 495 |
|
496 |
ifdef TRANSLATOR |
|
497 |
STRGEN_FLAGS=-t |
|
498 |
else |
|
499 |
STRGEN_FLAGS= |
|
500 |
endif |
|
501 |
||
502 |
||
503 |
# MIDI setup |
|
504 |
ifdef OSX |
|
505 |
ifndef MIDI |
|
|
1951
dea2c67cc9a8
(svn r2457) -Fix: typo in Makefile for OSX builds
truelight
parents:
1942
diff
changeset
|
506 |
MIDI:=$(OSXAPP)/Contents/MacOS/track_starter |
| 0 | 507 |
endif |
|
561
e3b9689745ab
(svn r970) Added 2nd data path for all non-windows OSes
bjarni
parents:
551
diff
changeset
|
508 |
ifndef SECOND_DATA_PATH |
|
1720
b53cf8e5cd44
(svn r2224) -Fix: capital-correctness for OSX-dir-names
truelight
parents:
1694
diff
changeset
|
509 |
SECOND_DATA_PATH:="$(OSXAPP)/Contents/Data/" |
|
561
e3b9689745ab
(svn r970) Added 2nd data path for all non-windows OSes
bjarni
parents:
551
diff
changeset
|
510 |
endif |
|
e3b9689745ab
(svn r970) Added 2nd data path for all non-windows OSes
bjarni
parents:
551
diff
changeset
|
511 |
ifndef CUSTOM_LANG_DIR |
|
1720
b53cf8e5cd44
(svn r2224) -Fix: capital-correctness for OSX-dir-names
truelight
parents:
1694
diff
changeset
|
512 |
CUSTOM_LANG_DIR:="$(OSXAPP)/Contents/Lang/" |
|
561
e3b9689745ab
(svn r970) Added 2nd data path for all non-windows OSes
bjarni
parents:
551
diff
changeset
|
513 |
endif |
| 0 | 514 |
endif |
515 |
||
516 |
ifdef MIDI |
|
517 |
CDEFS += -DEXTERNAL_PLAYER=\"$(MIDI)\" |
|
518 |
ifdef MIDI_ARG |
|
519 |
CDEFS += -DMIDI_ARG=\"$(MIDI_ARG)\" |
|
520 |
endif |
|
521 |
endif |
|
522 |
||
523 |
ifdef WITH_NETWORK |
|
524 |
CDEFS += -DENABLE_NETWORK |
|
|
543
e3b43338096b
(svn r942) -Merged branch/network back into the trunk
truelight
parents:
532
diff
changeset
|
525 |
ifdef QNX |
|
e3b43338096b
(svn r942) -Merged branch/network back into the trunk
truelight
parents:
532
diff
changeset
|
526 |
LIBS += -lsocket |
|
e3b43338096b
(svn r942) -Merged branch/network back into the trunk
truelight
parents:
532
diff
changeset
|
527 |
endif |
| 0 | 528 |
ifdef UNIX |
529 |
ifndef OSX |
|
530 |
ifndef MORPHOS |
|
531 |
# this have caused problems on many platforms and disabling it didn't break anything |
|
532 |
# now we test if disabling it as a general breaks it for anybody |
|
533 |
#LIBS += -lresolv |
|
534 |
endif |
|
535 |
endif |
|
536 |
endif |
|
537 |
endif |
|
538 |
||
|
561
e3b9689745ab
(svn r970) Added 2nd data path for all non-windows OSes
bjarni
parents:
551
diff
changeset
|
539 |
|
|
e3b9689745ab
(svn r970) Added 2nd data path for all non-windows OSes
bjarni
parents:
551
diff
changeset
|
540 |
ifdef SECOND_DATA_PATH |
|
e3b9689745ab
(svn r970) Added 2nd data path for all non-windows OSes
bjarni
parents:
551
diff
changeset
|
541 |
CDEFS += -DSECOND_DATA_DIR=\"$(SECOND_DATA_PATH)/\" |
|
e3b9689745ab
(svn r970) Added 2nd data path for all non-windows OSes
bjarni
parents:
551
diff
changeset
|
542 |
endif |
|
e3b9689745ab
(svn r970) Added 2nd data path for all non-windows OSes
bjarni
parents:
551
diff
changeset
|
543 |
|
|
e3b9689745ab
(svn r970) Added 2nd data path for all non-windows OSes
bjarni
parents:
551
diff
changeset
|
544 |
ifdef CUSTOM_LANG_DIR |
|
e3b9689745ab
(svn r970) Added 2nd data path for all non-windows OSes
bjarni
parents:
551
diff
changeset
|
545 |
CDEFS += -DCUSTOM_LANG_DIR=\"$(CUSTOM_LANG_DIR)/\" |
|
e3b9689745ab
(svn r970) Added 2nd data path for all non-windows OSes
bjarni
parents:
551
diff
changeset
|
546 |
endif |
|
e3b9689745ab
(svn r970) Added 2nd data path for all non-windows OSes
bjarni
parents:
551
diff
changeset
|
547 |
|
| 0 | 548 |
ifdef WITH_DIRECTMUSIC |
549 |
CDEFS += -DWIN32_ENABLE_DIRECTMUSIC_SUPPORT |
|
550 |
endif |
|
551 |
||
552 |
ifdef WIN32 |
|
|
1692
2587eee1c632
(svn r2196) -Change: updated the Makefile, now it works for crossplatform compiling
TrueLight
parents:
1629
diff
changeset
|
553 |
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
|
554 |
ifdef WITH_DIRECTMUSIC |
|
2587eee1c632
(svn r2196) -Change: updated the Makefile, now it works for crossplatform compiling
TrueLight
parents:
1629
diff
changeset
|
555 |
LIBS += -lstdc++ |
|
2587eee1c632
(svn r2196) -Change: updated the Makefile, now it works for crossplatform compiling
TrueLight
parents:
1629
diff
changeset
|
556 |
endif |
| 0 | 557 |
TTDLDFLAGS += -Wl,--subsystem,windows |
558 |
endif |
|
559 |
||
|
1476
abbcea18a01c
(svn r1980) Check $DESTDIR if $DEST_DIR was not set.
pasky
parents:
1435
diff
changeset
|
560 |
ifndef DEST_DIR |
|
abbcea18a01c
(svn r1980) Check $DESTDIR if $DEST_DIR was not set.
pasky
parents:
1435
diff
changeset
|
561 |
DEST_DIR = $(DESTDIR) |
|
abbcea18a01c
(svn r1980) Check $DESTDIR if $DEST_DIR was not set.
pasky
parents:
1435
diff
changeset
|
562 |
endif |
|
abbcea18a01c
(svn r1980) Check $DESTDIR if $DEST_DIR was not set.
pasky
parents:
1435
diff
changeset
|
563 |
|
| 0 | 564 |
# sets up the paths for use for make install |
| 285 | 565 |
ifdef INSTALL |
566 |
# We use _PREFIXED vars here, so the paths are recalculated every time, and |
|
567 |
# the prefix is not prepended in the makefile config |
|
568 |
BINARY_DIR_PREFIXED:=$(PREFIX)/$(BINARY_DIR) |
|
569 |
DATA_DIR_PREFIXED:=$(PREFIX)/$(DATA_DIR) |
|
570 |
# We use _INSTALL vars here, these vars are the locations where the files will |
|
571 |
# be installed |
|
572 |
DATA_DIR_INSTALL=$(DEST_DIR)/$(DATA_DIR_PREFIXED) |
|
573 |
BINARY_DIR_INSTALL=$(DEST_DIR)/$(BINARY_DIR_PREFIXED) |
|
574 |
# Let the code know where to find stuff |
|
575 |
ifdef DATA_DIR_PREFIXED |
|
576 |
CDEFS += -DGAME_DATA_DIR=\"$(DATA_DIR_PREFIXED)/\" |
|
| 0 | 577 |
endif |
| 285 | 578 |
|
579 |
ifdef PERSONAL_DIR |
|
580 |
CDEFS += -DPERSONAL_DIR=\"$(PERSONAL_DIR)/\" |
|
581 |
endif |
|
582 |
||
583 |
ifdef USE_HOMEDIR |
|
584 |
CDEFS += -DUSE_HOMEDIR |
|
585 |
endif |
|
| 0 | 586 |
endif |
587 |
||
588 |
############################################################################## |
|
589 |
# |
|
590 |
# What to compile |
|
591 |
# (users do not want to modify anything below) |
|
592 |
# |
|
593 |
||
594 |
||
595 |
### Sources |
|
596 |
||
| 677 | 597 |
C_SOURCES += ai.c |
598 |
C_SOURCES += ai_build.c |
|
599 |
C_SOURCES += ai_new.c |
|
600 |
C_SOURCES += ai_pathfinder.c |
|
601 |
C_SOURCES += ai_shared.c |
|
602 |
C_SOURCES += aircraft_cmd.c |
|
603 |
C_SOURCES += aircraft_gui.c |
|
604 |
C_SOURCES += airport.c |
|
605 |
C_SOURCES += airport_gui.c |
|
606 |
C_SOURCES += aystar.c |
|
607 |
C_SOURCES += bridge_gui.c |
|
608 |
C_SOURCES += callback_table.c |
|
609 |
C_SOURCES += clear_cmd.c |
|
610 |
C_SOURCES += command.c |
|
611 |
C_SOURCES += console.c |
|
612 |
C_SOURCES += console_cmds.c |
|
|
1299
0a6510cc889b
(svn r1803) Move debugging stuff into files of it's own
tron
parents:
1292
diff
changeset
|
613 |
C_SOURCES += debug.c |
| 677 | 614 |
C_SOURCES += dedicated.c |
|
1313
bba6afb8a995
(svn r1817) -Codechange: Moved depot-functions to depot.c
truelight
parents:
1299
diff
changeset
|
615 |
C_SOURCES += depot.c |
| 677 | 616 |
C_SOURCES += disaster_cmd.c |
617 |
C_SOURCES += dock_gui.c |
|
618 |
C_SOURCES += dummy_land.c |
|
619 |
C_SOURCES += economy.c |
|
620 |
C_SOURCES += engine.c |
|
621 |
C_SOURCES += engine_gui.c |
|
622 |
C_SOURCES += fileio.c |
|
623 |
C_SOURCES += gfx.c |
|
624 |
C_SOURCES += graph_gui.c |
|
625 |
C_SOURCES += newgrf.c |
|
626 |
C_SOURCES += industry_cmd.c |
|
627 |
C_SOURCES += industry_gui.c |
|
628 |
C_SOURCES += intro_gui.c |
|
629 |
C_SOURCES += landscape.c |
|
630 |
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
|
631 |
C_SOURCES += map.c |
| 677 | 632 |
C_SOURCES += md5.c |
633 |
C_SOURCES += minilzo.c |
|
634 |
C_SOURCES += misc.c |
|
635 |
C_SOURCES += misc_cmd.c |
|
636 |
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
|
637 |
C_SOURCES += mixer.c |
| 677 | 638 |
C_SOURCES += music_gui.c |
639 |
C_SOURCES += namegen.c |
|
640 |
C_SOURCES += network.c |
|
641 |
C_SOURCES += network_client.c |
|
642 |
C_SOURCES += network_data.c |
|
643 |
C_SOURCES += network_gamelist.c |
|
644 |
C_SOURCES += network_gui.c |
|
645 |
C_SOURCES += network_server.c |
|
646 |
C_SOURCES += network_udp.c |
|
647 |
C_SOURCES += news_gui.c |
|
| 1247 | 648 |
C_SOURCES += npf.c |
| 677 | 649 |
C_SOURCES += oldloader.c |
650 |
C_SOURCES += order_cmd.c |
|
651 |
C_SOURCES += order_gui.c |
|
|
1985
c4ec1653a337
(svn r2491) -Fix: Solved a performance problem introduced in r2467. While busy
celestar
parents:
1955
diff
changeset
|
652 |
C_SOURCES += openttd.c |
| 677 | 653 |
C_SOURCES += pathfind.c |
654 |
C_SOURCES += player_gui.c |
|
655 |
C_SOURCES += players.c |
|
|
1259
6dc9a1521c00
(svn r1763) -Add: pool.c / pool.h: generalized routines for dynamic arrays (MemoryPools)
truelight
parents:
1257
diff
changeset
|
656 |
C_SOURCES += pool.c |
| 677 | 657 |
C_SOURCES += queue.c |
|
1942
634961366cdc
(svn r2448) General cleanup of rail related code, more to follow.
matthijs
parents:
1891
diff
changeset
|
658 |
C_SOURCES += rail.c |
| 677 | 659 |
C_SOURCES += rail_cmd.c |
660 |
C_SOURCES += rail_gui.c |
|
661 |
C_SOURCES += rev.c |
|
662 |
C_SOURCES += road_cmd.c |
|
663 |
C_SOURCES += road_gui.c |
|
664 |
C_SOURCES += roadveh_cmd.c |
|
665 |
C_SOURCES += roadveh_gui.c |
|
666 |
C_SOURCES += saveload.c |
|
667 |
C_SOURCES += screenshot.c |
|
668 |
C_SOURCES += settings.c |
|
669 |
C_SOURCES += settings_gui.c |
|
670 |
C_SOURCES += ship_cmd.c |
|
671 |
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
|
672 |
C_SOURCES += signs.c |
| 677 | 673 |
C_SOURCES += smallmap_gui.c |
674 |
C_SOURCES += sound.c |
|
675 |
C_SOURCES += sprite.c |
|
676 |
C_SOURCES += spritecache.c |
|
677 |
C_SOURCES += station_cmd.c |
|
678 |
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
|
679 |
C_SOURCES += string.c |
| 677 | 680 |
C_SOURCES += strings.c |
681 |
C_SOURCES += subsidy_gui.c |
|
682 |
C_SOURCES += terraform_gui.c |
|
683 |
C_SOURCES += texteff.c |
|
| 1211 | 684 |
C_SOURCES += tile.c |
| 677 | 685 |
C_SOURCES += town_cmd.c |
686 |
C_SOURCES += town_gui.c |
|
687 |
C_SOURCES += train_cmd.c |
|
688 |
C_SOURCES += train_gui.c |
|
689 |
C_SOURCES += tree_cmd.c |
|
690 |
C_SOURCES += tunnelbridge_cmd.c |
|
691 |
C_SOURCES += unmovable_cmd.c |
|
692 |
C_SOURCES += vehicle.c |
|
693 |
C_SOURCES += vehicle_gui.c |
|
694 |
C_SOURCES += viewport.c |
|
695 |
C_SOURCES += water_cmd.c |
|
|
1542
2ca6d1624e6d
(svn r2046) -Codechange: moved all waypoint code to waypoint.c/waypoint.h
truelight
parents:
1496
diff
changeset
|
696 |
C_SOURCES += waypoint.c |
| 677 | 697 |
C_SOURCES += widget.c |
698 |
C_SOURCES += window.c |
|
699 |
||
|
421
0b9bdcdfe0c5
(svn r619) Add the necessary bits to make building under BeOS using GNU Make work
tron
parents:
413
diff
changeset
|
700 |
CXX_SOURCES = |
| 0 | 701 |
|
|
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
|
702 |
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
|
703 |
C_SOURCES += sdl.c |
|
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
|
704 |
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
|
705 |
|
| 0 | 706 |
ifdef WIN32 |
|
421
0b9bdcdfe0c5
(svn r619) Add the necessary bits to make building under BeOS using GNU Make work
tron
parents:
413
diff
changeset
|
707 |
C_SOURCES += win32.c w32dm.c |
| 0 | 708 |
else |
|
421
0b9bdcdfe0c5
(svn r619) Add the necessary bits to make building under BeOS using GNU Make work
tron
parents:
413
diff
changeset
|
709 |
C_SOURCES += extmidi.c unix.c |
| 0 | 710 |
endif |
711 |
||
|
1167
d8b7601118cf
(svn r1669) Rename all ttd_XXX to just XXX, because we already know who we are (;
tron
parents:
1164
diff
changeset
|
712 |
OBJS = $(C_SOURCES:%.c=%.o) $(CXX_SOURCES:%.cpp=%.o) |
|
421
0b9bdcdfe0c5
(svn r619) Add the necessary bits to make building under BeOS using GNU Make work
tron
parents:
413
diff
changeset
|
713 |
|
|
0b9bdcdfe0c5
(svn r619) Add the necessary bits to make building under BeOS using GNU Make work
tron
parents:
413
diff
changeset
|
714 |
ifdef BEOS |
| 532 | 715 |
CXX_SOURCES += os/beos/bemidi.cpp |
716 |
CFLAGS += -I. |
|
|
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 |
|
|
421
0b9bdcdfe0c5
(svn r619) Add the necessary bits to make building under BeOS using GNU Make work
tron
parents:
413
diff
changeset
|
725 |
CXX_SOURCES += w32dm2.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 |
|
|
1435
89d0c6a56a9b
(svn r1939) Revert part of r1938 which accidently crept in
tron
parents:
1434
diff
changeset
|
751 |
# Show the command (quiet or non-quiet version based on the assignment |
|
89d0c6a56a9b
(svn r1939) Revert part of r1938 which accidently crept in
tron
parents:
1434
diff
changeset
|
752 |
# just above) and then execute it. |
|
89d0c6a56a9b
(svn r1939) Revert part of r1938 which accidently crept in
tron
parents:
1434
diff
changeset
|
753 |
cmd = @$(if $($(quiet)cmd_$(1)),echo $($(quiet)cmd_$(1)) &&) $(cmd_$(1)) |
|
89d0c6a56a9b
(svn r1939) Revert part of r1938 which accidently crept in
tron
parents:
1434
diff
changeset
|
754 |
|
|
89d0c6a56a9b
(svn r1939) Revert part of r1938 which accidently crept in
tron
parents:
1434
diff
changeset
|
755 |
|
|
89d0c6a56a9b
(svn r1939) Revert part of r1938 which accidently crept in
tron
parents:
1434
diff
changeset
|
756 |
# The build commands themselves. Note that if you omit the quiet version, |
|
89d0c6a56a9b
(svn r1939) Revert part of r1938 which accidently crept in
tron
parents:
1434
diff
changeset
|
757 |
# nothing will be shown in the non-verbose mode. |
|
89d0c6a56a9b
(svn r1939) Revert part of r1938 which accidently crept in
tron
parents:
1434
diff
changeset
|
758 |
|
|
89d0c6a56a9b
(svn r1939) Revert part of r1938 which accidently crept in
tron
parents:
1434
diff
changeset
|
759 |
quiet_cmd_compile_link = '===> Compiling and Linking $@' |
|
1692
2587eee1c632
(svn r2196) -Change: updated the Makefile, now it works for crossplatform compiling
TrueLight
parents:
1629
diff
changeset
|
760 |
cmd_compile_link = $(CC_HOST) $(CFLAGS_HOST) $(CDEFS) $< -o $@ |
|
1435
89d0c6a56a9b
(svn r1939) Revert part of r1938 which accidently crept in
tron
parents:
1434
diff
changeset
|
761 |
|
|
89d0c6a56a9b
(svn r1939) Revert part of r1938 which accidently crept in
tron
parents:
1434
diff
changeset
|
762 |
quiet_cmd_ttd_link = '===> Linking $@' |
|
89d0c6a56a9b
(svn r1939) Revert part of r1938 which accidently crept in
tron
parents:
1434
diff
changeset
|
763 |
cmd_ttd_link = $(CC) $(LDFLAGS) $(TTDLDFLAGS) $(OBJS) $(LIBS) -o $@ |
|
89d0c6a56a9b
(svn r1939) Revert part of r1938 which accidently crept in
tron
parents:
1434
diff
changeset
|
764 |
|
|
89d0c6a56a9b
(svn r1939) Revert part of r1938 which accidently crept in
tron
parents:
1434
diff
changeset
|
765 |
COMPILE_PARAMS=$(CFLAGS) $(CDEFS) -MD -c $< -o $@ |
|
89d0c6a56a9b
(svn r1939) Revert part of r1938 which accidently crept in
tron
parents:
1434
diff
changeset
|
766 |
|
|
89d0c6a56a9b
(svn r1939) Revert part of r1938 which accidently crept in
tron
parents:
1434
diff
changeset
|
767 |
quiet_cmd_c_compile = '===> Compiling $<' |
|
89d0c6a56a9b
(svn r1939) Revert part of r1938 which accidently crept in
tron
parents:
1434
diff
changeset
|
768 |
cmd_c_compile = $(CC) $(COMPILE_PARAMS) |
|
89d0c6a56a9b
(svn r1939) Revert part of r1938 which accidently crept in
tron
parents:
1434
diff
changeset
|
769 |
|
|
89d0c6a56a9b
(svn r1939) Revert part of r1938 which accidently crept in
tron
parents:
1434
diff
changeset
|
770 |
quiet_cmd_cxx_compile = '===> Compiling $<' |
|
89d0c6a56a9b
(svn r1939) Revert part of r1938 which accidently crept in
tron
parents:
1434
diff
changeset
|
771 |
cmd_cxx_compile = $(CXX) $(COMPILE_PARAMS) |
|
89d0c6a56a9b
(svn r1939) Revert part of r1938 which accidently crept in
tron
parents:
1434
diff
changeset
|
772 |
|
|
1413
4a93d8682e11
(svn r1917) - Makefile: Revamped VERBOSE support, build mechanics changed.
pasky
parents:
1411
diff
changeset
|
773 |
|
|
4a93d8682e11
(svn r1917) - Makefile: Revamped VERBOSE support, build mechanics changed.
pasky
parents:
1411
diff
changeset
|
774 |
############################################################################## |
|
4a93d8682e11
(svn r1917) - Makefile: Revamped VERBOSE support, build mechanics changed.
pasky
parents:
1411
diff
changeset
|
775 |
# |
| 0 | 776 |
# Targets |
777 |
# |
|
778 |
||
779 |
||
780 |
### Normal build rules |
|
781 |
||
782 |
||
783 |
ifdef OSX |
|
784 |
OSX:=OSX |
|
|
1822
8113e6ba4d8d
(svn r2327) -fix [MacOSX] default path for midi player on mac is now correct again
bjarni
parents:
1810
diff
changeset
|
785 |
OSX_MIDI_PLAYER_FILE:=os/macos/OpenTTDMidi.class |
| 0 | 786 |
endif |
787 |
||
788 |
||
|
1721
64d59b181596
(svn r2225) -Fix: split the endian-detection to target/host. Now cross-compiling
truelight
parents:
1720
diff
changeset
|
789 |
all: endian_target.h endian_host.h $(UPDATECONFIG) $(LANGS) $(TTD) $(OSX) $(endwarnings) |
| 0 | 790 |
|
|
1721
64d59b181596
(svn r2225) -Fix: split the endian-detection to target/host. Now cross-compiling
truelight
parents:
1720
diff
changeset
|
791 |
endian_host.h: $(ENDIAN_CHECK) |
|
64d59b181596
(svn r2225) -Fix: split the endian-detection to target/host. Now cross-compiling
truelight
parents:
1720
diff
changeset
|
792 |
@echo '===> Testing endianness for host' |
|
64d59b181596
(svn r2225) -Fix: split the endian-detection to target/host. Now cross-compiling
truelight
parents:
1720
diff
changeset
|
793 |
$(Q)./$(ENDIAN_CHECK) > $@ |
|
64d59b181596
(svn r2225) -Fix: split the endian-detection to target/host. Now cross-compiling
truelight
parents:
1720
diff
changeset
|
794 |
|
|
64d59b181596
(svn r2225) -Fix: split the endian-detection to target/host. Now cross-compiling
truelight
parents:
1720
diff
changeset
|
795 |
endian_target.h: $(ENDIAN_CHECK) |
|
64d59b181596
(svn r2225) -Fix: split the endian-detection to target/host. Now cross-compiling
truelight
parents:
1720
diff
changeset
|
796 |
@echo '===> Testing endianness for target' |
|
1692
2587eee1c632
(svn r2196) -Change: updated the Makefile, now it works for crossplatform compiling
TrueLight
parents:
1629
diff
changeset
|
797 |
$(Q)./$(ENDIAN_CHECK) $(ENDIAN_FORCE) > $@ |
|
157
dd017fa3bad8
(svn r158) -Fix: make endianess check 100% accurate (hopefully ;))
truelight
parents:
126
diff
changeset
|
798 |
|
|
dd017fa3bad8
(svn r158) -Fix: make endianess check 100% accurate (hopefully ;))
truelight
parents:
126
diff
changeset
|
799 |
$(ENDIAN_CHECK): endian_check.c |
|
1435
89d0c6a56a9b
(svn r1939) Revert part of r1938 which accidently crept in
tron
parents:
1434
diff
changeset
|
800 |
$(call cmd,compile_link) |
|
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
|
801 |
|
| 0 | 802 |
|
|
1167
d8b7601118cf
(svn r1669) Rename all ttd_XXX to just XXX, because we already know who we are (;
tron
parents:
1164
diff
changeset
|
803 |
$(TTD): table/strings.h $(OBJS) $(MAKE_CONFIG) |
|
1435
89d0c6a56a9b
(svn r1939) Revert part of r1938 which accidently crept in
tron
parents:
1434
diff
changeset
|
804 |
$(call cmd,ttd_link) |
| 0 | 805 |
|
|
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
|
806 |
$(OSX): $(TTD) |
|
1413
4a93d8682e11
(svn r1917) - Makefile: Revamped VERBOSE support, build mechanics changed.
pasky
parents:
1411
diff
changeset
|
807 |
$(Q)rm -fr "$(OSXAPP)" |
|
4a93d8682e11
(svn r1917) - Makefile: Revamped VERBOSE support, build mechanics changed.
pasky
parents:
1411
diff
changeset
|
808 |
$(Q)mkdir -p "$(OSXAPP)"/Contents/MacOS |
|
4a93d8682e11
(svn r1917) - Makefile: Revamped VERBOSE support, build mechanics changed.
pasky
parents:
1411
diff
changeset
|
809 |
$(Q)mkdir -p "$(OSXAPP)"/Contents/Resources |
|
4a93d8682e11
(svn r1917) - Makefile: Revamped VERBOSE support, build mechanics changed.
pasky
parents:
1411
diff
changeset
|
810 |
$(Q)mkdir -p "$(OSXAPP)"/Contents/Data |
|
4a93d8682e11
(svn r1917) - Makefile: Revamped VERBOSE support, build mechanics changed.
pasky
parents:
1411
diff
changeset
|
811 |
$(Q)mkdir -p "$(OSXAPP)"/Contents/Lang |
|
4a93d8682e11
(svn r1917) - Makefile: Revamped VERBOSE support, build mechanics changed.
pasky
parents:
1411
diff
changeset
|
812 |
$(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
|
813 |
$(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
|
814 |
$(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
|
815 |
$(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
|
816 |
$(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
|
817 |
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
|
818 |
$(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
|
819 |
$(Q)cp data/* "$(OSXAPP)"/Contents/Data/ |
|
b53cf8e5cd44
(svn r2224) -Fix: capital-correctness for OSX-dir-names
truelight
parents:
1694
diff
changeset
|
820 |
$(Q)cp lang/*.lng "$(OSXAPP)"/Contents/Lang/ |
|
1413
4a93d8682e11
(svn r1917) - Makefile: Revamped VERBOSE support, build mechanics changed.
pasky
parents:
1411
diff
changeset
|
821 |
$(Q)cp $(TTD) "$(OSXAPP)"/Contents/MacOS/$(TTD) |
| 0 | 822 |
|
823 |
$(endwarnings): $(64_bit_warnings) |
|
824 |
||
825 |
$(64_bit_warnings): |
|
826 |
$(warning 64 bit CPUs will get some 64 bit specific bugs!) |
|
827 |
$(warning If you see any bugs, include in your bug report that you use a 64 bit CPU) |
|
828 |
||
|
1721
64d59b181596
(svn r2225) -Fix: split the endian-detection to target/host. Now cross-compiling
truelight
parents:
1720
diff
changeset
|
829 |
$(STRGEN): strgen/strgen.c endian_host.h |
|
1435
89d0c6a56a9b
(svn r1939) Revert part of r1938 which accidently crept in
tron
parents:
1434
diff
changeset
|
830 |
$(call cmd,compile_link) |
| 0 | 831 |
|
| 474 | 832 |
table/strings.h: lang/english.txt $(STRGEN) |
| 1118 | 833 |
@echo '===> Generating $@' |
|
1413
4a93d8682e11
(svn r1917) - Makefile: Revamped VERBOSE support, build mechanics changed.
pasky
parents:
1411
diff
changeset
|
834 |
$(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
|
835 |
|
|
476
ad012336ed61
(svn r727) The langauge files depend on english.txt, not strings.h
tron
parents:
475
diff
changeset
|
836 |
lang/%.lng: lang/%.txt $(STRGEN) lang/english.txt |
| 1118 | 837 |
@echo '===> Compiling language $(*F)' |
|
1413
4a93d8682e11
(svn r1917) - Makefile: Revamped VERBOSE support, build mechanics changed.
pasky
parents:
1411
diff
changeset
|
838 |
$(Q)$(STRGEN) $(STRGEN_FLAGS) $< $(LANG_ERRORS) |
| 0 | 839 |
|
|
1891
92a3b0aa0946
(svn r2397) - CodeChange: rename all "ttd" files to "openttd" files.
Darkvater
parents:
1865
diff
changeset
|
840 |
winres.o: openttd.rc |
| 1118 | 841 |
@echo '===> Compiling resource $<' |
|
1692
2587eee1c632
(svn r2196) -Change: updated the Makefile, now it works for crossplatform compiling
TrueLight
parents:
1629
diff
changeset
|
842 |
$(Q)$(WINDRES) -o $@ $< |
| 0 | 843 |
|
|
770
89dab23f04ca
(svn r1236) MorphOS: added make release like in OSX (tokai)
bjarni
parents:
730
diff
changeset
|
844 |
ifdef MORPHOS |
|
89dab23f04ca
(svn r1236) MorphOS: added make release like in OSX (tokai)
bjarni
parents:
730
diff
changeset
|
845 |
release: all |
|
1413
4a93d8682e11
(svn r1917) - Makefile: Revamped VERBOSE support, build mechanics changed.
pasky
parents:
1411
diff
changeset
|
846 |
$(Q)rm -fr "/t/openttd-$(RELEASE)-morphos.lha" |
|
4a93d8682e11
(svn r1917) - Makefile: Revamped VERBOSE support, build mechanics changed.
pasky
parents:
1411
diff
changeset
|
847 |
$(Q)mkdir -p "/t/" |
|
4a93d8682e11
(svn r1917) - Makefile: Revamped VERBOSE support, build mechanics changed.
pasky
parents:
1411
diff
changeset
|
848 |
$(Q)mkdir -p "/t/openttd-$(RELEASE)-morphos" |
|
4a93d8682e11
(svn r1917) - Makefile: Revamped VERBOSE support, build mechanics changed.
pasky
parents:
1411
diff
changeset
|
849 |
$(Q)mkdir -p "/t/openttd-$(RELEASE)-morphos/docs" |
|
4a93d8682e11
(svn r1917) - Makefile: Revamped VERBOSE support, build mechanics changed.
pasky
parents:
1411
diff
changeset
|
850 |
$(Q)mkdir -p "/t/openttd-$(RELEASE)-morphos/data" |
|
4a93d8682e11
(svn r1917) - Makefile: Revamped VERBOSE support, build mechanics changed.
pasky
parents:
1411
diff
changeset
|
851 |
$(Q)mkdir -p "/t/openttd-$(RELEASE)-morphos/lang" |
|
4a93d8682e11
(svn r1917) - Makefile: Revamped VERBOSE support, build mechanics changed.
pasky
parents:
1411
diff
changeset
|
852 |
$(Q)mkdir -p "/t/openttd-$(RELEASE)-morphos/scenario" |
|
4a93d8682e11
(svn r1917) - Makefile: Revamped VERBOSE support, build mechanics changed.
pasky
parents:
1411
diff
changeset
|
853 |
$(Q)cp -R $(TTD) "/t/openttd-$(RELEASE)-morphos/" |
|
4a93d8682e11
(svn r1917) - Makefile: Revamped VERBOSE support, build mechanics changed.
pasky
parents:
1411
diff
changeset
|
854 |
$(Q)cp data/* "/t/openttd-$(RELEASE)-morphos/data/" |
|
4a93d8682e11
(svn r1917) - Makefile: Revamped VERBOSE support, build mechanics changed.
pasky
parents:
1411
diff
changeset
|
855 |
$(Q)cp lang/*.lng "/t/openttd-$(RELEASE)-morphos/lang/" |
|
4a93d8682e11
(svn r1917) - Makefile: Revamped VERBOSE support, build mechanics changed.
pasky
parents:
1411
diff
changeset
|
856 |
$(Q)cp scenario/* "/t/openttd-$(RELEASE)-morphos/scenario/" |
|
4a93d8682e11
(svn r1917) - Makefile: Revamped VERBOSE support, build mechanics changed.
pasky
parents:
1411
diff
changeset
|
857 |
$(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
|
858 |
$(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
|
859 |
$(Q)cp COPYING "/t/openttd-$(RELEASE)-morphos/docs/" |
|
4a93d8682e11
(svn r1917) - Makefile: Revamped VERBOSE support, build mechanics changed.
pasky
parents:
1411
diff
changeset
|
860 |
$(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
|
861 |
$(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
|
862 |
$(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
|
863 |
$(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
|
864 |
$(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
|
865 |
$(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
|
866 |
$(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
|
867 |
$(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
|
868 |
$(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
|
869 |
$(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
|
870 |
$(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
|
871 |
$(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
|
872 |
$(Q)rm -fr "/t/openttd-$(RELEASE)-morphos" |
|
4a93d8682e11
(svn r1917) - Makefile: Revamped VERBOSE support, build mechanics changed.
pasky
parents:
1411
diff
changeset
|
873 |
$(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
|
874 |
@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
|
875 |
|
| 1251 | 876 |
.PHONY: release |
|
770
89dab23f04ca
(svn r1236) MorphOS: added make release like in OSX (tokai)
bjarni
parents:
730
diff
changeset
|
877 |
endif |
|
89dab23f04ca
(svn r1236) MorphOS: added make release like in OSX (tokai)
bjarni
parents:
730
diff
changeset
|
878 |
|
|
563
f60fe5a7d56f
(svn r972) Makefile: added make release (currently only works on mac)
bjarni
parents:
561
diff
changeset
|
879 |
ifdef OSX |
|
f60fe5a7d56f
(svn r972) Makefile: added make release (currently only works on mac)
bjarni
parents:
561
diff
changeset
|
880 |
release: all |
|
1413
4a93d8682e11
(svn r1917) - Makefile: Revamped VERBOSE support, build mechanics changed.
pasky
parents:
1411
diff
changeset
|
881 |
$(Q)mkdir -p "OpenTTD $(RELEASE)" |
|
4a93d8682e11
(svn r1917) - Makefile: Revamped VERBOSE support, build mechanics changed.
pasky
parents:
1411
diff
changeset
|
882 |
$(Q)mkdir -p "OpenTTD $(RELEASE)"/docs |
|
4a93d8682e11
(svn r1917) - Makefile: Revamped VERBOSE support, build mechanics changed.
pasky
parents:
1411
diff
changeset
|
883 |
$(Q)mkdir -p "OpenTTD $(RELEASE)"/scenario |
|
4a93d8682e11
(svn r1917) - Makefile: Revamped VERBOSE support, build mechanics changed.
pasky
parents:
1411
diff
changeset
|
884 |
$(Q)cp -R $(OSXAPP) "OpenTTD $(RELEASE)"/ |
|
4a93d8682e11
(svn r1917) - Makefile: Revamped VERBOSE support, build mechanics changed.
pasky
parents:
1411
diff
changeset
|
885 |
$(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
|
886 |
$(Q)cp readme.txt "OpenTTD $(RELEASE)"/docs/ |
|
4a93d8682e11
(svn r1917) - Makefile: Revamped VERBOSE support, build mechanics changed.
pasky
parents:
1411
diff
changeset
|
887 |
$(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
|
888 |
$(Q)cp docs/console.txt "OpenTTD $(RELEASE)"/docs/ |
|
4a93d8682e11
(svn r1917) - Makefile: Revamped VERBOSE support, build mechanics changed.
pasky
parents:
1411
diff
changeset
|
889 |
$(Q)cp COPYING "OpenTTD $(RELEASE)"/docs/ |
|
4a93d8682e11
(svn r1917) - Makefile: Revamped VERBOSE support, build mechanics changed.
pasky
parents:
1411
diff
changeset
|
890 |
$(Q)cp changelog.txt "OpenTTD $(RELEASE)"/docs/ |
|
4a93d8682e11
(svn r1917) - Makefile: Revamped VERBOSE support, build mechanics changed.
pasky
parents:
1411
diff
changeset
|
891 |
$(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
|
892 |
$(Q)cp os/macosx/*.webloc "OpenTTD $(RELEASE)" |
|
1413
4a93d8682e11
(svn r1917) - Makefile: Revamped VERBOSE support, build mechanics changed.
pasky
parents:
1411
diff
changeset
|
893 |
$(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
|
894 |
$(Q)cp scenario/* "OpenTTD $(RELEASE)"/scenario/ |
|
4a93d8682e11
(svn r1917) - Makefile: Revamped VERBOSE support, build mechanics changed.
pasky
parents:
1411
diff
changeset
|
895 |
$(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
|
896 |
$(Q)rm -fr "OpenTTD $(RELEASE)" |
|
563
f60fe5a7d56f
(svn r972) Makefile: added make release (currently only works on mac)
bjarni
parents:
561
diff
changeset
|
897 |
|
|
564
39e0d73fa19d
(svn r973) Makefile: added make nightly_build (only on mac)
bjarni
parents:
563
diff
changeset
|
898 |
nightly_build: all |
|
1413
4a93d8682e11
(svn r1917) - Makefile: Revamped VERBOSE support, build mechanics changed.
pasky
parents:
1411
diff
changeset
|
899 |
$(Q)mkdir -p "OpenTTD_nightly_$(DATE)" |
|
4a93d8682e11
(svn r1917) - Makefile: Revamped VERBOSE support, build mechanics changed.
pasky
parents:
1411
diff
changeset
|
900 |
$(Q)mkdir -p "OpenTTD_nightly_$(DATE)"/docs |
|
4a93d8682e11
(svn r1917) - Makefile: Revamped VERBOSE support, build mechanics changed.
pasky
parents:
1411
diff
changeset
|
901 |
$(Q)cp -R $(OSXAPP) "OpenTTD_nightly_$(DATE)"/ |
|
4a93d8682e11
(svn r1917) - Makefile: Revamped VERBOSE support, build mechanics changed.
pasky
parents:
1411
diff
changeset
|
902 |
$(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
|
903 |
$(Q)cp readme.txt "OpenTTD_nightly_$(DATE)"/docs/ |
|
4a93d8682e11
(svn r1917) - Makefile: Revamped VERBOSE support, build mechanics changed.
pasky
parents:
1411
diff
changeset
|
904 |
$(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
|
905 |
$(Q)cp docs/console.txt "OpenTTD_nightly_$(DATE)"/docs/ |
|
4a93d8682e11
(svn r1917) - Makefile: Revamped VERBOSE support, build mechanics changed.
pasky
parents:
1411
diff
changeset
|
906 |
$(Q)cp COPYING "OpenTTD_nightly_$(DATE)"/docs/ |
|
4a93d8682e11
(svn r1917) - Makefile: Revamped VERBOSE support, build mechanics changed.
pasky
parents:
1411
diff
changeset
|
907 |
$(Q)cp revisionlog.txt "OpenTTD_nightly_$(DATE)"/revisionlog.txt |
|
4a93d8682e11
(svn r1917) - Makefile: Revamped VERBOSE support, build mechanics changed.
pasky
parents:
1411
diff
changeset
|
908 |
$(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
|
909 |
$(Q)cp os/macosx/*.webloc "OpenTTD_nightly_$(DATE)"/ |
|
1413
4a93d8682e11
(svn r1917) - Makefile: Revamped VERBOSE support, build mechanics changed.
pasky
parents:
1411
diff
changeset
|
910 |
$(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
|
911 |
$(Q)rm -fr "OpenTTD_nightly_$(DATE)" |
|
564
39e0d73fa19d
(svn r973) Makefile: added make nightly_build (only on mac)
bjarni
parents:
563
diff
changeset
|
912 |
|
|
39e0d73fa19d
(svn r973) Makefile: added make nightly_build (only on mac)
bjarni
parents:
563
diff
changeset
|
913 |
.PHONY: release nightly_build |
|
563
f60fe5a7d56f
(svn r972) Makefile: added make release (currently only works on mac)
bjarni
parents:
561
diff
changeset
|
914 |
endif |
| 0 | 915 |
|
916 |
rev.c: FORCE |
|
917 |
@# 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
|
918 |
@echo 'const char _openttd_revision[] = "$(REV)";' >>rev.c.new |
| 0 | 919 |
@echo 'const int _revision_number = $(REV_NUMBER);' >>rev.c.new |
920 |
@# some additions for MorphOS versions tag |
|
921 |
@echo '#ifdef __MORPHOS__' >>rev.c.new |
|
|
615
3a22cf31bb29
(svn r1039) Makefile: now RELEASE flag can contain () too
bjarni
parents:
610
diff
changeset
|
922 |
@echo 'const char morphos_versions_tag[] = "\\0$$VER: OpenTTD $(REV) ('${BUILDDATE}') © OpenTTD Team [MorphOS, PowerPC]";' >>rev.c.new
|
| 0 | 923 |
@echo '#endif' >>rev.c.new |
924 |
@# Only update the real rev.c if it actually changed, to prevent |
|
925 |
@# useless rebuilds. |
|
926 |
@cmp -s rev.c rev.c.new 2>/dev/null || mv rev.c.new rev.c |
|
927 |
@rm -f rev.c.new |
|
928 |
||
929 |
FORCE: |
|
930 |
||
931 |
||
932 |
clean: |
|
| 1118 | 933 |
@echo '===> Cleaning up' |
|
1721
64d59b181596
(svn r2225) -Fix: split the endian-detection to target/host. Now cross-compiling
truelight
parents:
1720
diff
changeset
|
934 |
# 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
|
935 |
$(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 | 936 |
|
937 |
mrproper: clean |
|
|
1413
4a93d8682e11
(svn r1917) - Makefile: Revamped VERBOSE support, build mechanics changed.
pasky
parents:
1411
diff
changeset
|
938 |
$(Q)rm -rf $(MAKE_CONFIG) |
| 0 | 939 |
|
940 |
ifndef OSX |
|
941 |
ifndef MORPHOS |
|
942 |
install: |
|
| 285 | 943 |
ifeq ($(INSTALL),) |
944 |
$(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
|
945 |
tested very much - use at your own risk - to use run \"make install INSTALL:=1\" - make sure Makefile.config\ |
| 0 | 946 |
is set correctly up - run \"make upgradeconf\") |
| 285 | 947 |
endif |
948 |
||
|
543
e3b43338096b
(svn r942) -Merged branch/network back into the trunk
truelight
parents:
532
diff
changeset
|
949 |
ifeq ($(PREFIX), ) |
|
1492
e03a8c6f7efd
(svn r1996) makefile.config -> Makefile.config, that's its name.
pasky
parents:
1491
diff
changeset
|
950 |
$(error no prefix set - check Makefile.config) |
| 285 | 951 |
endif |
952 |
# We compare against the non prefixed version here, so we won't install |
|
953 |
# if only the prefix has been set |
|
954 |
ifeq ($(DATA_DIR),) |
|
|
1492
e03a8c6f7efd
(svn r1996) makefile.config -> Makefile.config, that's its name.
pasky
parents:
1491
diff
changeset
|
955 |
$(error no data path set - check Makefile.config) |
| 285 | 956 |
endif |
957 |
ifeq ($(BINARY_DIR),) |
|
|
1492
e03a8c6f7efd
(svn r1996) makefile.config -> Makefile.config, that's its name.
pasky
parents:
1491
diff
changeset
|
958 |
$(error no binary path set - check Makefile.config) |
| 285 | 959 |
endif |
960 |
# We'll install in $DEST_DIR instead of root if it is set (we don't |
|
961 |
# 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
|
962 |
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
|
963 |
$(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
|
964 |
$(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
|
965 |
$(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
|
966 |
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
|
967 |
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
|
968 |
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
|
969 |
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
|
970 |
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
|
971 |
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
|
972 |
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
|
973 |
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
|
974 |
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
|
975 |
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
|
976 |
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
|
977 |
ifndef USE_HOMEDIR |
|
1160
467d3ff0ad97
(svn r1661) Makefile: added scenario to make install
bjarni
parents:
1158
diff
changeset
|
978 |
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
|
979 |
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
|
980 |
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
|
981 |
endif |
| 0 | 982 |
else #MorphOS |
983 |
install: |
|
984 |
$(error make install is not supported on MorphOS) |
|
985 |
endif |
|
986 |
else # OSX |
|
987 |
install: |
|
988 |
$(error make install is not supported on MacOSX) |
|
989 |
endif |
|
990 |
||
991 |
||
992 |
love: |
|
993 |
@echo "YES! I thought you would never ask. We will have a great time. You can keep me turned on all night" |
|
994 |
||
|
730
939c4654fdea
(svn r1182) -Fix: Makefile had a small glitch, making it impossible to compile the game (Oskar_)
truelight
parents:
728
diff
changeset
|
995 |
.PHONY: clean all $(OSX) install $(64_bit_warnings) $(endwarnings) love |
| 0 | 996 |
|
997 |
||
998 |
### Automatic configuration |
|
999 |
-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
|
1000 |
|
| 0 | 1001 |
|
1002 |
# Export all variables set to subprocesses (a bit dirty) |
|
1003 |
.EXPORT_ALL_VARIABLES: |
|
1004 |
upgradeconf: $(MAKE_CONFIG) |
|
|
1413
4a93d8682e11
(svn r1917) - Makefile: Revamped VERBOSE support, build mechanics changed.
pasky
parents:
1411
diff
changeset
|
1005 |
$(Q)rm $(MAKE_CONFIG) |
|
4a93d8682e11
(svn r1917) - Makefile: Revamped VERBOSE support, build mechanics changed.
pasky
parents:
1411
diff
changeset
|
1006 |
$(Q)$(MAKE) $(MAKE_CONFIG) |
| 0 | 1007 |
|
1008 |
.PHONY: upgradeconf |
|
1009 |
||
1010 |
||
1011 |
### Internal build rules |
|
1012 |
||
1013 |
# This makes sure the .deps dir is always around. |
|
1014 |
DEPS_MAGIC := $(shell mkdir .deps > /dev/null 2>&1 || :) |
|
1015 |
||
1016 |
# Introduce the dependencies |
|
|
1167
d8b7601118cf
(svn r1669) Rename all ttd_XXX to just XXX, because we already know who we are (;
tron
parents:
1164
diff
changeset
|
1017 |
-include $(DEPS) |
| 0 | 1018 |
|
1019 |
# This compiles the object file as well as silently updating its dependencies |
|
1020 |
# list at the same time. It is not an issue that they aren't around during the |
|
1021 |
# first compilation round as we just build everything at that time anyway, |
|
1022 |
# therefore we do not need to watch deps. |
|
|
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
|
1023 |
|
|
1721
64d59b181596
(svn r2225) -Fix: split the endian-detection to target/host. Now cross-compiling
truelight
parents:
1720
diff
changeset
|
1024 |
%.o: %.c $(MAKE_CONFIG) endian_target.h table/strings.h |
|
1435
89d0c6a56a9b
(svn r1939) Revert part of r1938 which accidently crept in
tron
parents:
1434
diff
changeset
|
1025 |
$(call cmd,c_compile) |
|
1170
1cd3103acd66
(svn r1672) Simplify dependency tracking and actually implement it for C++ files, too.
tron
parents:
1169
diff
changeset
|
1026 |
@mv $(<:%.c=%.d) $(<:%.c=.deps/%.d) |
| 0 | 1027 |
|
|
1721
64d59b181596
(svn r2225) -Fix: split the endian-detection to target/host. Now cross-compiling
truelight
parents:
1720
diff
changeset
|
1028 |
%.o: %.cpp $(MAKE_CONFIG) endian_target.h table/strings.h |
|
1435
89d0c6a56a9b
(svn r1939) Revert part of r1938 which accidently crept in
tron
parents:
1434
diff
changeset
|
1029 |
$(call cmd,cxx_compile) |
| 1629 | 1030 |
@mv $(<:%.cpp=%.d) $(<:%.cpp=.deps/%.d) |
|
1170
1cd3103acd66
(svn r1672) Simplify dependency tracking and actually implement it for C++ files, too.
tron
parents:
1169
diff
changeset
|
1031 |
|
|
1cd3103acd66
(svn r1672) Simplify dependency tracking and actually implement it for C++ files, too.
tron
parents:
1169
diff
changeset
|
1032 |
# Silence stale header dependencies |
|
1cd3103acd66
(svn r1672) Simplify dependency tracking and actually implement it for C++ files, too.
tron
parents:
1169
diff
changeset
|
1033 |
%.h: |
|
1cd3103acd66
(svn r1672) Simplify dependency tracking and actually implement it for C++ files, too.
tron
parents:
1169
diff
changeset
|
1034 |
@true |
|
1163
044430212516
(svn r1665) Remove VERBOSE flag, because it was only partially implemented
tron
parents:
1162
diff
changeset
|
1035 |
|
|
044430212516
(svn r1665) Remove VERBOSE flag, because it was only partially implemented
tron
parents:
1162
diff
changeset
|
1036 |
|
|
044430212516
(svn r1665) Remove VERBOSE flag, because it was only partially implemented
tron
parents:
1162
diff
changeset
|
1037 |
info: |
|
1435
89d0c6a56a9b
(svn r1939) Revert part of r1938 which accidently crept in
tron
parents:
1434
diff
changeset
|
1038 |
@echo 'CFLAGS = $(CFLAGS)' |
|
1163
044430212516
(svn r1665) Remove VERBOSE flag, because it was only partially implemented
tron
parents:
1162
diff
changeset
|
1039 |
@echo 'LDFLAGS = $(LDFLAGS)' |
|
044430212516
(svn r1665) Remove VERBOSE flag, because it was only partially implemented
tron
parents:
1162
diff
changeset
|
1040 |
@echo 'LIBS = $(LIBS)' |