1 #######################################################################
4 # For example, invoke scons as
6 # scons build=debug llvm=yes machine=x86
8 # to set configuration variables. Or you can write those options to a file
20 # to get the full list of options. See scons manpage for more info.
30 #######################################################################
31 # Configuration options
33 opts
= Variables('config.py')
34 common
.AddOptions(opts
)
35 opts
.Add(EnumVariable('MSVS_VERSION', 'MS Visual C++ version', None, allowed_values
=('7.1', '8.0', '9.0')))
40 toolpath
= ['#scons'],
44 # Backwards compatability with old target configuration variable
46 targets
= ARGUMENTS
['targets']
50 targets
= targets
.split(',')
51 print 'scons: warning: targets option is deprecated; pass the targets on their own such as'
53 print ' scons %s' % ' '.join(targets
)
55 COMMAND_LINE_TARGETS
.append(targets
)
58 Help(opts
.GenerateHelpText(env
))
61 #######################################################################
65 env
.Prepend(CPPPATH
= [
68 env
.Append(CPPPATH
= [
69 '#/src/gallium/include',
70 '#/src/gallium/auxiliary',
71 '#/src/gallium/drivers',
72 '#/src/gallium/winsys',
76 env
.Append(CPPPATH
= ['#include/c99'])
79 if env
['platform'] == 'embedded':
80 env
.Append(CPPDEFINES
= [
82 ('_POSIX_C_SOURCE', '199309L'),
96 if env
['platform'] in ('posix', 'linux', 'freebsd', 'darwin'):
97 env
.Append(CPPDEFINES
= [
99 ('_POSIX_C_SOURCE', '199309L'),
104 'HAVE_POSIX_MEMALIGN',
107 env
.Append(CFLAGS
= ['-fvisibility=hidden'])
108 if env
['platform'] == 'darwin':
109 env
.Append(CPPDEFINES
= ['_DARWIN_C_SOURCE'])
122 #######################################################################
125 # TODO: Build several variants at the same time?
126 # http://www.scons.org/wiki/SimultaneousVariantBuilds
130 variant_dir
= env
['build_dir'],
131 duplicate
= 0 # http://www.scons.org/doc/0.97/HTML/scons-user/x2261.html