swrastg: Build with scons
authorJakob Bornecrantz <wallbraker@gmail.com>
Fri, 26 Mar 2010 13:45:36 +0000 (14:45 +0100)
committerJakob Bornecrantz <wallbraker@gmail.com>
Fri, 26 Mar 2010 13:48:36 +0000 (14:48 +0100)
src/gallium/state_trackers/dri/SConscript
src/gallium/state_trackers/dri/sw/SConscript [new file with mode: 0644]
src/gallium/targets/SConscript.dri
src/gallium/targets/dri-swrast/SConscript [new file with mode: 0644]
src/gallium/winsys/SConscript
src/gallium/winsys/sw/dri/SConscript [new file with mode: 0644]

index b4a276cf29df704c7c6bcdff597bc78d4c8beefb..aba60fb8c5bb324044ce652f2dd2691d1b4d7f19 100644 (file)
@@ -1,5 +1,6 @@
 Import('*')
 
 SConscript([
+       'sw/SConscript',
        'drm/SConscript',
 ])
diff --git a/src/gallium/state_trackers/dri/sw/SConscript b/src/gallium/state_trackers/dri/sw/SConscript
new file mode 100644 (file)
index 0000000..0614b8f
--- /dev/null
@@ -0,0 +1,29 @@
+#######################################################################
+# SConscript for dri state_tracker
+
+Import('*')
+
+if env['dri']:
+
+    env = env.Clone()
+
+    env.Append(CPPPATH = [
+        '#/src/mesa',
+       '#/src/gallium/state_trackers/dri/common',
+       '#/src/mesa/drivers/dri/common',
+    ])
+
+    env.Append(CPPDEFINES = [('__NOT_HAVE_DRM_H', '1')])
+
+    st_drisw = env.ConvenienceLibrary(
+       target = 'st_drisw',
+       source = [ 'dri_context.c',
+               'dri_drawable.c',
+               'dri_extensions.c',
+               'dri_screen.c',
+               'dri_st_api.c',
+               'dri1_helper.c',
+               'drisw.c',
+               ]
+    )
+    Export('st_drisw')
index 621924058079d62856f590fe6a8e2afdd57c8069..210af13720a7bf4c6d0de13e873dab6520bd32ed 100644 (file)
@@ -46,6 +46,18 @@ dri_common_dri_util = drienv.SharedObject(
        source = '#src/mesa/drivers/dri/common/dri_util.c'
 )
 
+dri_common_drisw_util = drienv.SharedObject(
+       target = 'drisw_util.o',
+       source = '#src/mesa/drivers/dri/common/drisw_util.c'
+)
+
+
+COMMON_DRI_SW_OBJECTS = [
+       dri_common_utils,
+       dri_common_xmlconfig,
+       dri_common_drisw_util,
+]
+
 COMMON_DRI_DRM_OBJECTS = [
        dri_common_utils,
        dri_common_xmlconfig,
@@ -55,9 +67,14 @@ COMMON_DRI_DRM_OBJECTS = [
 
 Export([
        'drienv',
+       'COMMON_DRI_SW_OBJECTS',
        'COMMON_DRI_DRM_OBJECTS',
 ])
 
+SConscript([
+       'dri-swrast/SConscript',
+])
+
 if 'vmware' in env['winsys']:
        SConscript([
                'dri-vmwgfx/SConscript',
diff --git a/src/gallium/targets/dri-swrast/SConscript b/src/gallium/targets/dri-swrast/SConscript
new file mode 100644 (file)
index 0000000..e9f742c
--- /dev/null
@@ -0,0 +1,32 @@
+Import('*')
+
+if not 'softpipe' in env['drivers']:
+    print 'warning: softpipe driver not built skipping swrastg_dri.so'
+    Return()
+
+env = drienv.Clone()
+
+env.Append(CPPPATH = [
+    '#/src/gallium/winsys/sw/dri',
+])
+
+env.Prepend(LIBS = [
+    st_drisw,
+    ws_dri,
+    softpipe,
+    trace,
+    mesa,
+    glsl,
+    gallium,
+    COMMON_DRI_SW_OBJECTS
+])
+
+swrastg_sources = [
+    'swrast_drm_api.c'
+]
+
+env.LoadableModule(
+    target ='swrastg_dri.so',
+    source = swrastg_sources,
+    SHLIBPREFIX = '',
+)
index 3e7052c0e6f4484d5cb09c6c37a18472ec7709ca..2013ee97c1c37751b66a5d5efd4c877dc79f1b93 100644 (file)
@@ -11,6 +11,10 @@ if 'gdi' in env['winsys']:
        ])
 
 if env['dri']:
+       SConscript([
+               'sw/dri/SConscript',
+       ])
+
        if 'vmware' in env['winsys']:
                SConscript([
                        'svga/drm/SConscript',
diff --git a/src/gallium/winsys/sw/dri/SConscript b/src/gallium/winsys/sw/dri/SConscript
new file mode 100644 (file)
index 0000000..b255d72
--- /dev/null
@@ -0,0 +1,23 @@
+#######################################################################
+# SConscript for xlib winsys
+
+
+Import('*')
+
+if env['platform'] == 'linux':
+
+    env = env.Clone()
+
+    env.Append(CPPPATH = [
+        '#/src/gallium/include',
+        '#/src/gallium/auxiliary',
+        '#/src/gallium/drivers',
+    ])
+
+    ws_dri = env.ConvenienceLibrary(
+        target = 'ws_dri',
+        source = [
+           'dri_sw_winsys.c',
+        ]
+    )
+    Export('ws_dri')