author | miham |
Wed, 17 Nov 2004 01:09:15 +0000 | |
changeset 440 | f5ba75a364cf |
parent 413 | 36f14a6d63d7 |
child 452 | 14dfdf98b719 |
permissions | -rw-r--r-- |
0 | 1 |
CFILES = ai.c aircraft_cmd.c aircraft_gui.c airport_gui.c |
2 |
bridge_gui.c clear_cmd.c command.c disaster_cmd.c |
|
3 |
dock_gui.c dummy_land.c economy.c engine.c engine_gui.c |
|
4 |
fileio.c gfx.c graph_gui.c industry_cmd.c industry_gui.c |
|
5 |
intro_gui.c landscape.c main_gui.c minilzo.c misc.c |
|
6 |
misc_cmd.c misc_gui.c music_gui.c namegen.c network.c |
|
7 |
news_gui.c oldloader.c order_cmd.c order_gui.c pathfind.c |
|
8 |
player_gui.c players.c rail_cmd.c rail_gui.c road_cmd.c |
|
9 |
road_gui.c roadveh_cmd.c roadveh_gui.c saveload.c sdl.c |
|
10 |
settings.c settings_gui.c ship_cmd.c ship_gui.c smallmap_gui.c |
|
11 |
sound.c spritecache.c station_cmd.c station_gui.c |
|
12 |
strings.c subsidy_gui.c texteff.c town_cmd.c town_gui.c |
|
13 |
train_cmd.c train_gui.c tree_cmd.c ttd.c |
|
14 |
tunnelbridge_cmd.c unmovable_cmd.c vehicle.c |
|
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:
0
diff
changeset
|
15 |
viewport.c water_cmd.c widget.c window.c screenshot.c |
413
36f14a6d63d7
(svn r610) -newgrf: Support for some basic deterministical spritegroups regarding stations. Waypoints look changes based on year now :^) (pasky).
darkvater
parents:
233
diff
changeset
|
16 |
airport.c grfspecial.c terraform_gui.c sprite.c ; |
0 | 17 |
|
18 |
||
233
dd177a8c9f19
(svn r234) -Fix: added missing romanian.txt to VC6, VS.NET and Jamfile project file
darkvater
parents:
222
diff
changeset
|
19 |
LANGFILES = english.txt swedish.txt french.txt german.txt italian.txt slovak.txt hungarian.txt norwegian.txt danish.txt czech.txt galician.txt polish.txt romanian.txt; |
0 | 20 |
|
21 |
#################### |
|
22 |
# On UNIX we use gcc |
|
23 |
#################### |
|
24 |
if $(UNIX) { |
|
25 |
SDL_CONFIG_CFLAGS = `XX_SDL_CONFIG_PLACEHOLDER_XX --cflags` ; |
|
26 |
SDL_CONFIG_LIBS = `XX_SDL_CONFIG_PLACEHOLDER_XX --libs` ; |
|
27 |
||
28 |
LINKFLAGS += $(SDL_CONFIG_LIBS) ; |
|
29 |
CC = gcc ; |
|
30 |
CCFLAGS += -Wall -Wno-multichar -DUNIX -DWITH_SDL ; |
|
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:
0
diff
changeset
|
31 |
|
0 | 32 |
OPTIMFLAGS = -O2 -fomit-frame-pointer ; |
33 |
DEBUGFLAGS = -g ; |
|
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:
0
diff
changeset
|
34 |
|
0 | 35 |
# also include extmidi |
36 |
CFILES += extmidi.c unix.c ; |
|
37 |
||
38 |
# compile in PNG support? |
|
39 |
if $(WITH_PNG) { |
|
40 |
CCFLAGS += -DWITH_PNG -I$(WITH_PNG) ; |
|
41 |
LINKFLAGS += -lpng ; |
|
42 |
} |
|
43 |
||
44 |
# compile in zlib support? |
|
45 |
if $(WITH_ZLIB) { |
|
46 |
CCFLAGS += -DWITH_ZLIB ; |
|
47 |
LINKFLAGS += -lz ; |
|
48 |
} |
|
49 |
# compile for BeOS 5.1 and higher |
|
50 |
if $(WITH_BONE_NETWORKING) { |
|
51 |
CCFLAGS += -DENABLE_NETWORK ; |
|
52 |
LINKFLAGS += -lsocket -lbind ; |
|
53 |
} |
|
54 |
# link in BeOS MIDI and Be API libraries |
|
55 |
if $(BEOS_MIDI) { |
|
56 |
CCFLAGS += -DBEOS_MIDI ; |
|
57 |
LINKFLAGS += -lbe -lmidi ; |
|
58 |
CFILES += bemidi.cpp ; |
|
59 |
} |
|
60 |
} |
|
61 |
||
62 |
#################### |
|
63 |
# MSVC on Win32 |
|
64 |
#################### |
|
65 |
||
66 |
actions ActWin32Res { |
|
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:
0
diff
changeset
|
67 |
$(VISUALC)\\..\\common\\msdev98\\bin\\rc /r /i $(STDHDRS) /fo $(<) $(>) |
0 | 68 |
} |
69 |
||
70 |
rule Win32Res { ActWin32Res $(<) : $(>) ; DEPENDS $(<) : $(>) ; } |
|
71 |
||
72 |
if $(TOOLSET) = VISUALC { |
|
73 |
OPTIMFLAGS = /Oa /Os /Ow /Oy /Oi /Og /Ox /Gr /Gf /Gy /Zp4 /J /WX /W3 -DNDEBUG ; |
|
74 |
||
75 |
CCFLAGS += -DWIN32 -DWIN32_EXCEPTION_TRACKER ; |
|
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:
0
diff
changeset
|
76 |
CFILES += win32.c ; |
0 | 77 |
LINKFLAGS += /opt:nowin98 /LIBPATH:$(VISUALC)\\lib ; |
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:
0
diff
changeset
|
78 |
|
0 | 79 |
LINKLIBS = ws2_32.lib winmm.lib user32.lib gdi32.lib ; |
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:
0
diff
changeset
|
80 |
|
0 | 81 |
# compile resources too |
82 |
EOBJ = ttd.res ; |
|
83 |
Win32Res ttd.res : ttd.rc ; |
|
84 |
||
85 |
# png screenshots? |
|
86 |
if $(WITH_PNG) { |
|
87 |
CCFLAGS += -DWITH_PNG -I$(WITH_PNG) ; |
|
88 |
LINKLIBS += libpng.lib ; |
|
89 |
} |
|
90 |
||
91 |
# zlib savegames? |
|
92 |
if $(WITH_ZLIB) { |
|
93 |
CCFLAGS += -DWITH_ZLIB ; |
|
94 |
LINKLIBS += zlibstat.lib ; |
|
95 |
} |
|
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:
0
diff
changeset
|
96 |
|
0 | 97 |
# build release by default |
98 |
RELEASE = 1 ; |
|
99 |
} |
|
100 |
||
101 |
||
102 |
#################### |
|
103 |
# Common |
|
104 |
#################### |
|
105 |
rule MyObjects { |
|
106 |
local _i _t _s ; |
|
107 |
||
108 |
_t = $(OUTDIR)/$(>:S=$(SUFOBJ)) ; |
|
109 |
OPTIM on $(_t) = $(3) ; |
|
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:
0
diff
changeset
|
110 |
|
0 | 111 |
MkDir $(OUTDIR) ; |
112 |
Depends $(_t) : $(OUTDIR) ; |
|
113 |
||
114 |
for _i in $(>) { |
|
115 |
_s = $(OUTDIR)/$(_i:S=$(SUFOBJ)) ; |
|
116 |
Object $(_s) : $(_i) ; |
|
117 |
||
118 |
# special handling for sdl.c and unix.c |
|
119 |
if $(_i) = sdl.c || $(_i) = unix.c { CCFLAGS on $(_s) += $(SDL_CONFIG_CFLAGS) ; } |
|
120 |
} |
|
121 |
MainFromObjects $(OUTDIR)/$(<) : $(_t) $(EOBJ) ; |
|
122 |
} |
|
123 |
||
124 |
rule MyMain { |
|
125 |
if $(RELEASE) { |
|
126 |
OUTDIR = release ; |
|
127 |
MyObjects ttd : $(>) : $(OPTIMFLAGS) ; |
|
128 |
} else { |
|
129 |
OUTDIR = debug ; |
|
130 |
MyObjects ttd : $(>) : -D_DEBUG $(DEBUGFLAGS) ; |
|
131 |
} |
|
132 |
} |
|
133 |
||
134 |
actions CompileLang { |
|
135 |
strgen$(SLASH)strgen $(>) |
|
136 |
} |
|
137 |
||
138 |
rule LangFile { |
|
139 |
if $(>) = lang/english.txt { |
|
140 |
CompileLang $(<) table/strings.h : ; |
|
141 |
DEPENDS table/string.h : $(>) ; |
|
142 |
} else { |
|
143 |
CompileLang $(<) : $(>) ; |
|
144 |
} |
|
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:
0
diff
changeset
|
145 |
|
0 | 146 |
Clean clean : $(<) ; |
147 |
DEPENDS $(<) : $(>) ; |
|
148 |
DEPENDS all : $(<) ; |
|
149 |
DEPENDS $(<) : strgen/strgen ; |
|
150 |
} |
|
151 |
||
152 |
rule LangFiles { |
|
153 |
local _i ; |
|
154 |
for _i in $(<) { LangFile $(_i:S=.lng) : $(_i) ; } |
|
155 |
Clean clean : table/strings.h ; |
|
156 |
} |
|
157 |
||
158 |
LangFiles lang/$(LANGFILES) ; |
|
159 |
||
160 |
Main strgen/strgen : strgen/strgen.c ; |
|
161 |
||
162 |
MyMain ttd : $(CFILES) ; |
|
163 |