mesa: Move texenvprogram.c to ff_fragment_shader.cpp.
[mesa.git] / SConstruct
index a2c20471f7a446455fb4923ef9130abf3f8dceb0..8607d2cd8e0ab726039d02202e067c158ae75ff4 100644 (file)
@@ -121,8 +121,6 @@ if env['platform'] in ('posix', 'linux', 'freebsd', 'darwin'):
 # for debugging
 #print env.Dump()
 
-Export('env')
-
 
 #######################################################################
 # Invoke host SConscripts 
@@ -132,7 +130,7 @@ Export('env')
 #
 
 # Create host environent
-if env['platform'] != common.host_platform:
+if env['crosscompile'] and env['platform'] != 'embedded':
     host_env = Environment(
         options = opts,
         # no tool used
@@ -149,13 +147,25 @@ if env['platform'] != common.host_platform:
 
     host_env.Tool('gallium')
 
+    host_env['hostonly'] = True
+    assert host_env['crosscompile'] == False
+
+    if host_env['msvc']:
+        host_env.Append(CPPPATH = ['#include/c99'])
+
+    target_env = env
+    env = host_env
+    Export('env')
+
     SConscript(
-        'src/glsl/SConscript',
+        'src/SConscript',
         variant_dir = host_env['build_dir'],
         duplicate = 0, # http://www.scons.org/doc/0.97/HTML/scons-user/x2261.html
-        exports={'env':host_env},
     )
 
+    env = target_env
+
+Export('env')
 
 #######################################################################
 # Invoke SConscripts