aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/linden/indra/SConstruct
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--linden/indra/SConstruct51
1 files changed, 20 insertions, 31 deletions
diff --git a/linden/indra/SConstruct b/linden/indra/SConstruct
index 9298f7a..f1a6c89 100644
--- a/linden/indra/SConstruct
+++ b/linden/indra/SConstruct
@@ -25,10 +25,11 @@
25################################################# 25#################################################
26 26
27 27
28import os
29import sys
30import glob 28import glob
29import os
30import random
31import re 31import re
32import sys
32 33
33platform = sys.platform 34platform = sys.platform
34if platform == 'linux2': 35if platform == 'linux2':
@@ -91,8 +92,8 @@ opts.AddOptions(
91 BoolOption('COLORGCC', 'Enabled colorgcc', True), 92 BoolOption('COLORGCC', 'Enabled colorgcc', True),
92 EnumOption('GRID', 'Client package\'s default grid', 'default', 93 EnumOption('GRID', 'Client package\'s default grid', 'default',
93 allowed_values=('default', 'aditi', 'agni', 'dmz', 'durga', 'ganga', 'shakti', 'siva', 'soma', 'uma', 'vaak')), 94 allowed_values=('default', 'aditi', 'agni', 'dmz', 'durga', 'ganga', 'shakti', 'siva', 'soma', 'uma', 'vaak')),
94 EnumOption('CHANNEL', 'Client package\'s default channel', 'default', 95 EnumOption('CHANNEL', 'Client package\'s default channel', 'Release',
95 allowed_values=('default', 'Release', 'Release Candidate', 'WindLight')), 96 allowed_values=('Release', 'Release Candidate', 'WindLight')),
96 BoolOption('ELFIO', 'Enabled enhanced backtraces with libELFIO symbol extraction support', True), 97 BoolOption('ELFIO', 'Enabled enhanced backtraces with libELFIO symbol extraction support', True),
97 BoolOption('STANDALONE', 'Build using system packages (implies OPENSOURCE)', False), 98 BoolOption('STANDALONE', 'Build using system packages (implies OPENSOURCE)', False),
98 BoolOption('OPENSOURCE', 'Build using only non-proprietary dependencies', True) # OPENSOURCE: do not edit this line 99 BoolOption('OPENSOURCE', 'Build using only non-proprietary dependencies', True) # OPENSOURCE: do not edit this line
@@ -211,20 +212,7 @@ for build_target in targets:
211 """ + 212 """ +
212 '../libraries/' + system_str + '/include' ) 213 '../libraries/' + system_str + '/include' )
213 214
214 if platform == 'linux' and build_target == 'client': 215 client_external_libs = []
215 if standalone:
216 if arch == 'x86_64' and os.path.exists('/usr/lib64'):
217 client_external_libs = [File('/usr/lib64/libresolv.a')]
218 else:
219 client_external_libs = [File('/usr/lib/libresolv.a')]
220 else:
221 # Custom libresolv build which avoids a billion flavors of
222 # brokenness prevalent in common libresolvs out there.
223 client_external_libs = ['resolv']
224 include_dirs += ['../libraries/' + system_str + '/include/llresolv8']
225 else:
226 client_external_libs = ['resolv']
227
228 system_link_flags = '' 216 system_link_flags = ''
229 217
230 if platform != 'linux' and build_target == 'client' and enable_mozlib: 218 if platform != 'linux' and build_target == 'client' and enable_mozlib:
@@ -255,7 +243,7 @@ for build_target in targets:
255 ############## 243 ##############
256 244
257 # Generic GCC flags 245 # Generic GCC flags
258 cflags = '-g -pipe -Wall -Wno-reorder -Wno-trigraphs -Wno-sign-compare -Werror ' 246 cflags = '-g -pipe -Wall -Wno-reorder -Wno-trigraphs -Wno-sign-compare -Werror -fexceptions '
259 cxxflags = '' 247 cxxflags = ''
260 cppflags = '-D_FORTIFY_SOURCE=2 ' 248 cppflags = '-D_FORTIFY_SOURCE=2 '
261 if standalone: 249 if standalone:
@@ -276,7 +264,7 @@ for build_target in targets:
276 cppflags += server_cppflags + ' ' 264 cppflags += server_cppflags + ' '
277 else: 265 else:
278 # Viewer flags 266 # Viewer flags
279 cflags += '-pthread -D_REENTRANT -fno-math-errno -fexceptions -fsigned-char -fno-strict-aliasing ' 267 cflags += '-pthread -D_REENTRANT -fno-math-errno -fsigned-char -fno-strict-aliasing '
280 cppflags += '-DLL_MESA_HEADLESS=0 -DLL_MESA=0 ' 268 cppflags += '-DLL_MESA_HEADLESS=0 -DLL_MESA=0 '
281 try: 269 try:
282 client_cppflags = os.environ['CLIENT_CPPFLAGS'] 270 client_cppflags = os.environ['CLIENT_CPPFLAGS']
@@ -327,7 +315,7 @@ for build_target in targets:
327 cppflags += '-DLL_GSTREAMER_ENABLED=0 ' 315 cppflags += '-DLL_GSTREAMER_ENABLED=0 '
328 else: 316 else:
329 # Mac-only flags 317 # Mac-only flags
330 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 ' 318 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 -fexceptions '
331 cppflags += '-x c++ -DLL_DARWIN=1 -fpch-preprocess -F./newview/build/Deployment -fconstant-cfstrings -isysroot /Developer/SDKs/MacOSX10.3.9.sdk ' 319 cppflags += '-x c++ -DLL_DARWIN=1 -fpch-preprocess -F./newview/build/Deployment -fconstant-cfstrings -isysroot /Developer/SDKs/MacOSX10.3.9.sdk '
332 320
333 if standalone: 321 if standalone:
@@ -447,9 +435,13 @@ for build_target in targets:
447 ### Distributed build hosts ### 435 ### Distributed build hosts ###
448 436
449 if enable_distcc: 437 if enable_distcc:
450 hosts = 'localhost/2 station9.lindenlab.com,lzo station7.lindenlab.com,lzo station6.lindenlab.com,lzo station11.lindenlab.com,lzo station5.lindenlab.com,lzo station15.lindenlab.com,lzo station10.lindenlab.com,lzo station13.lindenlab.com,lzo station12.lindenlab.com,lzo' 438 hosts = [ 'localhost/2', ]
451 if arch == 'x86_64' or arch == 'x86_64cross': 439 if arch == 'i686':
452 hosts = 'localhost' 440 dead = []
441 stations = [s for s in xrange(36) if s not in dead]
442 random.shuffle(stations)
443 hosts += ['station%d.lindenlab.com/2,lzo' % s for s in stations]
444 hosts = ' '.join(hosts)
453 print "Distributing to hosts: " + hosts 445 print "Distributing to hosts: " + hosts
454 env['ENV']['DISTCC_HOSTS'] = hosts 446 env['ENV']['DISTCC_HOSTS'] = hosts
455 env['ENV']['USER'] = os.environ['USER'] 447 env['ENV']['USER'] = os.environ['USER']
@@ -624,7 +616,6 @@ for build_target in targets:
624 pkgconfig('--libs-only-l', ['gtk+-2.0']).split()] 616 pkgconfig('--libs-only-l', ['gtk+-2.0']).split()]
625 else: 617 else:
626 external_libs = net_external_libs + [ 'db-4.2', 'gtk-x11-2.0' ] 618 external_libs = net_external_libs + [ 'db-4.2', 'gtk-x11-2.0' ]
627 external_libs.remove('cares')
628 internal_libs = [ 'llvfs', 'llmath', 'llcommon' ] 619 internal_libs = [ 'llvfs', 'llmath', 'llcommon' ]
629 create_executable(output_crashlogger_bin + '-globalsyms', 620 create_executable(output_crashlogger_bin + '-globalsyms',
630 'linux_crash_logger', 621 'linux_crash_logger',
@@ -649,8 +640,8 @@ for build_target in targets:
649 external_libs += [ d[2:] for d in 640 external_libs += [ d[2:] for d in
650 pkgconfig('--libs-only-l').split() ] 641 pkgconfig('--libs-only-l').split() ]
651 else: 642 else:
652 external_libs += [ 'freetype', 'SDL', 'ogg', 'vorbisenc', 643 external_libs += [ 'freetype', 'SDL', 'vorbisenc',
653 'vorbisfile', 'vorbis', 'db-4.2' ] 644 'vorbisfile', 'vorbis', 'ogg', 'db-4.2' ]
654 645
655 external_libs += [ 'jpeg', 'openjpeg', 'png12', 'GL', 'GLU' ] 646 external_libs += [ 'jpeg', 'openjpeg', 'png12', 'GL', 'GLU' ]
656 647
@@ -660,8 +651,6 @@ for build_target in targets:
660 if buildtype == 'debug': 651 if buildtype == 'debug':
661 external_libs += ['tcmalloc', 'stacktrace'] 652 external_libs += ['tcmalloc', 'stacktrace']
662 653
663 external_libs.remove('cares')
664
665 internal_libs = [ 'lscript', 'llwindow', 'llrender', 'llprimitive', 654 internal_libs = [ 'lscript', 'llwindow', 'llrender', 'llprimitive',
666 'llmedia', 'llinventory', 655 'llmedia', 'llinventory',
667 'llimage', 'llimagej2coj', 656 'llimage', 'llimagej2coj',
@@ -684,7 +673,7 @@ for build_target in targets:
684 product_name = 'SecondLife_' + arch + '_' + "_".join(version_viewer.split(".")) 673 product_name = 'SecondLife_' + arch + '_' + "_".join(version_viewer.split("."))
685 if grid not in ['default', 'agni']: 674 if grid not in ['default', 'agni']:
686 product_name += "_" + grid.upper() 675 product_name += "_" + grid.upper()
687 if channel not in ['default', 'Release']: 676 if channel not in ['Release']:
688 product_name += "_" + "".join((channel.upper()).split()) 677 product_name += "_" + "".join((channel.upper()).split())
689 package_name = product_name + '.tar.bz2' 678 package_name = product_name + '.tar.bz2'
690 complete_channel = 'Second Life ' + channel 679 complete_channel = 'Second Life ' + channel
@@ -701,7 +690,7 @@ for build_target in targets:
701 elif build_target == 'server': 690 elif build_target == 'server':
702 create_static_module('lldatabase') 691 create_static_module('lldatabase')
703 create_static_module('llscene') 692 create_static_module('llscene')
704 create_static_module('llhavok', '-fno-exceptions -fno-rtti') 693 create_static_module('llhavok', '-fno-rtti')
705 create_static_module_from_dir('llkdu', 'llkdustatic') 694 create_static_module_from_dir('llkdu', 'llkdustatic')
706 695
707 696