aboutsummaryrefslogtreecommitdiff
path: root/mesalib/scons
diff options
context:
space:
mode:
Diffstat (limited to 'mesalib/scons')
-rw-r--r--mesalib/scons/custom.py4
-rw-r--r--mesalib/scons/gallium.py4
-rw-r--r--mesalib/scons/source_list.py5
3 files changed, 12 insertions, 1 deletions
diff --git a/mesalib/scons/custom.py b/mesalib/scons/custom.py
index cc953bd99..43e7727aa 100644
--- a/mesalib/scons/custom.py
+++ b/mesalib/scons/custom.py
@@ -235,6 +235,10 @@ def parse_source_list(env, filename, names=None):
# parse the source list file
parser = source_list.SourceListParser()
src = env.File(filename).srcnode()
+
+ parser.add_symbol('top_srcdir', env.Dir('#').abspath)
+ parser.add_symbol('top_builddir', env['build_dir'])
+
sym_table = parser.parse(src.abspath)
if names:
diff --git a/mesalib/scons/gallium.py b/mesalib/scons/gallium.py
index f4776d83d..8fc17b3fa 100644
--- a/mesalib/scons/gallium.py
+++ b/mesalib/scons/gallium.py
@@ -298,6 +298,10 @@ def generate(env):
cppdefines += ['BEOS_THREADS']
if env['embedded']:
cppdefines += ['PIPE_SUBSYSTEM_EMBEDDED']
+ if env['texture_float']:
+ print 'warning: Floating-point textures enabled.'
+ print 'warning: Please consult docs/patents.txt with your lawyer before building Mesa.'
+ cppdefines += ['TEXTURE_FLOAT_ENABLED']
env.Append(CPPDEFINES = cppdefines)
# C compiler options
diff --git a/mesalib/scons/source_list.py b/mesalib/scons/source_list.py
index 8111f4318..e16d1f9b6 100644
--- a/mesalib/scons/source_list.py
+++ b/mesalib/scons/source_list.py
@@ -13,6 +13,7 @@ The goal is to allow Makefile's and SConscript's to share source listing.
class SourceListParser(object):
def __init__(self):
+ self.symbol_table = {}
self._reset()
def _reset(self, filename=None):
@@ -20,7 +21,6 @@ class SourceListParser(object):
self.line_no = 1
self.line_cont = ''
- self.symbol_table = {}
def _error(self, msg):
raise RuntimeError('%s:%d: %s' % (self.filename, self.line_no, msg))
@@ -125,3 +125,6 @@ class SourceListParser(object):
raise
return self.symbol_table
+
+ def add_symbol(self, name, value):
+ self.symbol_table[name] = value