scons: Revamp how to specify targets to build.
[mesa.git] / src / gallium / targets / graw-xlib / SConscript
index 24cea92f9071098d13ba1dbd2b93aef4096783f5..f7953097872f793127bbc52786935b95c5e48ade 100644 (file)
@@ -3,41 +3,35 @@
 
 Import('*')
 
-if env['platform'] != 'linux':
-    Return()
-
-if not set(('softpipe', 'llvmpipe', 'cell')).intersection(env['drivers']):
-    print 'warning: no supported pipe driver: skipping build of xlib libGL.so'
-    Return()
-
 env = env.Clone()
 
 env.Prepend(LIBS = [
     ws_xlib,
     trace,
+    rbug,
     identity,
 #    gallium,
 ])
 
+env.Prepend(LIBS = env['X11_LIBS'])
+
 env.Append(CPPPATH = [
     '#src/gallium/drivers',
+    '#src/gallium/include/state_tracker',
 ])
 
-
 sources = [
     'graw_xlib.c',
+    graw_util
 ]
 
-if 'softpipe' in env['drivers']:
+if True:
     env.Append(CPPDEFINES = 'GALLIUM_SOFTPIPE')
     env.Prepend(LIBS = [softpipe])
 
-if 'llvmpipe' in env['drivers']:
-    env.Tool('llvm')
-    if 'LLVM_VERSION' in env:
-        env.Append(CPPDEFINES = 'GALLIUM_LLVMPIPE')
-        env.Tool('udis86')
-        env.Prepend(LIBS = [llvmpipe])
+if env['llvm']:
+    env.Append(CPPDEFINES = 'GALLIUM_LLVMPIPE')
+    env.Prepend(LIBS = [llvmpipe])
 
 # Need this for trace, identity drivers referenced by
 # gallium_wrap_screen().
@@ -50,8 +44,6 @@ graw = env.SharedLibrary(
     source = sources,
 )
 
-env.InstallSharedLibrary(graw, version=(1, 0))
-
-graw = env.FindIxes(graw, 'SHLIBPREFIX', 'SHLIBSUFFIX')
+graw = env.InstallSharedLibrary(graw, version=(1, 0))
 
-Export('graw')
+env.Alias('graw-xlib', graw)