diff options
Diffstat (limited to 'linden/indra/SConstruct')
-rw-r--r-- | linden/indra/SConstruct | 218 |
1 files changed, 157 insertions, 61 deletions
diff --git a/linden/indra/SConstruct b/linden/indra/SConstruct index 39b50bc..68c8fc7 100644 --- a/linden/indra/SConstruct +++ b/linden/indra/SConstruct | |||
@@ -1,12 +1,21 @@ | |||
1 | ################################################# -*- python -*- | 1 | ################################################# -*- python -*- |
2 | # | 2 | # |
3 | # SConstruct makefile for Second Life viewer | 3 | # SConstruct makefile for Second Life viewer and servers. |
4 | # and servers. | ||
5 | # | 4 | # |
6 | # To build everything: | 5 | # To build everything: |
7 | # | 6 | # |
8 | # scons ARCH=all BTARGET=all DISTCC=yes | 7 | # scons ARCH=all BTARGET=all DISTCC=yes |
9 | # | 8 | # |
9 | # To build a standalone viewer, you'll need the following packages | ||
10 | # installed, with headers. We pick up the correct flags to use for | ||
11 | # these libraries using the "pkg-config" command. | ||
12 | # | ||
13 | # cairo glib-2.0 gtk+-2.0 sdl vorbis vorbisenc vorbisfile | ||
14 | # | ||
15 | # Then build as follows: | ||
16 | # | ||
17 | # scons BTARGET=client STANDALONE=yes MOZLIB=no ELFIO=no DISTCC=no | ||
18 | # | ||
10 | # For help on options: | 19 | # For help on options: |
11 | # | 20 | # |
12 | # scons -h | 21 | # scons -h |
@@ -73,6 +82,8 @@ try: | |||
73 | except: | 82 | except: |
74 | debian_sarge = False | 83 | debian_sarge = False |
75 | 84 | ||
85 | fedora = os.path.exists('/etc/fedora-release') | ||
86 | |||
76 | ######################### | 87 | ######################### |
77 | # COMMAND LINE OPTIONS # | 88 | # COMMAND LINE OPTIONS # |
78 | ######################### | 89 | ######################### |
@@ -91,6 +102,8 @@ opts.AddOptions( | |||
91 | BoolOption('COLORGCC', 'Enabled colorgcc', True), | 102 | BoolOption('COLORGCC', 'Enabled colorgcc', True), |
92 | EnumOption('GRID', 'Client package\'s default grid', 'default', | 103 | EnumOption('GRID', 'Client package\'s default grid', 'default', |
93 | allowed_values=('default', 'aditi', 'agni', 'dmz', 'durga', 'firstlook', 'ganga', 'shakti', 'siva', 'soma', 'uma', 'vaak')), | 104 | allowed_values=('default', 'aditi', 'agni', 'dmz', 'durga', 'firstlook', 'ganga', 'shakti', 'siva', 'soma', 'uma', 'vaak')), |
105 | BoolOption('ELFIO', 'Enabled enhanced backtraces with libELFIO symbol extraction support', True), | ||
106 | BoolOption('STANDALONE', 'Build using system packages (implies OPENSOURCE)', False), | ||
94 | BoolOption('OPENSOURCE', 'Build using only non-proprietary dependencies', True) # OPENSOURCE: do not edit this line | 107 | BoolOption('OPENSOURCE', 'Build using only non-proprietary dependencies', True) # OPENSOURCE: do not edit this line |
95 | ) | 108 | ) |
96 | optenv = Environment(options = opts) | 109 | optenv = Environment(options = opts) |
@@ -101,16 +114,39 @@ arch = optenv['ARCH'] | |||
101 | target_param = optenv['BTARGET'] | 114 | target_param = optenv['BTARGET'] |
102 | enable_distcc = optenv['DISTCC'] | 115 | enable_distcc = optenv['DISTCC'] |
103 | enable_mozlib = optenv['MOZLIB'] | 116 | enable_mozlib = optenv['MOZLIB'] |
104 | enable_fmod = optenv['FMOD'] | ||
105 | enable_colorgcc = optenv['COLORGCC'] | 117 | enable_colorgcc = optenv['COLORGCC'] |
106 | grid = optenv['GRID'] | 118 | grid = optenv['GRID'] |
107 | opensource = optenv['OPENSOURCE'] | 119 | standalone = optenv['STANDALONE'] |
120 | opensource = standalone or optenv['OPENSOURCE'] | ||
121 | enable_fmod = not opensource and optenv['FMOD'] | ||
122 | elfio = optenv['ELFIO'] | ||
108 | 123 | ||
109 | targets = [ target_param ] | 124 | targets = [ target_param ] |
110 | 125 | ||
111 | if target_param == 'all': | 126 | if target_param == 'all': |
112 | targets = [ 'client', 'server' ] | 127 | targets = [ 'client', 'server' ] |
113 | 128 | ||
129 | # Set this to False if you don't want your source files copied into | ||
130 | # the object directory in /tmp. | ||
131 | duplicate = True | ||
132 | |||
133 | if standalone and platform != 'linux': | ||
134 | print >> sys.stderr, 'Warning: standalone builds have only been tested on Linux' | ||
135 | |||
136 | standalone_pkgs = 'cairo glib-2.0 gtk+-2.0 sdl vorbis vorbisenc vorbisfile' | ||
137 | |||
138 | def pkgconfig(opt, pkgs=None): | ||
139 | return os.popen('pkg-config %s %s' % | ||
140 | (opt, pkgs or standalone_pkgs)).read().strip() | ||
141 | |||
142 | if standalone: | ||
143 | missing = [pkg for pkg in standalone_pkgs.split() | ||
144 | if os.system('pkg-config --exists ' + pkg)] | ||
145 | if missing: | ||
146 | print >> sys.stderr, ('Error: pkg-config cannot find these ' | ||
147 | 'packages: %s' % ' '.join(missing)) | ||
148 | sys.exit(2) | ||
149 | |||
114 | ##################### | 150 | ##################### |
115 | # ITERATE TARGETS # | 151 | # ITERATE TARGETS # |
116 | ##################### | 152 | ##################### |
@@ -125,6 +161,7 @@ for build_target in targets: | |||
125 | print 'Building ' + build_target + ' ' + version + ' on ' + system_str + ' (' + buildtype + ')' | 161 | print 'Building ' + build_target + ' ' + version + ' on ' + system_str + ' (' + buildtype + ')' |
126 | 162 | ||
127 | system_lib_dir = '../libraries/' + system_str | 163 | system_lib_dir = '../libraries/' + system_str |
164 | |||
128 | if build_target == 'client': | 165 | if build_target == 'client': |
129 | system_lib_dir += '/lib_release_client' | 166 | system_lib_dir += '/lib_release_client' |
130 | elif buildtype == 'debug': | 167 | elif buildtype == 'debug': |
@@ -153,7 +190,7 @@ for build_target in targets: | |||
153 | """ + | 190 | """ + |
154 | '../libraries/' + system_str + '/include' ) | 191 | '../libraries/' + system_str + '/include' ) |
155 | 192 | ||
156 | client_external_libs = [] | 193 | client_external_libs = ['resolv'] |
157 | system_link_flags = '' | 194 | system_link_flags = '' |
158 | 195 | ||
159 | if platform != 'linux' and build_target == 'client' and enable_mozlib: | 196 | if platform != 'linux' and build_target == 'client' and enable_mozlib: |
@@ -184,74 +221,94 @@ for build_target in targets: | |||
184 | ############## | 221 | ############## |
185 | 222 | ||
186 | # Generic GCC flags | 223 | # Generic GCC flags |
187 | flags = '-g -pipe -Wall -Wno-trigraphs ' | 224 | cflags = '-g -pipe -Wall -Wno-trigraphs -Wno-sign-compare -Werror ' |
188 | 225 | cxxflags = '' | |
189 | if opensource: | 226 | cppflags = '' |
190 | flags += '-DLL_USE_KDU=0 ' | ||
191 | else: | ||
192 | flags += '-DLL_USE_KDU=1 ' | ||
193 | 227 | ||
194 | if build_target == 'server': | 228 | if build_target == 'server': |
195 | # Server flags | 229 | # Server flags |
196 | flags += '-D_GNU_SOURCE -ftemplate-depth-60 -DLL_MESA_HEADLESS=1 -DLL_MESA=1 ' | 230 | cppflags += '-D_GNU_SOURCE -DLL_MESA_HEADLESS=1 -DLL_MESA=1 ' |
231 | cxxflags += '-ftemplate-depth-60 ' | ||
197 | if arch == 'i686': | 232 | if arch == 'i686': |
198 | flags += '-march=pentiumpro ' | 233 | cflags += '-march=pentiumpro ' |
199 | if debian_sarge: | 234 | if debian_sarge: |
200 | def_server_cppflags = '' | 235 | def_server_cppflags = '' |
201 | else: | 236 | else: |
202 | def_server_cppflags = '-DCTYPE_WORKAROUND' | 237 | def_server_cppflags = '-DCTYPE_WORKAROUND' |
203 | server_cppflags = os.environ.get('SERVER_CPPFLAGS', | 238 | server_cppflags = os.environ.get('SERVER_CPPFLAGS', |
204 | def_server_cppflags) | 239 | def_server_cppflags) |
205 | flags += server_cppflags + ' ' | 240 | cppflags += server_cppflags + ' ' |
206 | else: | 241 | else: |
207 | # Viewer flags | 242 | # Viewer flags |
208 | flags += '-falign-loops=16 -fno-math-errno -fexceptions -fsigned-char -fno-strict-aliasing -ffast-math ' | 243 | cflags += '-falign-loops=16 -fno-math-errno -fexceptions -fsigned-char -fno-strict-aliasing -ffast-math ' |
209 | flags += '-DLL_MESA_HEADLESS=0 -DLL_MESA=0 ' | 244 | cppflags += '-DLL_MESA_HEADLESS=0 -DLL_MESA=0 ' |
210 | try: | 245 | try: |
211 | client_cppflags = os.environ['CLIENT_CPPFLAGS'] | 246 | client_cppflags = os.environ['CLIENT_CPPFLAGS'] |
212 | except: | 247 | except: |
213 | client_cppflags = '' | 248 | client_cppflags = '' |
214 | flags += client_cppflags + ' ' | 249 | cppflags += client_cppflags + ' ' |
215 | 250 | ||
216 | if platform == 'linux': | 251 | if platform == 'linux': |
217 | # Linux-only flags | 252 | # Linux-only flags |
218 | flags += '-DLL_LINUX=1 ' | 253 | cppflags += '-DLL_LINUX=1 ' |
219 | if build_target == 'client': | 254 | if build_target == 'client': |
220 | flags += '-DAPPID=secondlife -DLL_SDL=1 ' | 255 | cppflags += '-DAPPID=secondlife -DLL_SDL=1 ' |
221 | if arch == 'x86_64' or arch == 'x86_64cross' or not enable_fmod: | 256 | if arch == 'x86_64' or arch == 'x86_64cross' or not enable_fmod: |
222 | flags += '-DLL_FMOD=0 ' | 257 | cppflags += '-DLL_FMOD=0 ' |
223 | flags += '-DLL_X11=1 -DLL_GTK=1 ' | 258 | cppflags += '-DLL_X11=1 -DLL_GTK=1 ' |
224 | client_external_libs += [ 'gtk-x11-2.0', 'elfio' ] | 259 | if standalone: |
225 | include_dirs += [ '../libraries/' + system_str + '/include/gtk-2.0' ] | 260 | include_dirs += [d[2:] for d in |
226 | include_dirs += [ '../libraries/' + system_str + '/include/glib-2.0'] | 261 | pkgconfig('--cflags-only-I').split()] |
227 | include_dirs += [ '../libraries/' + system_str + '/include/pango-1.0' ] | 262 | else: |
228 | include_dirs += [ '../libraries/' + system_str + '/include/atk-1.0' ] | 263 | client_external_libs += [ 'gtk-x11-2.0' ] |
229 | include_dirs += [ '../libraries/' + system_str + '/include/ELFIO' ] | 264 | incdirs = [ 'ELFIO', 'atk-1.0', 'glib-2.0', 'gtk-2.0', |
230 | include_dirs += [ '../libraries/' + system_str + '/include/llfreetype2' ] | 265 | 'llfreetype2', 'pango-1.0' ] |
266 | include_dirs += ['../libraries/' + system_str + '/include/' + d | ||
267 | for d in incdirs] | ||
268 | |||
269 | if elfio: | ||
270 | client_external_libs += [ 'elfio' ] | ||
271 | else: | ||
272 | cppflags += '-DLL_ELFBIN=0 ' | ||
231 | 273 | ||
232 | # llmozlib stuff | 274 | # llmozlib stuff |
233 | if enable_mozlib: | 275 | if enable_mozlib: |
234 | flags += '-DLL_LIBXUL_ENABLED=1 ' | 276 | cppflags += '-DLL_LIBXUL_ENABLED=1 ' |
235 | client_external_libs += [ 'llmozlib' ] | 277 | client_external_libs += [ 'llmozlib' ] |
236 | client_external_libs += [ 'mozjs', 'nspr4', 'plc4', 'plds4', 'profdirserviceprovider_s', 'xpcom', 'xul' ] | 278 | client_external_libs += [ 'mozjs', 'nspr4', 'plc4', 'plds4', 'profdirserviceprovider_s', 'xpcom', 'xul' ] |
237 | else: | 279 | else: |
238 | flags += '-DLL_LIBXUL_ENABLED=0 ' | 280 | cppflags += '-DLL_LIBXUL_ENABLED=0 ' |
239 | else: | 281 | else: |
240 | # Mac-only flags | 282 | # Mac-only flags |
241 | flags += '-x c++ -arch ppc -pipe -Wno-trigraphs -fpascal-strings -faltivec -fasm-blocks -g -fmessage-length=0 -mtune=G4 -Wno-deprecated-declarations -Wno-invalid-offsetof -mmacosx-version-min=10.3 -DLL_DARWIN=1 -Wmost -Wno-sign-compare -Wno-switch -fpch-preprocess -F./newview/build/Deployment -fconstant-cfstrings -ffor-scope -Wno-reorder -isysroot /Developer/SDKs/MacOSX10.3.9.sdk ' | 283 | cflags += '-x c++ -arch ppc -pipe -Wno-trigraphs -fpascal-strings -faltivec -fasm-blocks -g -fmessage-length=0 -mtune=G4 -Wno-deprecated-declarations -Wno-invalid-offsetof -mmacosx-version-min=10.3 -Wmost -Wno-sign-compare -Wno-switch -fconstant-cfstrings -ffor-scope -Wno-reorder ' |
284 | cppflags += '-x c++ -DLL_DARWIN=1 -fpch-preprocess -F./newview/build/Deployment -fconstant-cfstrings -isysroot /Developer/SDKs/MacOSX10.3.9.sdk ' | ||
285 | |||
286 | cxxflags += cflags | ||
242 | 287 | ||
243 | ### Build type-specific flags ### | 288 | ### Build type-specific flags ### |
244 | 289 | ||
245 | debug_opts = flags + '-fno-inline -O0 -D_DEBUG -DLL_DEBUG=1 ' | 290 | debug_cflags = cflags + '-fno-inline -O0 ' |
246 | release_opts = flags + '-O2 -DNDEBUG -DLL_RELEASE=1 ' | 291 | debug_cppflags = cppflags + '-D_DEBUG -DLL_DEBUG=1 ' |
247 | releasenoopt_opts = flags + '-O0 -DNDEBUG -DLL_RELEASE=1 ' | 292 | debug_cxxflags = cxxflags |
248 | releasefordownload_opts = flags + '-O2 -DNDEBUG -DLL_RELEASE=1 -DLL_RELEASE_FOR_DOWNLOAD=1 ' | 293 | release_cflags = cflags + '-O2 ' |
294 | release_cppflags = cppflags + '-DNDEBUG -DLL_RELEASE=1 ' | ||
295 | release_cxxflags = cxxflags | ||
296 | releasenoopt_cflags = cflags + '-O0 ' | ||
297 | releasenoopt_cppflags = cppflags + '-DNDEBUG -DLL_RELEASE=1 ' | ||
298 | releasenoopt_cxxflags = cxxflags | ||
299 | releasefordownload_cflags = cflags + '-O2 ' | ||
300 | releasefordownload_cppflags = cppflags + '-DNDEBUG -DLL_RELEASE=1 -DLL_RELEASE_FOR_DOWNLOAD=1 ' | ||
301 | releasefordownload_cxxflags = cxxflags | ||
249 | 302 | ||
250 | ################ | 303 | ################ |
251 | # ENVIRONMENT # | 304 | # ENVIRONMENT # |
252 | ################ | 305 | ################ |
253 | 306 | ||
254 | gcc_bin = 'g++-3.4' | 307 | if standalone: |
308 | gcc_bin = 'g++' | ||
309 | else: | ||
310 | gcc_bin = 'g++-3.4' | ||
311 | |||
255 | # If you strip more aggressively than -S then the quality of crash- | 312 | # If you strip more aggressively than -S then the quality of crash- |
256 | # logger backtraces deteriorates. | 313 | # logger backtraces deteriorates. |
257 | strip_cmd = 'strip -S -o $TARGET $SOURCE' | 314 | strip_cmd = 'strip -S -o $TARGET $SOURCE' |
@@ -285,6 +342,10 @@ for build_target in targets: | |||
285 | if os.path.isdir(mysql_lib_dir): | 342 | if os.path.isdir(mysql_lib_dir): |
286 | lib_path.append(mysql_lib_dir) | 343 | lib_path.append(mysql_lib_dir) |
287 | 344 | ||
345 | if standalone: | ||
346 | system_link_flags += pkgconfig('--libs-only-L') + ' ' | ||
347 | system_link_flags += pkgconfig('--libs-only-other') + ' ' | ||
348 | |||
288 | base_env = Environment(CXX = compiler, | 349 | base_env = Environment(CXX = compiler, |
289 | CPPPATH = include_dirs, | 350 | CPPPATH = include_dirs, |
290 | LIBPATH = lib_path, | 351 | LIBPATH = lib_path, |
@@ -292,16 +353,24 @@ for build_target in targets: | |||
292 | 353 | ||
293 | ### Environments for various build types ### | 354 | ### Environments for various build types ### |
294 | 355 | ||
295 | env = base_env.Copy(CPPFLAGS = releasefordownload_opts) | 356 | env = base_env.Copy(CFLAGS=releasefordownload_cflags, |
357 | CPPFLAGS=releasefordownload_cppflags, | ||
358 | CXXFLAGS=releasefordownload_cxxflags) | ||
296 | 359 | ||
297 | if buildtype == 'debug': | 360 | if buildtype == 'debug': |
298 | env = base_env.Copy(CPPFLAGS = debug_opts) | 361 | env = base_env.Copy(CFLAGS=debug_cflags, |
362 | CPPFLAGS=debug_cppflags, | ||
363 | CXXFLAGS=debug_cxxflags) | ||
299 | 364 | ||
300 | if buildtype == 'release': | 365 | if buildtype == 'release': |
301 | env = base_env.Copy(CPPFLAGS = release_opts) | 366 | env = base_env.Copy(CFLAGS=release_cflags, |
367 | CPPFLAGS=release_cppflags, | ||
368 | CXXFLAGS=release_cxxflags) | ||
302 | 369 | ||
303 | if buildtype == 'releasenoopt': | 370 | if buildtype == 'releasenoopt': |
304 | env = base_env.Copy(CPPFLAGS = releasenoopt_opts) | 371 | env = base_env.Copy(CFLAGS=releasenoopt_cflags, |
372 | CPPFLAGS=releasenoopt_cppflags, | ||
373 | CXXFLAGS=releasenoopt_cxxflags) | ||
305 | 374 | ||
306 | # ccache needs this to be set | 375 | # ccache needs this to be set |
307 | try: | 376 | try: |
@@ -381,7 +450,7 @@ for build_target in targets: | |||
381 | source_files = 'files.lst', | 450 | source_files = 'files.lst', |
382 | extra_depends=None): | 451 | extra_depends=None): |
383 | files_list = load_files(input_dir, source_files) | 452 | files_list = load_files(input_dir, source_files) |
384 | BuildDir(build_dir + '/' + input_dir, input_dir) | 453 | BuildDir(build_dir + '/' + input_dir, input_dir, duplicate=duplicate) |
385 | local_env = env.Copy(CPPFLAGS = env['CPPFLAGS'] + ' ' + local_flags) | 454 | local_env = env.Copy(CPPFLAGS = env['CPPFLAGS'] + ' ' + local_flags) |
386 | if extra_depends: | 455 | if extra_depends: |
387 | for x in files_list: | 456 | for x in files_list: |
@@ -395,20 +464,26 @@ for build_target in targets: | |||
395 | def create_dynamic_module( | 464 | def create_dynamic_module( |
396 | module, | 465 | module, |
397 | local_flags="", | 466 | local_flags="", |
398 | module_libs = None, | 467 | module_libs = [], |
399 | source_files = 'files.lst'): | 468 | source_files = 'files.lst'): |
400 | files_list = load_files(module, source_files) | 469 | files_list = load_files(module, source_files) |
401 | BuildDir(build_dir + '/' + module, module) | 470 | BuildDir(build_dir + '/' + module, module, duplicate=duplicate) |
402 | local_env = env.Copy(CPPFLAGS = env['CPPFLAGS'] + ' ' + local_flags) | 471 | local_env = env.Copy(CPPFLAGS = env['CPPFLAGS'] + ' ' + local_flags) |
403 | tgt = local_env.SharedLibrary(lib_dir + '/' + module, files_list, LIBS = module_libs) | 472 | tgt = local_env.SharedLibrary(lib_dir + '/' + module, files_list, LIBS = module_libs) |
404 | Default(tgt) | 473 | Default(tgt) |
405 | 474 | ||
475 | def create_cond_module(module, module_libs=[]): | ||
476 | if build_target != 'client' or not opensource: | ||
477 | create_static_module(module=module) | ||
478 | else: | ||
479 | create_dynamic_module(module=module, module_libs=module_libs) | ||
480 | |||
406 | ### Create an executable from the module ### | 481 | ### Create an executable from the module ### |
407 | 482 | ||
408 | def create_executable( | 483 | def create_executable( |
409 | exec_file, module, module_libs, source_files = 'files.lst'): | 484 | exec_file, module, module_libs, source_files = 'files.lst'): |
410 | files_list = load_files(module, source_files) | 485 | files_list = load_files(module, source_files) |
411 | BuildDir(build_dir + '/' + module, module) | 486 | BuildDir(build_dir + '/' + module, module, duplicate=duplicate) |
412 | tgt = env.Program(exec_file, files_list, LIBS = module_libs) | 487 | tgt = env.Program(exec_file, files_list, LIBS = module_libs) |
413 | Default(tgt) | 488 | Default(tgt) |
414 | 489 | ||
@@ -417,11 +492,12 @@ for build_target in targets: | |||
417 | # BUILD LIBRARIES # | 492 | # BUILD LIBRARIES # |
418 | #################### | 493 | #################### |
419 | 494 | ||
420 | create_static_module('llcommon') | 495 | create_cond_module('llcommon') |
421 | create_static_module('llmath') | 496 | create_cond_module('llmath') |
497 | create_cond_module('llvfs') | ||
498 | create_cond_module('llimagej2coj', module_libs=['openjpeg']) | ||
499 | create_cond_module('llimage', module_libs=['llimagej2coj', 'jpeg', 'png12']) | ||
422 | create_static_module('llmessage') | 500 | create_static_module('llmessage') |
423 | create_static_module('llvfs') | ||
424 | create_static_module('llimage') | ||
425 | create_static_module('llinventory') | 501 | create_static_module('llinventory') |
426 | create_static_module('llcharacter') | 502 | create_static_module('llcharacter') |
427 | create_static_module('llprimitive') | 503 | create_static_module('llprimitive') |
@@ -431,7 +507,11 @@ for build_target in targets: | |||
431 | create_static_module('lscript', extra_depends=build_dir + '/lscript/lscript_compile/indra.y.h') | 507 | create_static_module('lscript', extra_depends=build_dir + '/lscript/lscript_compile/indra.y.h') |
432 | 508 | ||
433 | net_external_libs = [ 'curl', 'cares', 'ssl', 'crypto', 'expat', 'aprutil-1', 'apr-1' ] | 509 | net_external_libs = [ 'curl', 'cares', 'ssl', 'crypto', 'expat', 'aprutil-1', 'apr-1' ] |
434 | common_external_libs = net_external_libs + [ 'xmlrpc', 'z' ] | 510 | common_external_libs = net_external_libs + [ 'z' ] |
511 | if standalone and fedora: | ||
512 | common_external_libs += [ 'xmlrpc-epi' ] | ||
513 | else: | ||
514 | common_external_libs += [ 'xmlrpc' ] | ||
435 | 515 | ||
436 | if build_target == 'client': | 516 | if build_target == 'client': |
437 | if platform == 'linux': | 517 | if platform == 'linux': |
@@ -439,16 +519,22 @@ for build_target in targets: | |||
439 | # BUILD LINUX_CRASH_LOGGER # | 519 | # BUILD LINUX_CRASH_LOGGER # |
440 | ############################# | 520 | ############################# |
441 | output_crashlogger_bin = 'linux_crash_logger/linux-crash-logger-' + arch + '-bin' | 521 | output_crashlogger_bin = 'linux_crash_logger/linux-crash-logger-' + arch + '-bin' |
442 | external_libs = net_external_libs + [ 'db-4.2', 'gtk-x11-2.0' ] | 522 | if standalone: |
523 | external_libs = net_external_libs + [ 'db' ] | ||
524 | external_libs += [d[2:] for d in | ||
525 | pkgconfig('--libs-only-l', 'gtk+-2.0').split()] | ||
526 | else: | ||
527 | external_libs = net_external_libs + [ 'db-4.2', 'gtk-x11-2.0' ] | ||
443 | external_libs.remove('cares') | 528 | external_libs.remove('cares') |
444 | internal_libs = [ 'llvfs', 'llmath', 'llcommon' ] | 529 | internal_libs = [ 'llvfs', 'llmath', 'llcommon' ] |
445 | create_executable(output_crashlogger_bin + '-globalsyms', 'linux_crash_logger', internal_libs + external_libs) | 530 | create_executable(output_crashlogger_bin + '-globalsyms', |
531 | 'linux_crash_logger', | ||
532 | internal_libs + external_libs) | ||
446 | env.Command(output_crashlogger_bin, output_crashlogger_bin + '-globalsyms', hidesyms_cmd) | 533 | env.Command(output_crashlogger_bin, output_crashlogger_bin + '-globalsyms', hidesyms_cmd) |
447 | 534 | ||
448 | create_static_module('llaudio') | 535 | create_static_module('llaudio') |
449 | create_static_module('llmedia') | 536 | create_static_module('llmedia') |
450 | create_static_module('llui') | 537 | create_static_module('llui') |
451 | create_static_module('llimagej2coj') | ||
452 | 538 | ||
453 | if not opensource: | 539 | if not opensource: |
454 | create_dynamic_module('llkdu', '', ['llimage', 'llvfs', 'llmath', 'llcommon', 'apr-1', 'kdu_v42R']) | 540 | create_dynamic_module('llkdu', '', ['llimage', 'llvfs', 'llmath', 'llcommon', 'apr-1', 'kdu_v42R']) |
@@ -458,7 +544,17 @@ for build_target in targets: | |||
458 | ################## | 544 | ################## |
459 | output_bin = 'newview/secondlife-' + arch + '-bin' | 545 | output_bin = 'newview/secondlife-' + arch + '-bin' |
460 | 546 | ||
461 | external_libs = client_external_libs + common_external_libs + [ 'freetype', 'jpeg', 'SDL', 'GL', 'GLU', 'ogg', 'vorbisenc', 'vorbisfile', 'vorbis', 'db-4.2', 'openjpeg' ] | 547 | external_libs = client_external_libs + common_external_libs |
548 | |||
549 | if standalone: | ||
550 | external_libs += [ 'db' ] | ||
551 | external_libs += [ d[2:] for d in | ||
552 | pkgconfig('--libs-only-l').split() ] | ||
553 | else: | ||
554 | external_libs += [ 'freetype', 'SDL', 'ogg', 'vorbisenc', | ||
555 | 'vorbisfile', 'vorbis', 'db-4.2' ] | ||
556 | |||
557 | external_libs += [ 'jpeg', 'openjpeg', 'png12', 'GL', 'GLU' ] | ||
462 | 558 | ||
463 | if arch != 'x86_64' and arch != 'x86_64cross': | 559 | if arch != 'x86_64' and arch != 'x86_64cross': |
464 | if enable_fmod: | 560 | if enable_fmod: |
@@ -540,7 +636,7 @@ for build_target in targets: | |||
540 | # Dataserver | 636 | # Dataserver |
541 | Depends('dataserver/dataserver', 'launcher/launcher' + file_suffix) | 637 | Depends('dataserver/dataserver', 'launcher/launcher' + file_suffix) |
542 | external_libs = common_external_libs + ['boost_regex-gcc-mt', 'mysqlclient', 'tcmalloc', 'stacktrace'] | 638 | external_libs = common_external_libs + ['boost_regex-gcc-mt', 'mysqlclient', 'tcmalloc', 'stacktrace'] |
543 | internal_libs = [ 'llcharacter', 'lldatabase', 'llimage', 'llinventory', | 639 | internal_libs = [ 'llcharacter', 'lldatabase', 'llimage', 'llimagej2coj', 'llinventory', |
544 | 'llscene', 'llmessage', 'llvfs', 'llxml', 'llcommon', 'llmath' ] | 640 | 'llscene', 'llmessage', 'llvfs', 'llxml', 'llcommon', 'llmath' ] |
545 | create_executable('dataserver/dataserver' + file_suffix, 'dataserver', | 641 | create_executable('dataserver/dataserver' + file_suffix, 'dataserver', |
546 | internal_libs + external_libs) | 642 | internal_libs + external_libs) |
@@ -563,8 +659,7 @@ for build_target in targets: | |||
563 | 659 | ||
564 | # Rpcserver | 660 | # Rpcserver |
565 | Depends('rpcserver/rpcserver', 'userserver/userserver' + file_suffix) | 661 | Depends('rpcserver/rpcserver', 'userserver/userserver' + file_suffix) |
566 | external_libs = common_external_libs + ['xmlrpc', | 662 | external_libs = common_external_libs + ['xmlrpc', 'mysqlclient'] |
567 | 'mysqlclient'] | ||
568 | internal_libs = ['llscene', 'llmessage', 'lldatabase', 'llvfs', | 663 | internal_libs = ['llscene', 'llmessage', 'lldatabase', 'llvfs', |
569 | 'llmath', 'llcommon'] | 664 | 'llmath', 'llcommon'] |
570 | create_executable('rpcserver/rpcserver' + file_suffix, 'rpcserver', | 665 | create_executable('rpcserver/rpcserver' + file_suffix, 'rpcserver', |
@@ -573,27 +668,28 @@ for build_target in targets: | |||
573 | # Mapserver | 668 | # Mapserver |
574 | Depends('mapserver/mapserver', 'rpcserver/rpcserver' + file_suffix) | 669 | Depends('mapserver/mapserver', 'rpcserver/rpcserver' + file_suffix) |
575 | external_libs = common_external_libs + ['OSMesa16', 'kdu', | 670 | external_libs = common_external_libs + ['OSMesa16', 'kdu', |
576 | 'boost_regex-gcc-mt', 'iconv', 'jpeg', 'GL', | 671 | 'boost_regex-gcc-mt', 'iconv', 'jpeg', 'openjpeg', 'GL', |
577 | 'mysqlclient', 'pthread', 'dl'] | 672 | 'mysqlclient', 'pthread', 'dl'] |
578 | internal_libs = ['llrender', 'llwindow', 'llimage', 'lldatabase', 'llprimitive', 'llmessage', 'llkdustatic', | 673 | internal_libs = ['llrender', 'llwindow', 'llimage', 'llimagej2coj', 'lldatabase', 'llprimitive', 'llmessage', 'llkdustatic', |
579 | 'llxml', 'llvfs', 'llmath', 'llcommon'] | 674 | 'llxml', 'llvfs', 'llmath', 'llcommon'] |
580 | create_executable('mapserver/mapserver' + file_suffix, 'mapserver', | 675 | create_executable('mapserver/mapserver' + file_suffix, 'mapserver', |
581 | internal_libs + external_libs) | 676 | internal_libs + external_libs) |
582 | 677 | ||
583 | # Simulator | 678 | # Simulator |
584 | Depends('newsim/simulator' + file_suffix, 'mapserver/mapserver' + file_suffix) | 679 | Depends('newsim/simulator' + file_suffix, 'mapserver/mapserver' + file_suffix) |
585 | external_libs = common_external_libs + ['hkdynamics', 'hkgeometry', 'hkmath', 'hkbase', 'hkcollide', 'hkactions', 'boost_regex-gcc-mt', 'dl', 'kdu', 'mysqlclient', 'iconv', 'tcmalloc', 'stacktrace'] | 680 | external_libs = common_external_libs + ['hkdynamics', 'hkgeometry', 'hkmath', 'hkbase', 'hkcollide', 'hkactions', 'boost_regex-gcc-mt', 'openjpeg', 'dl', 'kdu', 'mysqlclient', 'iconv', 'tcmalloc', 'stacktrace'] |
586 | internal_libs = [ 'lscript', 'llprimitive', | 681 | internal_libs = [ 'lscript', 'llprimitive', |
587 | 'llscene', 'llhavok', 'llinventory', 'llimage', | 682 | 'llscene', 'llhavok', 'llinventory', 'llimage', 'llimagej2coj', |
588 | 'llcharacter', 'llxml', 'lldatabase', 'llkdustatic', | 683 | 'llcharacter', 'llxml', 'lldatabase', 'llkdustatic', |
589 | 'llmessage', 'llvfs', 'llmath', 'llcommon' ] | 684 | 'llmessage', 'llvfs', 'llmath', 'llcommon' ] |
590 | create_executable('newsim/simulator' + file_suffix, 'newsim', | 685 | create_executable('newsim/simulator' + file_suffix, 'newsim', |
591 | internal_libs + external_libs) | 686 | internal_libs + external_libs) |
592 | 687 | ||
593 | # texture upload verifier | 688 | # texture upload verifier |
594 | external_libs = common_external_libs + [ 'kdu', 'dl' ] | 689 | external_libs = common_external_libs + [ 'kdu', 'openjpeg', 'dl' ] |
595 | internal_libs = [ | 690 | internal_libs = [ |
596 | 'llimage', | 691 | 'llimage', |
692 | 'llimagej2coj', | ||
597 | 'llkdustatic', | 693 | 'llkdustatic', |
598 | 'llinventory', | 694 | 'llinventory', |
599 | 'llmessage', | 695 | 'llmessage', |