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