blob: f24959c12058187eef137cb49bee6244a7b971c4 [file] [log] [blame]
José Fonsecab04aa712008-06-06 14:48:57 +09001"""gallium
2
3Frontend-tool for Gallium3D architecture.
4
5"""
6
José Fonseca381e3482008-07-17 11:23:43 +09007#
José Fonsecab04aa712008-06-06 14:48:57 +09008# Copyright 2008 Tungsten Graphics, Inc., Cedar Park, Texas.
9# All Rights Reserved.
José Fonseca381e3482008-07-17 11:23:43 +090010#
José Fonsecab04aa712008-06-06 14:48:57 +090011# Permission is hereby granted, free of charge, to any person obtaining a
12# copy of this software and associated documentation files (the
13# "Software"), to deal in the Software without restriction, including
14# without limitation the rights to use, copy, modify, merge, publish,
15# distribute, sub license, and/or sell copies of the Software, and to
16# permit persons to whom the Software is furnished to do so, subject to
17# the following conditions:
José Fonseca381e3482008-07-17 11:23:43 +090018#
José Fonsecab04aa712008-06-06 14:48:57 +090019# The above copyright notice and this permission notice (including the
20# next paragraph) shall be included in all copies or substantial portions
21# of the Software.
José Fonseca381e3482008-07-17 11:23:43 +090022#
José Fonsecab04aa712008-06-06 14:48:57 +090023# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
24# OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
25# MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT.
26# IN NO EVENT SHALL TUNGSTEN GRAPHICS AND/OR ITS SUPPLIERS BE LIABLE FOR
27# ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
28# TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
29# SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
José Fonseca381e3482008-07-17 11:23:43 +090030#
José Fonsecab04aa712008-06-06 14:48:57 +090031
32
José Fonseca27d8d6f2008-07-03 12:42:23 +090033import os
José Fonsecab04aa712008-06-06 14:48:57 +090034import os.path
José Fonseca27d8d6f2008-07-03 12:42:23 +090035import re
José Fonsecab04aa712008-06-06 14:48:57 +090036
37import SCons.Action
38import SCons.Builder
José Fonseca27d8d6f2008-07-03 12:42:23 +090039import SCons.Scanner
José Fonsecab04aa712008-06-06 14:48:57 +090040
José Fonseca27d8d6f2008-07-03 12:42:23 +090041
José Fonseca52c2dd12008-09-08 07:54:15 +090042def symlink(target, source, env):
43 target = str(target[0])
44 source = str(source[0])
45 if os.path.islink(target) or os.path.exists(target):
46 os.remove(target)
47 os.symlink(os.path.basename(source), target)
48
José Fonsecab5a408b2009-12-23 15:21:56 +000049def install_program(env, source):
50 source = str(source[0])
51 target_dir = os.path.join(env.Dir('#.').srcnode().abspath, env['build'], 'bin')
52 target_name = str(source)
53 env.InstallAs(os.path.join(target_dir, target_name), source)
54
José Fonseca52c2dd12008-09-08 07:54:15 +090055def install_shared_library(env, source, version = ()):
56 source = str(source[0])
57 version = tuple(map(str, version))
José Fonseca7cfc2942008-09-08 21:50:50 +090058 target_dir = os.path.join(env.Dir('#.').srcnode().abspath, env['build'], 'lib')
José Fonseca52c2dd12008-09-08 07:54:15 +090059 target_name = '.'.join((str(source),) + version)
60 last = env.InstallAs(os.path.join(target_dir, target_name), source)
61 while len(version):
62 version = version[:-1]
63 target_name = '.'.join((str(source),) + version)
64 action = SCons.Action.Action(symlink, "$TARGET -> $SOURCE")
José Fonseca52c2dd12008-09-08 07:54:15 +090065 last = env.Command(os.path.join(target_dir, target_name), last, action)
66
67def createInstallMethods(env):
José Fonsecab5a408b2009-12-23 15:21:56 +000068 env.AddMethod(install_program, 'InstallProgram')
José Fonseca52c2dd12008-09-08 07:54:15 +090069 env.AddMethod(install_shared_library, 'InstallSharedLibrary')
70
71
José Fonseca1e8177e2009-02-10 18:11:56 +000072def num_jobs():
73 try:
74 return int(os.environ['NUMBER_OF_PROCESSORS'])
75 except (ValueError, KeyError):
76 pass
77
78 try:
79 return os.sysconf('SC_NPROCESSORS_ONLN')
80 except (ValueError, OSError, AttributeError):
81 pass
82
83 try:
84 return int(os.popen2("sysctl -n hw.ncpu")[1].read())
85 except ValueError:
86 pass
87
88 return 1
89
90
José Fonsecab04aa712008-06-06 14:48:57 +090091def generate(env):
José Fonseca381e3482008-07-17 11:23:43 +090092 """Common environment generation code"""
José Fonsecab04aa712008-06-06 14:48:57 +090093
José Fonseca6cf59e12008-11-18 19:13:32 +090094 # Toolchain
95 platform = env['platform']
96 if env['toolchain'] == 'default':
97 if platform == 'winddk':
Michal Krol4f3dcf32008-11-19 20:31:38 +010098 env['toolchain'] = 'winddk'
José Fonseca6cf59e12008-11-18 19:13:32 +090099 elif platform == 'wince':
Michal Krol4f3dcf32008-11-19 20:31:38 +0100100 env['toolchain'] = 'wcesdk'
José Fonseca6cf59e12008-11-18 19:13:32 +0900101 env.Tool(env['toolchain'])
102
José Fonseca26e27ba2009-03-25 19:24:16 +0000103 env['gcc'] = 'gcc' in os.path.basename(env['CC']).split('-')
104 env['msvc'] = env['CC'] == 'cl'
105
José Fonseca381e3482008-07-17 11:23:43 +0900106 # shortcuts
107 debug = env['debug']
108 machine = env['machine']
109 platform = env['platform']
110 x86 = env['machine'] == 'x86'
Michel Dänzer6b69e3c2008-10-23 10:28:48 +0200111 ppc = env['machine'] == 'ppc'
José Fonseca26e27ba2009-03-25 19:24:16 +0000112 gcc = env['gcc']
113 msvc = env['msvc']
José Fonsecab04aa712008-06-06 14:48:57 +0900114
José Fonseca381e3482008-07-17 11:23:43 +0900115 # Put build output in a separate dir, which depends on the current
116 # configuration. See also http://www.scons.org/wiki/AdvancedBuildExample
117 build_topdir = 'build'
118 build_subdir = env['platform']
José Fonseca381e3482008-07-17 11:23:43 +0900119 if env['llvm']:
120 build_subdir += "-llvm"
121 if env['machine'] != 'generic':
122 build_subdir += '-' + env['machine']
123 if env['debug']:
124 build_subdir += "-debug"
125 if env['profile']:
126 build_subdir += "-profile"
127 build_dir = os.path.join(build_topdir, build_subdir)
128 # Place the .sconsign file in the build dir too, to avoid issues with
129 # different scons versions building the same source file
130 env['build'] = build_dir
131 env.SConsignFile(os.path.join(build_dir, '.sconsign'))
José Fonseca18170bb2009-01-23 21:01:16 +0000132 env.CacheDir('build/cache')
José Fonseca8b755262009-12-25 17:39:47 +0000133 env['CONFIGUREDIR'] = os.path.join(build_dir, 'conf')
134 env['CONFIGURELOG'] = os.path.join(os.path.abspath(build_dir), 'config.log')
José Fonsecab04aa712008-06-06 14:48:57 +0900135
José Fonseca1e8177e2009-02-10 18:11:56 +0000136 # Parallel build
137 if env.GetOption('num_jobs') <= 1:
138 env.SetOption('num_jobs', num_jobs())
139
José Fonseca381e3482008-07-17 11:23:43 +0900140 # C preprocessor options
141 cppdefines = []
142 if debug:
143 cppdefines += ['DEBUG']
144 else:
145 cppdefines += ['NDEBUG']
146 if env['profile']:
147 cppdefines += ['PROFILE']
148 if platform == 'windows':
149 cppdefines += [
150 'WIN32',
151 '_WINDOWS',
José Fonseca42be0102009-01-22 14:26:30 +0000152 #'_UNICODE',
153 #'UNICODE',
José Fonseca129c6ed2008-12-01 11:53:26 -0800154 ('_WIN32_WINNT', '0x0501'), # minimum required OS version
155 ('WINVER', '0x0501'),
José Fonseca381e3482008-07-17 11:23:43 +0900156 ]
José Fonseca71793e0f2009-04-14 21:39:54 +0100157 if msvc and env['toolchain'] != 'winddk':
José Fonsecab3e03ed2009-03-25 19:32:54 +0000158 cppdefines += [
159 'VC_EXTRALEAN',
José Fonsecaad0975f2009-10-26 15:11:11 +0000160 '_USE_MATH_DEFINES',
José Fonseca1acd8912009-10-21 17:03:52 +0100161 '_CRT_SECURE_NO_WARNINGS',
José Fonsecab3e03ed2009-03-25 19:32:54 +0000162 '_CRT_SECURE_NO_DEPRECATE',
José Fonseca1acd8912009-10-21 17:03:52 +0100163 '_SCL_SECURE_NO_WARNINGS',
164 '_SCL_SECURE_NO_DEPRECATE',
José Fonsecab3e03ed2009-03-25 19:32:54 +0000165 ]
José Fonseca381e3482008-07-17 11:23:43 +0900166 if debug:
167 cppdefines += ['_DEBUG']
José Fonseca71793e0f2009-04-14 21:39:54 +0100168 if env['toolchain'] == 'winddk':
José Fonseca381e3482008-07-17 11:23:43 +0900169 # Mimic WINDDK's builtin flags. See also:
170 # - WINDDK's bin/makefile.new i386mk.inc for more info.
171 # - buildchk_wxp_x86.log files, generated by the WINDDK's build
172 # - http://alter.org.ua/docs/nt_kernel/vc8_proj/
José Fonseca71793e0f2009-04-14 21:39:54 +0100173 if machine == 'x86':
174 cppdefines += ['_X86_', 'i386']
175 if machine == 'x86_64':
176 cppdefines += ['_AMD64_', 'AMD64']
177 if platform == 'winddk':
José Fonseca381e3482008-07-17 11:23:43 +0900178 cppdefines += [
José Fonseca381e3482008-07-17 11:23:43 +0900179 'STD_CALL',
180 ('CONDITION_HANDLING', '1'),
181 ('NT_INST', '0'),
182 ('WIN32', '100'),
183 ('_NT1X_', '100'),
184 ('WINNT', '1'),
185 ('_WIN32_WINNT', '0x0501'), # minimum required OS version
186 ('WINVER', '0x0501'),
187 ('_WIN32_IE', '0x0603'),
188 ('WIN32_LEAN_AND_MEAN', '1'),
189 ('DEVL', '1'),
190 ('__BUILDMACHINE__', 'WinDDK'),
191 ('FPO', '0'),
192 ]
193 if debug:
194 cppdefines += [('DBG', 1)]
195 if platform == 'wince':
196 cppdefines += [
197 '_CRT_SECURE_NO_DEPRECATE',
198 '_USE_32BIT_TIME_T',
199 'UNICODE',
200 '_UNICODE',
201 ('UNDER_CE', '600'),
202 ('_WIN32_WCE', '0x600'),
203 'WINCEOEM',
204 'WINCEINTERNAL',
205 'WIN32',
206 'STRICT',
207 'x86',
208 '_X86_',
209 'INTERNATIONAL',
210 ('INTLMSG_CODEPAGE', '1252'),
211 ]
212 if platform == 'windows':
213 cppdefines += ['PIPE_SUBSYSTEM_WINDOWS_USER']
214 if platform == 'winddk':
215 cppdefines += ['PIPE_SUBSYSTEM_WINDOWS_DISPLAY']
216 if platform == 'wince':
217 cppdefines += ['PIPE_SUBSYSTEM_WINDOWS_CE']
José Fonseca40b3bb02008-11-04 10:53:02 +0900218 cppdefines += ['PIPE_SUBSYSTEM_WINDOWS_CE_OGL']
José Fonseca381e3482008-07-17 11:23:43 +0900219 env.Append(CPPDEFINES = cppdefines)
José Fonsecab04aa712008-06-06 14:48:57 +0900220
José Fonseca381e3482008-07-17 11:23:43 +0900221 # C compiler options
José Fonseca25f6c932009-06-26 19:50:12 +0100222 cflags = [] # C
223 cxxflags = [] # C++
224 ccflags = [] # C & C++
José Fonseca381e3482008-07-17 11:23:43 +0900225 if gcc:
226 if debug:
José Fonseca25f6c932009-06-26 19:50:12 +0100227 ccflags += ['-O0', '-g3']
José Fonsecabb8f3092009-06-28 11:12:22 +0100228 elif env['CCVERSION'].startswith('4.2.'):
229 # gcc 4.2.x optimizer is broken
230 print "warning: gcc 4.2.x optimizer is broken -- disabling optimizations"
231 ccflags += ['-O0', '-g3']
José Fonseca381e3482008-07-17 11:23:43 +0900232 else:
José Fonseca25f6c932009-06-26 19:50:12 +0100233 ccflags += ['-O3', '-g3']
José Fonseca381e3482008-07-17 11:23:43 +0900234 if env['profile']:
José Fonseca1a9eec82009-09-20 18:07:16 +0100235 # See http://code.google.com/p/jrfonseca/wiki/Gprof2Dot#Which_options_should_I_pass_to_gcc_when_compiling_for_profiling?
236 ccflags += [
237 '-fno-omit-frame-pointer',
238 '-fno-optimize-sibling-calls',
239 ]
José Fonseca381e3482008-07-17 11:23:43 +0900240 if env['machine'] == 'x86':
José Fonseca25f6c932009-06-26 19:50:12 +0100241 ccflags += [
José Fonseca381e3482008-07-17 11:23:43 +0900242 '-m32',
243 #'-march=pentium4',
José Fonseca381e3482008-07-17 11:23:43 +0900244 #'-mfpmath=sse',
245 ]
José Fonseca5ba645f2009-10-14 16:16:40 +0100246 if platform != 'windows':
247 # XXX: -mstackrealign causes stack corruption on MinGW. Ditto
248 # for -mincoming-stack-boundary=2. Still enable it on other
249 # platforms for now, but we can't rely on it for cross platform
250 # code. We have to use __attribute__((force_align_arg_pointer))
251 # instead.
252 ccflags += [
253 '-mmmx', '-msse', '-msse2', # enable SIMD intrinsics
254 '-mstackrealign', # ensure stack is aligned
255 ]
José Fonseca381e3482008-07-17 11:23:43 +0900256 if env['machine'] == 'x86_64':
José Fonseca25f6c932009-06-26 19:50:12 +0100257 ccflags += ['-m64']
José Fonseca102cb5c2009-03-13 16:21:30 +0000258 # See also:
259 # - http://gcc.gnu.org/onlinedocs/gcc/Warning-Options.html
José Fonseca25f6c932009-06-26 19:50:12 +0100260 ccflags += [
José Fonseca381e3482008-07-17 11:23:43 +0900261 '-Wall',
José Fonseca102cb5c2009-03-13 16:21:30 +0000262 '-Wmissing-field-initializers',
José Fonseca2348f6d2009-11-27 16:01:36 +0000263 '-Werror=pointer-arith',
José Fonseca381e3482008-07-17 11:23:43 +0900264 '-Wno-long-long',
265 '-ffast-math',
José Fonseca381e3482008-07-17 11:23:43 +0900266 '-fmessage-length=0', # be nice to Eclipse
267 ]
José Fonseca25f6c932009-06-26 19:50:12 +0100268 cflags += [
269 '-Werror=declaration-after-statement',
270 '-Wmissing-prototypes',
271 '-std=gnu99',
272 ]
José Fonseca381e3482008-07-17 11:23:43 +0900273 if msvc:
274 # See also:
José Fonsecaa6c72582008-09-01 09:47:40 +0900275 # - http://msdn.microsoft.com/en-us/library/19z1t1wy.aspx
José Fonseca381e3482008-07-17 11:23:43 +0900276 # - cl /?
277 if debug:
José Fonseca25f6c932009-06-26 19:50:12 +0100278 ccflags += [
José Fonseca381e3482008-07-17 11:23:43 +0900279 '/Od', # disable optimizations
280 '/Oi', # enable intrinsic functions
281 '/Oy-', # disable frame pointer omission
José Fonseca73ccabc2009-02-12 11:57:45 +0000282 '/GL-', # disable whole program optimization
José Fonseca381e3482008-07-17 11:23:43 +0900283 ]
284 else:
José Fonseca25f6c932009-06-26 19:50:12 +0100285 ccflags += [
José Fonseca78dad272009-06-04 10:34:02 -0700286 '/O2', # optimize for speed
José Fonsecada3bc492009-12-11 15:16:22 +0000287 '/GL', # enable whole program optimization
José Fonseca381e3482008-07-17 11:23:43 +0900288 ]
José Fonseca25f6c932009-06-26 19:50:12 +0100289 ccflags += [
José Fonsecada3bc492009-12-11 15:16:22 +0000290 '/fp:fast', # fast floating point
José Fonseca381e3482008-07-17 11:23:43 +0900291 '/W3', # warning level
292 #'/Wp64', # enable 64 bit porting warnings
293 ]
José Fonsecaa6c72582008-09-01 09:47:40 +0900294 if env['machine'] == 'x86':
José Fonseca25f6c932009-06-26 19:50:12 +0100295 ccflags += [
José Fonsecaa6c72582008-09-01 09:47:40 +0900296 #'/arch:SSE2', # use the SSE2 instructions
297 ]
José Fonseca381e3482008-07-17 11:23:43 +0900298 if platform == 'windows':
José Fonseca25f6c932009-06-26 19:50:12 +0100299 ccflags += [
José Fonseca381e3482008-07-17 11:23:43 +0900300 # TODO
301 ]
302 if platform == 'winddk':
José Fonseca25f6c932009-06-26 19:50:12 +0100303 ccflags += [
José Fonseca381e3482008-07-17 11:23:43 +0900304 '/Zl', # omit default library name in .OBJ
305 '/Zp8', # 8bytes struct member alignment
306 '/Gy', # separate functions for linker
307 '/Gm-', # disable minimal rebuild
308 '/WX', # treat warnings as errors
309 '/Gz', # __stdcall Calling convention
310 '/GX-', # disable C++ EH
311 '/GR-', # disable C++ RTTI
312 '/GF', # enable read-only string pooling
313 '/G6', # optimize for PPro, P-II, P-III
314 '/Ze', # enable extensions
315 '/Gi-', # disable incremental compilation
316 '/QIfdiv-', # disable Pentium FDIV fix
317 '/hotpatch', # prepares an image for hotpatching.
318 #'/Z7', #enable old-style debug info
319 ]
320 if platform == 'wince':
321 # See also C:\WINCE600\public\common\oak\misc\makefile.def
José Fonseca25f6c932009-06-26 19:50:12 +0100322 ccflags += [
José Fonseca381e3482008-07-17 11:23:43 +0900323 '/Zl', # omit default library name in .OBJ
324 '/GF', # enable read-only string pooling
325 '/GR-', # disable C++ RTTI
326 '/GS', # enable security checks
327 # Allow disabling language conformance to maintain backward compat
328 #'/Zc:wchar_t-', # don't force wchar_t as native type, instead of typedef
329 #'/Zc:forScope-', # don't enforce Standard C++ for scoping rules
330 #'/wd4867',
331 #'/wd4430',
332 #'/MT',
333 #'/U_MT',
334 ]
335 # Automatic pdb generation
336 # See http://scons.tigris.org/issues/show_bug.cgi?id=1656
337 env.EnsureSConsVersion(0, 98, 0)
338 env['PDB'] = '${TARGET.base}.pdb'
José Fonseca25f6c932009-06-26 19:50:12 +0100339 env.Append(CCFLAGS = ccflags)
José Fonseca381e3482008-07-17 11:23:43 +0900340 env.Append(CFLAGS = cflags)
José Fonseca25f6c932009-06-26 19:50:12 +0100341 env.Append(CXXFLAGS = cxxflags)
José Fonsecab04aa712008-06-06 14:48:57 +0900342
José Fonseca1781d7f2009-01-06 16:16:38 +0000343 if env['platform'] == 'windows' and msvc:
344 # Choose the appropriate MSVC CRT
345 # http://msdn.microsoft.com/en-us/library/2kzt1wy3.aspx
346 if env['debug']:
347 env.Append(CCFLAGS = ['/MTd'])
348 env.Append(SHCCFLAGS = ['/LDd'])
349 else:
350 env.Append(CCFLAGS = ['/MT'])
351 env.Append(SHCCFLAGS = ['/LD'])
352
José Fonseca381e3482008-07-17 11:23:43 +0900353 # Assembler options
354 if gcc:
355 if env['machine'] == 'x86':
356 env.Append(ASFLAGS = ['-m32'])
357 if env['machine'] == 'x86_64':
358 env.Append(ASFLAGS = ['-m64'])
José Fonseca27d8d6f2008-07-03 12:42:23 +0900359
José Fonseca381e3482008-07-17 11:23:43 +0900360 # Linker options
361 linkflags = []
José Fonseca72ad0392009-06-28 10:54:23 +0100362 shlinkflags = []
José Fonseca381e3482008-07-17 11:23:43 +0900363 if gcc:
364 if env['machine'] == 'x86':
365 linkflags += ['-m32']
366 if env['machine'] == 'x86_64':
367 linkflags += ['-m64']
José Fonseca72ad0392009-06-28 10:54:23 +0100368 shlinkflags += [
369 '-Wl,-Bsymbolic',
370 ]
José Fonseca7b391942009-08-13 16:32:51 +0100371 # Handle circular dependencies in the libraries
372 env['_LIBFLAGS'] = '-Wl,--start-group ' + env['_LIBFLAGS'] + ' -Wl,--end-group'
José Fonsecada3bc492009-12-11 15:16:22 +0000373 if msvc:
374 if not env['debug']:
375 # enable Link-time Code Generation
376 linkflags += ['/LTCG']
377 env.Append(ARFLAGS = ['/LTCG'])
José Fonseca6fe421c2009-02-12 12:59:58 +0000378 if platform == 'windows' and msvc:
José Fonseca381e3482008-07-17 11:23:43 +0900379 # See also:
380 # - http://msdn2.microsoft.com/en-us/library/y0zzbyt4.aspx
381 linkflags += [
José Fonseca73ccabc2009-02-12 11:57:45 +0000382 '/fixed:no',
383 '/incremental:no',
384 ]
385 if platform == 'winddk':
386 linkflags += [
José Fonseca381e3482008-07-17 11:23:43 +0900387 '/merge:_PAGE=PAGE',
388 '/merge:_TEXT=.text',
389 '/section:INIT,d',
390 '/opt:ref',
391 '/opt:icf',
392 '/ignore:4198,4010,4037,4039,4065,4070,4078,4087,4089,4221',
393 '/incremental:no',
394 '/fullbuild',
395 '/release',
396 '/nodefaultlib',
397 '/wx',
398 '/debug',
399 '/debugtype:cv',
400 '/version:5.1',
401 '/osversion:5.1',
402 '/functionpadmin:5',
403 '/safeseh',
404 '/pdbcompress',
405 '/stack:0x40000,0x1000',
406 '/driver',
407 '/align:0x80',
408 '/subsystem:native,5.01',
409 '/base:0x10000',
410
411 '/entry:DrvEnableDriver',
412 ]
José Fonseca46728032009-02-18 15:05:23 +0000413 if env['debug'] or env['profile']:
José Fonseca381e3482008-07-17 11:23:43 +0900414 linkflags += [
415 '/MAP', # http://msdn.microsoft.com/en-us/library/k7xkk3e2.aspx
416 ]
417 if platform == 'wince':
418 linkflags += [
419 '/nodefaultlib',
420 #'/incremental:no',
421 #'/fullbuild',
422 '/entry:_DllMainCRTStartup',
423 ]
424 env.Append(LINKFLAGS = linkflags)
José Fonseca72ad0392009-06-28 10:54:23 +0100425 env.Append(SHLINKFLAGS = shlinkflags)
José Fonseca381e3482008-07-17 11:23:43 +0900426
José Fonsecac76787a2008-07-17 11:25:20 +0900427 # Default libs
428 env.Append(LIBS = [])
429
José Fonseca381e3482008-07-17 11:23:43 +0900430 # Custom builders and methods
José Fonseca97e2c5a2009-12-31 17:58:56 +0000431 env.Tool('custom')
José Fonseca52c2dd12008-09-08 07:54:15 +0900432 createInstallMethods(env)
José Fonseca381e3482008-07-17 11:23:43 +0900433
434 # for debugging
435 #print env.Dump()
José Fonsecab04aa712008-06-06 14:48:57 +0900436
437
438def exists(env):
José Fonseca381e3482008-07-17 11:23:43 +0900439 return 1