-
Notifications
You must be signed in to change notification settings - Fork 14
/
Copy pathproject.b
225 lines (214 loc) · 3.99 KB
/
project.b
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
options [
os_api: 'glfw "Platform API ('allegro 'glfw 'glv 'sdl)"
use_faun: true
sdk_dir: none "Path to Boron/Faun headers and libraries (UNIX only)"
gpu_render: false
make_util: true
]
libxml2: does [
unix [
include_from %/usr/include/libxml2
libs %xml2
]
win32 [
either msvc [
cflags "/DLIBXML_STATIC"
libs_from %../usr/lib [%libxml2_a]
][
libs %xml2
]
]
]
exe %xu4 [
include_from [%src %src/lzw %src/support]
unix [
if sdk_dir [
include_from join sdk_dir %/include
lflags rejoin ["-L" sdk_dir %/lib]
]
]
win32 [
include_from %../usr/include
include-define "_WIN32" ; Needed to archive glad.*
]
switch os_api [
allegro [
unix [
libs pick [
[%allegro %faun %pulse-simple %pulse %vorbisfile]
[%allegro_acodec %allegro_audio %allegro]
] use_faun
]
win32 [
libs_from %../usr/lib pick [
[%allegro %faun %vorbisfile %ole32]
[%allegro_acodec %allegro_audio %allegro]
] use_faun
]
sources_from %src reduce [
%event_allegro.cpp
%screen_allegro.cpp
either use_faun
%sound_faun.cpp
%sound_allegro.cpp
]
]
glfw [
win32 [libs [%glfw3 %faun %vorbisfile %ole32]]
unix [libs [%glfw %faun]]
sources_from %src [
%screen_glfw.cpp
%sound_faun.cpp
]
]
glv [
win32 [
include_from %src/glv/win32
libs [%faun %vorbisfile %ole32]
sources/flags [%src/glv/win32/glv.c] "-DUSE_CURSORS"
]
unix [
include_from %src/glv/x11
libs [%faun %Xcursor %X11]
sources/flags [%src/glv/x11/glv.c] "-DUSE_CURSORS"
]
sources_from %src [
%screen_glv.cpp
%sound_faun.cpp
]
]
sdl [
include_from %/usr/include/SDL
libs [%SDL %faun]
sources_from %src [
%event_sdl.cpp
%screen_sdl.cpp
%sound_faun.cpp
]
]
]
;if use_boron [
cflags "-DUSE_BORON -DCONF_MODULE"
unix [
libs %boron
if sdk_dir [
; Needed for static libboron & libfaun.
libs [%pthread %pulse-simple %pulse %vorbisfile]
]
]
win32 [
libs_from %../usr/lib either msvc %libboron %boron
libs %ws2_32
]
sources_from %src [
%config_boron.cpp
%module.c
%support/cdi.c
]
;]
if gpu_render [cflags "-DGPU_RENDER"]
cflags "-DUSE_GL"
opengl
unix [
cflags "-Wno-unused-parameter"
libs [%png %z]
]
win32 [
either msvc [
libs_from %../usr/lib [%libpng16 %zlib]
libs [%User32]
][
cflags "-Wno-unused-parameter"
;lflags "-static-libgcc" ; Causes problems with Allegro libs.
lflags "-static-libstdc++"
libs [%png %z]
]
include_from %src/win32
sources/flags [%src/win32/xu4.rc] "-I src/win32"
]
cflags {-DVERSION=\"DR-1.0\"}
sources_from %src [
%annotation.cpp
%aura.cpp
%camp.cpp
%cheat.cpp
%city.cpp
%codex.cpp
%combat.cpp
%controller.cpp
%context.cpp
%creature.cpp
%death.cpp
%debug.cpp
%direction.cpp
%discourse.cpp
%dungeon.cpp
%dungeonview.cpp
%error.cpp
%event.cpp
%filesystem.cpp
%game.cpp
%gamebrowser.cpp
%gui.cpp
%image.cpp
%imageloader.cpp
%imagemgr.cpp
%imageview.cpp
%intro.cpp
%item.cpp
%location.cpp
%map.cpp
%maploader.cpp
%menu.cpp
%menuitem.cpp
%names.cpp
%object.cpp
%party.cpp
%person.cpp
%portal.cpp
%progress_bar.cpp
%rle.cpp
%savegame.cpp
%scale.cpp
%screen.cpp
%settings.cpp
%shrine.cpp
%spell.cpp
%stats.cpp
%textview.cpp
%tileanim.cpp
%tile.cpp
%tileset.cpp
%tileview.cpp
%u4file.cpp
%view.cpp
%xu4.cpp
%lzw/hash.c
%lzw/lzw.c
%lzw/u6decode.cpp
%lzw/u4decode.cpp
%support/notify.c
%support/stringTable.c
%support/txf_draw.c
%support/unzip.c
]
]
if make_util [
exe %coord [console sources [%src/util/coord.c]]
exe %tlkconv [console libxml2 sources [%src/util/tlkconv.c]]
exe %dumpmap [console sources [%src/util/dumpmap.c]]
exe %dumpsavegame [
console
include_from %src
sources [
%src/util/dumpsavegame.cpp
]
]
]
; cbuild makes the archive for mingw & glfw so add the Linux files as well.
dist [
%src/screen_glv.cpp
%src/glv/x11/glv.c
%src/glv/x11/glv.h
%src/glv/x11/glv_keys.h
]