gallium: introduce target directory
[mesa.git] / src / gallium / winsys / xlib / SConscript
index 3aef3b6cedddb2e73026fbfeee387553a2a93c07..26a13e42b5c8344e560a720f8510b884b8b20869 100644 (file)
@@ -1,49 +1,29 @@
 #######################################################################
 # SConscript for xlib winsys
 
+
 Import('*')
 
 if env['platform'] == 'linux' \
-        and 'mesa' in env['statetrackers'] \
-        and ('softpipe' or 'i915simple' or 'trace') in env['drivers'] \
-        and not env['dri']:
+        and 'mesa' in env['statetrackers']:
 
     env = env.Clone()
 
     env.Append(CPPPATH = [
-        '#/src/mesa',
-        '#/src/mesa/main',
+        '#/src/gallium/include',
+        '#/src/gallium/auxiliary',
+        '#/src/gallium/drivers',
     ])
 
-    sources = [
-        'glxapi.c',
-        'fakeglx.c',
-        'xfonts.c',
-        'xm_api.c',
-        'xm_winsys.c',
-    ]
-
-    drivers = [];
-        
-    if 'softpipe' in env['drivers']:
-        drivers += [softpipe]
+    env.Append(CPPDEFINES = ['USE_XSHM'])
 
-    if 'i965simple' in env['drivers']:
-        drivers += [i965simple]
-        sources += [
-            'brw_aub.c',
-            'xm_winsys_aub.c',
-            ]
-        
-    if 'trace' in env['drivers']:
-        env.Append(CPPDEFINES = 'GALLIUM_TRACE')
-        drivers += [trace]
-
-    # TODO: write a wrapper function http://www.scons.org/wiki/WrapperFunctions
-    libgl = env.SharedLibrary(
-        target ='GL',
-        source = sources,
-        LIBS = glapi + mesa + drivers + auxiliaries + env['LIBS'],
+    st_xlib = env.ConvenienceLibrary(
+       target = 'ws_xlib',
+       source = [
+               'xlib_cell.c',
+               'xlib_llvmpipe.c',
+               'xlib_softpipe.c',
+               'xlib_sw_winsys.c',
+               ]
     )
-
-    env.InstallSharedLibrary(libgl, version=(1, 5))
+    Export('ws_xlib')