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)
39 toolpath = ['#scons'],
43 # Backwards compatability with old target configuration variable
45 targets = ARGUMENTS['targets']
49 targets = targets.split(',')
50 print 'scons: warning: targets option is deprecated; pass the targets on their own such as'
52 print ' scons %s' % ' '.join(targets)
54 COMMAND_LINE_TARGETS.append(targets)
57 Help(opts.GenerateHelpText(env))
60 #######################################################################
64 env.Prepend(CPPPATH = [
67 env.Append(CPPPATH = [
68 '#/src/gallium/include',
69 '#/src/gallium/auxiliary',
70 '#/src/gallium/drivers',
71 '#/src/gallium/winsys',
75 env.Append(CPPPATH = ['#include/c99'])
78 if env['platform'] == 'embedded':
79 env.Append(CPPDEFINES = [
81 ('_POSIX_C_SOURCE', '199309L'),
95 if env['platform'] in ('posix', 'linux', 'freebsd', 'darwin'):
96 env.Append(CPPDEFINES = [
98 ('_POSIX_C_SOURCE', '199309L'),
103 'HAVE_POSIX_MEMALIGN',
106 env.Append(CFLAGS = ['-fvisibility=hidden'])
107 if env['platform'] == 'darwin':
108 env.Append(CPPDEFINES = ['_DARWIN_C_SOURCE'])
121 #######################################################################
124 # TODO: Build several variants at the same time?
125 # http://www.scons.org/wiki/SimultaneousVariantBuilds
129 variant_dir = env['build_dir'],
130 duplicate = 0 # http://www.scons.org/doc/0.97/HTML/scons-user/x2261.html