diff options
Diffstat (limited to 'linden/indra/SConstruct')
-rw-r--r-- | linden/indra/SConstruct | 535 |
1 files changed, 535 insertions, 0 deletions
diff --git a/linden/indra/SConstruct b/linden/indra/SConstruct new file mode 100644 index 0000000..d9c53b9 --- /dev/null +++ b/linden/indra/SConstruct | |||
@@ -0,0 +1,535 @@ | |||
1 | ################################################# | ||
2 | # | ||
3 | # SConstruct makefile for Second Life viewer | ||
4 | # and servers. | ||
5 | # | ||
6 | # To build everything: | ||
7 | # | ||
8 | # scons ARCH=all BTARGET=all DISTCC=yes | ||
9 | # | ||
10 | # For help on options: | ||
11 | # | ||
12 | # scons -h | ||
13 | # | ||
14 | # Written by Tom Yedwab, 6/2006. | ||
15 | # | ||
16 | ################################################# | ||
17 | |||
18 | |||
19 | import os | ||
20 | import sys | ||
21 | import glob | ||
22 | |||
23 | platform = sys.platform | ||
24 | if platform == 'linux2': | ||
25 | platform = 'linux' | ||
26 | |||
27 | ###################### | ||
28 | # GET VERSION # | ||
29 | ###################### | ||
30 | |||
31 | pipe = os.popen('grep LL_VERSION_MAJOR llcommon/llversion.h | sed \'s/.*=//; s/[^0-9]*//g\'') | ||
32 | version_major = pipe.read().rstrip('\n') | ||
33 | pipe.close() | ||
34 | pipe = os.popen('grep LL_VERSION_MINOR llcommon/llversion.h | sed \'s/.*=//; s/[^0-9]*//g\'') | ||
35 | version_minor = pipe.read().rstrip('\n') | ||
36 | pipe.close() | ||
37 | pipe = os.popen('grep LL_VERSION_PATCH llcommon/llversion.h | sed \'s/.*=//; s/[^0-9]*//g\'') | ||
38 | version_patch = pipe.read().rstrip('\n') | ||
39 | pipe.close() | ||
40 | pipe = os.popen('grep LL_VERSION_BUILD llcommon/llversion.h | sed \'s/.*=//; s/[^0-9]*//g\'') | ||
41 | version_build = pipe.read().rstrip('\n') | ||
42 | pipe.close() | ||
43 | |||
44 | ######################### | ||
45 | # COMMAND LINE OPTIONS # | ||
46 | ######################### | ||
47 | |||
48 | opts = Options() | ||
49 | opts.Add(EnumOption('BUILD', 'Set build type', 'releasefordownload', | ||
50 | allowed_values=('debug', 'release', 'releasenoopt', 'releasefordownload'))) | ||
51 | opts.Add(EnumOption('ARCH', 'Set architecture', 'i686', | ||
52 | allowed_values=('i686', 'powerpc', 'x86_64'))) | ||
53 | opts.Add(EnumOption('BTARGET', 'Set build target', 'server', | ||
54 | allowed_values=('client', 'server', 'all'))) | ||
55 | opts.Add(EnumOption('DISTCC', 'Enabled distcc', 'yes', | ||
56 | allowed_values=('yes', 'no'))) | ||
57 | opts.Add(EnumOption('COLORGCC', 'Enabled colorgcc', 'yes', | ||
58 | allowed_values=('yes', 'no'))) | ||
59 | opts.Add(EnumOption('GRID', 'Client package\'s default grid', 'default', | ||
60 | allowed_values=('default', 'aditi', 'agni', 'dmz', 'durga', 'ganga', 'shakti', 'siva', 'soma', 'uma', 'vaak'))) | ||
61 | opts.Add(EnumOption('OPENSOURCE', 'Build using only non-proprietary dependencies', | ||
62 | 'yes',# OPENSOURCE: do not edit this line | ||
63 | allowed_values=('yes', 'no'))) | ||
64 | helpenv = Environment(options = opts) | ||
65 | Help(opts.GenerateHelpText(helpenv)) | ||
66 | |||
67 | build_param = ARGUMENTS.get('BUILD', 'releasefordownload') | ||
68 | arch = ARGUMENTS.get('ARCH', 'i686') | ||
69 | target_param = ARGUMENTS.get('BTARGET', 'server') | ||
70 | enable_distcc = ARGUMENTS.get('DISTCC', 'yes') | ||
71 | enable_colorgcc = ARGUMENTS.get('COLORGCC', 'yes') | ||
72 | grid = ARGUMENTS.get('GRID', 'default') | ||
73 | # OPENSOURCE: do not edit the following line: | ||
74 | opensource = ARGUMENTS.get('OPENSOURCE', 'yes') | ||
75 | |||
76 | targets = [ target_param ] | ||
77 | |||
78 | if target_param == 'all': | ||
79 | targets = [ 'client', 'server' ] | ||
80 | |||
81 | ##################### | ||
82 | # ITERATE TARGETS # | ||
83 | ##################### | ||
84 | |||
85 | for build_target in targets: | ||
86 | buildtype = build_param | ||
87 | if build_target == 'server' and buildtype == 'releasefordownload': | ||
88 | buildtype = 'release' | ||
89 | |||
90 | system_str = arch + '-' + platform | ||
91 | |||
92 | print 'Building ' + build_target + ' ' + version_major + '.' + version_minor + '.' + version_patch + '.' + version_build + ' on ' + system_str + ' (' + buildtype + ')' | ||
93 | |||
94 | system_lib_dir = '../libraries/' + system_str | ||
95 | if build_target == 'client': | ||
96 | system_lib_dir += '/lib_release_client' | ||
97 | elif buildtype == 'debug': | ||
98 | system_lib_dir += '/lib_debug' | ||
99 | else: | ||
100 | system_lib_dir += '/lib_release' | ||
101 | |||
102 | lib_dir = './lib_' + buildtype + '_' + build_target + '/' + system_str | ||
103 | |||
104 | try: | ||
105 | build_dir_prefix = os.environ['TEMP_BUILD_DIR'] | ||
106 | except: | ||
107 | build_dir_prefix = '/tmp/' + os.environ['USER'] | ||
108 | |||
109 | build_dir = build_dir_prefix + os.getcwd() + '/' + system_str + '-' + build_target + '-' + buildtype | ||
110 | |||
111 | ### Base include directories ### | ||
112 | |||
113 | include_dirs = Split(""" | ||
114 | ./llcommon ./llmath ./llwindow ./llaudio ./llcharacter | ||
115 | ./lldatabase ./llhavok ./llimage ./llinventory ./llmedia ./llmessage | ||
116 | ./llprimitive ./llrender ./llscene ./llui ./llvfs ./llwindow | ||
117 | ./llxml ./lscript | ||
118 | ../libraries/include | ||
119 | ../libraries/include/havok | ||
120 | """ + | ||
121 | '../libraries/' + system_str + '/include' ) | ||
122 | |||
123 | client_external_libs = [] | ||
124 | system_link_flags = '' | ||
125 | |||
126 | if platform != 'linux' and build_target == 'client': | ||
127 | |||
128 | ### Mozilla include directories ### | ||
129 | |||
130 | mozilla_dir = '../libraries/' + system_str + '/include/mozilla' | ||
131 | include_dirs += Split( | ||
132 | mozilla_dir + '/include/webbrwsr ' + | ||
133 | mozilla_dir + '/include/docshell ' + | ||
134 | mozilla_dir + '/include/dom ' + | ||
135 | mozilla_dir + '/include/xpcom ' + | ||
136 | mozilla_dir + '/include/widget ' + | ||
137 | mozilla_dir + '/include/gfx ' + | ||
138 | mozilla_dir + '/include/string ' + | ||
139 | mozilla_dir + '/include/uriloader ' + | ||
140 | mozilla_dir + '/include/view ' + | ||
141 | mozilla_dir + '/include/layout ' + | ||
142 | mozilla_dir + '/include/content ' + | ||
143 | mozilla_dir + '/include/locale ' + | ||
144 | mozilla_dir + '/include/profdirserviceprovider ' + | ||
145 | mozilla_dir + '/include/xulapp ' + | ||
146 | mozilla_dir + '/include/pref ' + | ||
147 | mozilla_dir + '/sdk/include') | ||
148 | |||
149 | ############## | ||
150 | # CPP Flags # | ||
151 | ############## | ||
152 | |||
153 | # Generic GCC flags | ||
154 | flags = '-g -pipe -Wall -Wno-trigraphs ' | ||
155 | |||
156 | if opensource == 'yes': | ||
157 | flags += '-DLL_USE_KDU=0 ' | ||
158 | else: | ||
159 | flags += '-DLL_USE_KDU=1 ' | ||
160 | |||
161 | if build_target == 'server': | ||
162 | # Server flags | ||
163 | flags += '-march=pentiumpro -D_GNU_SOURCE -ftemplate-depth-60 -DLL_MESA_HEADLESS=1 -DLL_MESA=1 ' | ||
164 | try: | ||
165 | server_cppflags = os.environ['SERVER_CPPFLAGS'] | ||
166 | except: | ||
167 | server_cppflags = '' | ||
168 | flags += server_cppflags + ' ' | ||
169 | else: | ||
170 | # Viewer flags | ||
171 | flags += '-falign-loops=16 -fno-math-errno -fexceptions -fsigned-char -fno-strict-aliasing -ffast-math ' | ||
172 | flags += '-DLL_MESA_HEADLESS=0 -DLL_MESA=0 ' | ||
173 | try: | ||
174 | client_cppflags = os.environ['CLIENT_CPPFLAGS'] | ||
175 | except: | ||
176 | client_cppflags = '' | ||
177 | flags += client_cppflags + ' ' | ||
178 | |||
179 | if platform == 'linux': | ||
180 | # Linux-only flags | ||
181 | flags += '-DLL_LINUX=1 ' | ||
182 | system_link_flags += '-Wl,--version-script=newview/linux_tools/hidesymbols.ver ' | ||
183 | if build_target == 'client': | ||
184 | flags += '-DAPPID=secondlife -DLL_SDL=1 -DLL_X11=1 ' | ||
185 | flags += '-DLL_GTK=1 ' | ||
186 | client_external_libs += [ 'gtk-x11-2.0', 'elfio' ] | ||
187 | include_dirs += [ '../libraries/' + system_str + '/include/gtk-2.0' ] | ||
188 | include_dirs += [ '../libraries/' + system_str + '/include/glib-2.0'] | ||
189 | include_dirs += [ '../libraries/' + system_str + '/include/pango-1.0' ] | ||
190 | include_dirs += [ '../libraries/' + system_str + '/include/atk-1.0' ] | ||
191 | include_dirs += [ '../libraries/' + system_str + '/include/ELFIO' ] | ||
192 | include_dirs += [ '../libraries/' + system_str + '/include/llfreetype2' ] | ||
193 | else: | ||
194 | # Mac-only flags | ||
195 | flags += '-x c++ -arch ppc -pipe -Wno-trigraphs -fpascal-strings -faltivec -fasm-blocks -g -O2 -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 ' | ||
196 | |||
197 | ### Build type-specific flags ### | ||
198 | |||
199 | debug_opts = flags + '-fno-inline -O0 -D_DEBUG -DLL_DEBUG=1 ' | ||
200 | release_opts = flags + '-O2 -DNDEBUG -DLL_RELEASE=1 ' | ||
201 | releasenoopt_opts = flags + '-O0 -DNDEBUG -DLL_RELEASE=1 ' | ||
202 | releasefordownload_opts = flags + '-O2 -DNDEBUG -DLL_RELEASE=1 -DLL_RELEASE_FOR_DOWNLOAD=1 ' | ||
203 | |||
204 | ################ | ||
205 | # ENVIRONMENT # | ||
206 | ################ | ||
207 | |||
208 | gcc_bin = 'g++-3.4' | ||
209 | # If you strip more aggressively than -S then the quality of crash- | ||
210 | # logger backtraces deteriorates. | ||
211 | strip_cmd = 'strip -S -o $TARGET $SOURCE' | ||
212 | |||
213 | if build_target != 'client': | ||
214 | gcc_bin = 'g++-3.3' | ||
215 | |||
216 | if arch == 'x86_64': | ||
217 | gcc_bin = '/opt/crosstool/gcc-4.0.2-glibc-2.3.6/x86_64-unknown-linux-gnu/bin/x86_64-unknown-linux-gnu-gcc' | ||
218 | strip_cmd = '/opt/crosstool/gcc-4.0.2-glibc-2.3.6/x86_64-unknown-linux-gnu/x86_64-unknown-linux-gnu/bin/strip -S -o $TARGET $SOURCE' | ||
219 | |||
220 | compiler = gcc_bin | ||
221 | compiler_no_distcc = compiler | ||
222 | if enable_distcc == 'yes': | ||
223 | compiler = 'distcc ' + gcc_bin | ||
224 | |||
225 | base_env = Environment(CXX = compiler, | ||
226 | CPPPATH = include_dirs, | ||
227 | LIBPATH = [lib_dir] + [system_lib_dir], | ||
228 | LINKFLAGS = system_link_flags + '--no-keep-memory --reduce-memory-overheads ' ) | ||
229 | |||
230 | ### Environments for various build types ### | ||
231 | |||
232 | env = base_env.Copy(CPPFLAGS = releasefordownload_opts) | ||
233 | |||
234 | if buildtype == 'debug': | ||
235 | env = base_env.Copy(CPPFLAGS = debug_opts) | ||
236 | |||
237 | if buildtype == 'release': | ||
238 | env = base_env.Copy(CPPFLAGS = release_opts) | ||
239 | |||
240 | if buildtype == 'releasenoopt': | ||
241 | env = base_env.Copy(CPPFLAGS = releasenoopt_opts) | ||
242 | |||
243 | # ccache needs this to be set | ||
244 | try: | ||
245 | env['ENV']['CCACHE_DIR'] = os.environ['CCACHE_DIR'] | ||
246 | except: | ||
247 | print "No CCACHE_DIR set." | ||
248 | |||
249 | env_no_distcc = env.Copy(CXX = compiler_no_distcc) | ||
250 | |||
251 | ### Distributed build hosts ### | ||
252 | |||
253 | if enable_distcc == 'yes': | ||
254 | 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' | ||
255 | if arch == 'x86_64': | ||
256 | hosts = 'localhost' | ||
257 | print "Distributing to hosts: " + hosts | ||
258 | env['ENV']['DISTCC_HOSTS'] = hosts | ||
259 | env['ENV']['USER'] = os.environ['USER'] | ||
260 | env['ENV']['HOME'] = os.environ['HOME'] | ||
261 | |||
262 | if enable_colorgcc == 'yes': | ||
263 | env['ENV']['PATH'] = os.environ['PATH'] | ||
264 | env['ENV']['TERM'] = os.environ['TERM'] | ||
265 | env['ENV']['HOME'] = os.environ['HOME'] | ||
266 | |||
267 | ### Configure lex and yacc ### | ||
268 | env.Append(YACCFLAGS = ["-v", "-d"]) | ||
269 | env.CFile(target=build_dir+'/lscript/lscript_compile/indra.l.cpp', source='lscript/lscript_compile/indra.l') | ||
270 | env.CFile(target=build_dir+'/lscript/lscript_compile/indra.y.c', source='lscript/lscript_compile/indra.y') | ||
271 | env.Command(build_dir+'/lscript/lscript_compile/indra.y.cpp',build_dir+'/lscript/lscript_compile/indra.y.c', | ||
272 | [Move('$TARGET','$SOURCE'),Delete(build_dir+'/lscript/lscript_compile/indra.y.output')]) | ||
273 | |||
274 | ##################### | ||
275 | # HELPER FUNCTIONS # | ||
276 | ##################### | ||
277 | |||
278 | ### Load a files.lst and files.PLATFORM.lst for each module ### | ||
279 | |||
280 | def load_files(module): | ||
281 | new_list = [] | ||
282 | try: | ||
283 | list_file = open('./' + module + '/files.lst', 'r') | ||
284 | list = Split(list_file.read()) | ||
285 | for x in list: | ||
286 | file = os.path.join(build_dir, x) | ||
287 | if x == 'newsim/lltask.cpp': | ||
288 | print 'Found lltask!' | ||
289 | obj = env_no_distcc.Object(file) | ||
290 | new_list.append(obj) | ||
291 | else: | ||
292 | new_list.append(file) | ||
293 | list_file.close() | ||
294 | except IOError: | ||
295 | print 'Error: no files.lst exists for module ' + module | ||
296 | return [] | ||
297 | |||
298 | try: | ||
299 | platform_list_file = open('./' + module + '/files.' + platform + '.lst', 'r') | ||
300 | list = Split(platform_list_file.read()) | ||
301 | for x in list: | ||
302 | file = os.path.join(build_dir, x) | ||
303 | new_list.append(file) | ||
304 | platform_list_file.close() | ||
305 | except IOError: | ||
306 | return new_list | ||
307 | |||
308 | return new_list | ||
309 | |||
310 | ### Create a static library from the module ### | ||
311 | |||
312 | def create_static_module_from_dir(input_dir, mod_name, local_flags="", extra_depends=None): | ||
313 | files_list = load_files(input_dir) | ||
314 | BuildDir(build_dir + '/' + input_dir, input_dir) | ||
315 | local_env = env.Copy(CPPFLAGS = env['CPPFLAGS'] + ' ' + local_flags) | ||
316 | if extra_depends: | ||
317 | for x in files_list: | ||
318 | Depends(local_env.Object(x), extra_depends) | ||
319 | tgt = local_env.StaticLibrary(lib_dir + '/' + mod_name, files_list) | ||
320 | Default(tgt) | ||
321 | |||
322 | def create_static_module(module, local_flags="", extra_depends=None): | ||
323 | create_static_module_from_dir(module, module, local_flags, extra_depends) | ||
324 | |||
325 | def create_dynamic_module(module, local_flags="", module_libs = None): | ||
326 | files_list = load_files(module) | ||
327 | BuildDir(build_dir + '/' + module, module) | ||
328 | local_env = env.Copy(CPPFLAGS = env['CPPFLAGS'] + ' ' + local_flags) | ||
329 | tgt = local_env.SharedLibrary(lib_dir + '/' + module, files_list, LIBS = module_libs) | ||
330 | Default(tgt) | ||
331 | |||
332 | ### Create an executable from the module ### | ||
333 | |||
334 | def create_executable(exec_file, module, module_libs): | ||
335 | files_list = load_files(module) | ||
336 | BuildDir(build_dir + '/' + module, module) | ||
337 | tgt = env.Program(exec_file, files_list, LIBS = module_libs) | ||
338 | Default(tgt) | ||
339 | |||
340 | |||
341 | #################### | ||
342 | # BUILD LIBRARIES # | ||
343 | #################### | ||
344 | |||
345 | create_static_module('llcommon') | ||
346 | create_static_module('llmath') | ||
347 | create_static_module('llmessage') | ||
348 | create_static_module('llvfs') | ||
349 | create_static_module('llimage') | ||
350 | create_static_module('llinventory') | ||
351 | create_static_module('llcharacter') | ||
352 | create_static_module('llprimitive') | ||
353 | create_static_module('llrender') | ||
354 | create_static_module('llwindow') | ||
355 | create_static_module('llxml') | ||
356 | create_static_module('lscript', extra_depends=build_dir + '/lscript/lscript_compile/indra.y.h') | ||
357 | |||
358 | net_external_libs = [ 'curl', 'ssl', 'crypto', 'aprutil-1', 'apr-1' ] | ||
359 | common_external_libs = net_external_libs + [ 'xmlrpc', 'expat', 'z' ] | ||
360 | |||
361 | if build_target == 'client': | ||
362 | if platform == 'linux': | ||
363 | ############################# | ||
364 | # BUILD LINUX_CRASH_LOGGER # | ||
365 | ############################# | ||
366 | output_crashlogger_bin = 'linux_crash_logger/linux-crash-logger-' + arch + '-bin' | ||
367 | external_libs = net_external_libs + [ 'db-4.2', 'gtk-x11-2.0' ] | ||
368 | internal_libs = [ 'llvfs', 'llmath', 'llcommon' ] | ||
369 | create_executable(output_crashlogger_bin, 'linux_crash_logger', internal_libs + external_libs) | ||
370 | |||
371 | create_static_module('llaudio') | ||
372 | create_static_module('llmedia') | ||
373 | create_static_module('llui') | ||
374 | create_static_module('llimagej2coj') | ||
375 | |||
376 | if opensource == 'no': | ||
377 | create_dynamic_module('llkdu', '', ['llimage', 'llvfs', 'llmath', 'llcommon', 'apr-1', 'kdu_v42R']) | ||
378 | |||
379 | ################## | ||
380 | # BUILD NEWVIEW # | ||
381 | ################## | ||
382 | output_bin = 'newview/secondlife-' + arch + '-bin' | ||
383 | |||
384 | external_libs = client_external_libs + common_external_libs + [ 'freetype', 'jpeg', 'SDL', 'GL', 'GLU', 'ogg', 'vorbisenc', 'vorbisfile', 'vorbis', 'fmod-3.75', 'db-4.2', 'openjpeg' ] | ||
385 | |||
386 | internal_libs = [ 'lscript', 'llwindow', 'llrender', 'llprimitive', | ||
387 | 'llmedia', 'llinventory', | ||
388 | 'llimage', 'llimagej2coj', | ||
389 | 'llcharacter', 'llaudio', 'llui', 'llxml', | ||
390 | 'llmessage', 'llvfs', 'llmath', 'llcommon' ] | ||
391 | |||
392 | create_executable(output_bin, 'newview', internal_libs + external_libs) | ||
393 | |||
394 | if buildtype == 'releasefordownload': | ||
395 | |||
396 | ####################### | ||
397 | # PACKAGE THE CLIENT # | ||
398 | ####################### | ||
399 | |||
400 | if platform == 'linux': | ||
401 | |||
402 | env.Command(output_bin + '-stripped', output_bin, strip_cmd) | ||
403 | env.Command(output_crashlogger_bin + '-stripped', output_crashlogger_bin, strip_cmd) | ||
404 | manifest_file = 'linux_tools/client-manifest-' + arch | ||
405 | product_name = 'SecondLife_' + arch + '_' + version_major + "_" + version_minor + "_" + version_patch + "_" + version_build | ||
406 | if grid != 'default': | ||
407 | product_name += "_" + grid.upper() | ||
408 | package_name = product_name + '.tar.bz2' | ||
409 | cmd = 'rm -rf newview/' + product_name + '* && newview/linux_tools/package-client.sh ' + manifest_file + ' ' + product_name + ' ' + grid | ||
410 | env.Command('newview/' + package_name, 'newview/' + manifest_file, cmd) | ||
411 | Depends('newview/' + package_name, output_bin + '-stripped') | ||
412 | Depends('newview/' + package_name, output_crashlogger_bin + '-stripped') | ||
413 | Default('newview/' + package_name) | ||
414 | |||
415 | elif build_target == 'server': | ||
416 | create_static_module('lldatabase') | ||
417 | create_static_module('llscene') | ||
418 | create_static_module('llhavok', '-fno-exceptions -fno-rtti') | ||
419 | create_static_module_from_dir('llkdu', 'llkdustatic') | ||
420 | |||
421 | # This makes sure we only build the release llpython. The | ||
422 | # debug one is difficult to use. | ||
423 | if buildtype == 'release': | ||
424 | create_dynamic_module( | ||
425 | 'tools/llpython', | ||
426 | '-I/usr/include/python2.3', | ||
427 | ['llmessage', 'llvfs', 'llmath', 'llcommon', | ||
428 | 'boost_python-gcc', 'apr-1']) | ||
429 | env.Command('lib/python/indra/llpython.so', lib_dir + '/tools/libllpython.so', 'cp -u $SOURCE $TARGET') | ||
430 | Default('lib/python/indra/llpython.so') | ||
431 | |||
432 | ################## | ||
433 | # BUILD SERVERS # | ||
434 | ################## | ||
435 | file_suffix = '' | ||
436 | if buildtype == 'debug': | ||
437 | file_suffix = '_debug' | ||
438 | |||
439 | common_external_libs += [ 'pthread' ] | ||
440 | |||
441 | # Chatter test application | ||
442 | external_libs = common_external_libs | ||
443 | internal_libs = [ 'llmessage', 'llvfs', 'llmath', 'llcommon' ] | ||
444 | create_executable('test_apps/chatter/chatter', 'test_apps/chatter', | ||
445 | internal_libs + external_libs) | ||
446 | |||
447 | # Tool to buffer all of standard input to memory. | ||
448 | create_executable('tools/simbin2xml/buffer_file/buffer_file', | ||
449 | 'tools/simbin2xml/buffer_file', "") | ||
450 | |||
451 | # Simstate binary to XML utility. | ||
452 | external_libs = common_external_libs | ||
453 | internal_libs = [ 'llxml', 'llcommon', 'llmath' ] | ||
454 | create_executable('tools/simbin2xml/simbin2xml', 'tools/simbin2xml', | ||
455 | internal_libs + external_libs) | ||
456 | |||
457 | # Launcher | ||
458 | external_libs = common_external_libs | ||
459 | internal_libs = [ 'llmessage', 'llvfs', 'llmath', 'llcommon' ] | ||
460 | create_executable('launcher/launcher' + file_suffix, 'launcher', | ||
461 | internal_libs + external_libs) | ||
462 | |||
463 | # Dataserver | ||
464 | Depends('dataserver/dataserver', 'launcher/launcher' + file_suffix) | ||
465 | external_libs = common_external_libs + ['boost_regex-gcc-mt', 'mysqlclient'] | ||
466 | internal_libs = [ 'llcharacter', 'lldatabase', 'llimage', 'llinventory', | ||
467 | 'llscene', 'llmessage', 'llvfs', 'llxml', 'llcommon', 'llmath' ] | ||
468 | create_executable('dataserver/dataserver' + file_suffix, 'dataserver', | ||
469 | internal_libs + external_libs) | ||
470 | |||
471 | # Spaceserver | ||
472 | Depends('newspace/spaceserver', 'dataserver/dataserver' + file_suffix) | ||
473 | external_libs = common_external_libs + ['expat', 'aprutil-1', 'mysqlclient'] | ||
474 | internal_libs = ['llscene', 'lldatabase', 'llmessage', 'llvfs', | ||
475 | 'llmath', 'llcommon'] | ||
476 | create_executable('newspace/spaceserver' + file_suffix, 'newspace', | ||
477 | internal_libs + external_libs) | ||
478 | |||
479 | # Userserver | ||
480 | Depends('userserver/userserver', 'newspace/spaceserver' + file_suffix) | ||
481 | external_libs = common_external_libs | ||
482 | internal_libs = ['llinventory', 'llscene', 'llmessage', 'llvfs', | ||
483 | 'llxml', 'llmath', 'llcommon'] | ||
484 | create_executable('userserver/userserver' + file_suffix, 'userserver', | ||
485 | internal_libs + external_libs) | ||
486 | |||
487 | # Rpcserver | ||
488 | Depends('rpcserver/rpcserver', 'userserver/userserver' + file_suffix) | ||
489 | external_libs = common_external_libs + ['xmlrpc', 'expat', 'aprutil-1', | ||
490 | 'mysqlclient'] | ||
491 | internal_libs = ['llscene', 'llmessage', 'lldatabase', 'llvfs', | ||
492 | 'llmath', 'llcommon'] | ||
493 | create_executable('rpcserver/rpcserver' + file_suffix, 'rpcserver', | ||
494 | internal_libs + external_libs) | ||
495 | |||
496 | # Mapserver | ||
497 | Depends('mapserver/mapserver', 'rpcserver/rpcserver' + file_suffix) | ||
498 | external_libs = common_external_libs + ['apr-1', 'aprutil-1', 'OSMesa16', 'kdu', | ||
499 | 'boost_regex-gcc-mt', 'iconv', 'jpeg', 'GL', | ||
500 | 'mysqlclient', 'pthread', 'dl'] | ||
501 | internal_libs = ['llrender', 'llwindow', 'llimage', 'lldatabase', 'llprimitive', 'llmessage', 'llkdustatic', | ||
502 | 'llxml', 'llvfs', 'llmath', 'llcommon'] | ||
503 | create_executable('mapserver/mapserver' + file_suffix, 'mapserver', | ||
504 | internal_libs + external_libs) | ||
505 | |||
506 | # Simulator | ||
507 | Depends('newsim/simulator' + file_suffix, 'mapserver/mapserver' + file_suffix) | ||
508 | external_libs = common_external_libs + ['hkdynamics', 'hkgeometry', 'hkmath', 'hkbase', 'hkcollide', 'hkactions', 'apr-1', 'aprutil-1', 'boost_regex-gcc-mt', 'dl', 'kdu', 'mysqlclient', 'iconv'] | ||
509 | internal_libs = [ 'lscript', 'llprimitive', | ||
510 | 'llscene', 'llhavok', 'llinventory', 'llimage', | ||
511 | 'llcharacter', 'llxml', 'lldatabase', 'llkdustatic', | ||
512 | 'llmessage', 'llvfs', 'llmath', 'llcommon' ] | ||
513 | create_executable('newsim/simulator' + file_suffix, 'newsim', | ||
514 | internal_libs + external_libs) | ||
515 | |||
516 | # Test | ||
517 | Depends('test/test', 'newsim/simulator' + file_suffix) | ||
518 | external_libs = common_external_libs + ['mysqlclient'] | ||
519 | internal_libs = [ 'lldatabase', 'llinventory', 'llmessage', 'llxml', | ||
520 | 'llvfs', 'llmath', 'llcommon' ] | ||
521 | create_executable('test/test' + file_suffix, 'test', | ||
522 | internal_libs + external_libs) | ||
523 | |||
524 | # Run test. foo_target is never actually built, so this test always happens. | ||
525 | test_results_file = 'test/test_results' + file_suffix + '.txt' | ||
526 | env.Command('foo_target', 'test/test' + file_suffix, "$SOURCE 1>" | ||
527 | + test_results_file + " 2>&1; " | ||
528 | + "sed -n '/^Total Tests/,$ p' " + test_results_file) | ||
529 | Depends('foo_target', 'test/test' + file_suffix) | ||
530 | Default('foo_target') | ||
531 | |||
532 | ######### | ||
533 | # DONE # | ||
534 | ######### | ||
535 | |||