summaryrefslogtreecommitdiffstats
path: root/src/gallium/state_trackers
diff options
context:
space:
mode:
Diffstat (limited to 'src/gallium/state_trackers')
-rw-r--r--src/gallium/state_trackers/egl/SConscript53
-rw-r--r--src/gallium/state_trackers/glx/xlib/SConscript38
-rw-r--r--src/gallium/state_trackers/python/SConscript106
-rw-r--r--src/gallium/state_trackers/vega/SConscript81
-rw-r--r--src/gallium/state_trackers/xorg/SConscript63
5 files changed, 173 insertions, 168 deletions
diff --git a/src/gallium/state_trackers/egl/SConscript b/src/gallium/state_trackers/egl/SConscript
index efcce25e317..8d34e47df0e 100644
--- a/src/gallium/state_trackers/egl/SConscript
+++ b/src/gallium/state_trackers/egl/SConscript
@@ -3,34 +3,35 @@
Import('*')
-if 'egl' in env['statetrackers']:
+if env['platform'] != 'windows':
+ Return()
- env = env.Clone()
+env = env.Clone()
- env.Append(CPPPATH = [
- '#/src/egl/main',
- '#/src/gallium/winsys/sw',
- '.',
- ])
- env.Append(CPPDEFINES = [
- 'HAVE_GDI_BACKEND',
- ])
+env.Append(CPPPATH = [
+ '#/src/egl/main',
+ '#/src/gallium/winsys/sw',
+ '.',
+])
+env.Append(CPPDEFINES = [
+ 'HAVE_GDI_BACKEND',
+])
- common_sources = [
- 'common/egl_g3d.c',
- 'common/egl_g3d_api.c',
- 'common/egl_g3d_image.c',
- 'common/egl_g3d_st.c',
- 'common/egl_g3d_sync.c',
- 'common/native_helper.c',
- ]
+common_sources = [
+ 'common/egl_g3d.c',
+ 'common/egl_g3d_api.c',
+ 'common/egl_g3d_image.c',
+ 'common/egl_g3d_st.c',
+ 'common/egl_g3d_sync.c',
+ 'common/native_helper.c',
+]
- gdi_sources = common_sources + [
- 'gdi/native_gdi.c',
- ]
+gdi_sources = common_sources + [
+ 'gdi/native_gdi.c',
+]
- st_egl_gdi = env.ConvenienceLibrary(
- target = 'st_egl_gdi',
- source = gdi_sources,
- )
- Export('st_egl_gdi')
+st_egl_gdi = env.ConvenienceLibrary(
+ target = 'st_egl_gdi',
+ source = gdi_sources,
+)
+Export('st_egl_gdi')
diff --git a/src/gallium/state_trackers/glx/xlib/SConscript b/src/gallium/state_trackers/glx/xlib/SConscript
index 9df351a2769..775000eacce 100644
--- a/src/gallium/state_trackers/glx/xlib/SConscript
+++ b/src/gallium/state_trackers/glx/xlib/SConscript
@@ -3,25 +3,25 @@
Import('*')
-if env['platform'] == 'linux' \
- and 'mesa' in env['statetrackers']:
+if not env['x11']:
+ Return()
- env = env.Clone()
+env = env.Clone()
- env.Append(CPPPATH = [
- '#/src/mapi',
- '#/src/mesa',
- '#/src/mesa/main',
- ])
+env.Append(CPPPATH = [
+ '#/src/mapi',
+ '#/src/mesa',
+ '#/src/mesa/main',
+])
- st_xlib = env.ConvenienceLibrary(
- target = 'st_xlib',
- source = [
- 'glx_api.c',
- 'glx_getproc.c',
- 'glx_usefont.c',
- 'xm_api.c',
- 'xm_st.c',
- ]
- )
- Export('st_xlib')
+st_xlib = env.ConvenienceLibrary(
+target = 'st_xlib',
+source = [
+ 'glx_api.c',
+ 'glx_getproc.c',
+ 'glx_usefont.c',
+ 'xm_api.c',
+ 'xm_st.c',
+ ]
+)
+Export('st_xlib')
diff --git a/src/gallium/state_trackers/python/SConscript b/src/gallium/state_trackers/python/SConscript
index aadeaa0a359..5cb7960f9b5 100644
--- a/src/gallium/state_trackers/python/SConscript
+++ b/src/gallium/state_trackers/python/SConscript
@@ -3,57 +3,61 @@ import os.path
Import('*')
-if 'python' in env['statetrackers']:
-
- env = env.Clone()
-
- env.Tool('python')
-
- env.Tool('swig')
- env.Append(SWIGPATH = ['#src/gallium/include', '#src/gallium/include/pipe'])
- env.Append(SWIGFLAGS = ['-python', '-keyword'])
-
- env.Append(CPPPATH = '.')
-
- if env['platform'] == 'windows':
- env.Append(LIBS = [
- 'opengl32',
- 'gdi32',
- 'user32',
- 'kernel32',
- 'ws2_32',
- ])
- else:
- env.Append(CPPDEFINES = ['GCC_HASCLASSVISIBILITY'])
- env.Append(LIBS = [
- 'GL',
- 'X11',
- ])
-
- sources = [
- 'gallium.i',
- 'st_device.c',
- 'st_sample.c',
- 'st_hardpipe_winsys.c',
- 'st_softpipe_winsys.c',
- ]
-
- env.Prepend(LIBS = [
- ws_null,
- trace,
- gallium,
- ])
+if env['toolchain'] == 'crossmingw':
+ # Cross-compilation not supported
+ Return()
+
+env = env.Clone()
+
+env.Tool('python')
- if env['llvm']:
- env.Append(CPPDEFINES = ['HAVE_LLVMPIPE'])
- env.Prepend(LIBS = [llvmpipe])
- if True:
- env.Append(CPPDEFINES = ['HAVE_SOFTPIPE'])
- env.Prepend(LIBS = [softpipe])
+env.Tool('swig')
+env.Append(SWIGPATH = ['#src/gallium/include', '#src/gallium/include/pipe'])
+env.Append(SWIGFLAGS = ['-python', '-keyword'])
- env['no_import_lib'] = 1
+env.Append(CPPPATH = '.')
+
+if env['platform'] == 'windows':
+ env.Append(LIBS = [
+ 'opengl32',
+ 'gdi32',
+ 'user32',
+ 'kernel32',
+ 'ws2_32',
+ ])
+else:
+ env.Append(CPPDEFINES = ['GCC_HASCLASSVISIBILITY'])
+ env.Append(LIBS = [
+ 'GL',
+ 'X11',
+ ])
- env.SharedLibrary(
- target = '_gallium',
- source = sources,
- )
+sources = [
+ 'gallium.i',
+ 'st_device.c',
+ 'st_sample.c',
+ 'st_hardpipe_winsys.c',
+ 'st_softpipe_winsys.c',
+]
+
+env.Prepend(LIBS = [
+ ws_null,
+ trace,
+ gallium,
+])
+
+if env['llvm']:
+ env.Append(CPPDEFINES = ['HAVE_LLVMPIPE'])
+ env.Prepend(LIBS = [llvmpipe])
+if True:
+ env.Append(CPPDEFINES = ['HAVE_SOFTPIPE'])
+ env.Prepend(LIBS = [softpipe])
+
+env['no_import_lib'] = 1
+
+pyst = env.SharedLibrary(
+ target = '_gallium',
+ source = sources,
+)
+
+env.Alias('python', pyst)
diff --git a/src/gallium/state_trackers/vega/SConscript b/src/gallium/state_trackers/vega/SConscript
index 548053eb646..4c6e18f42b2 100644
--- a/src/gallium/state_trackers/vega/SConscript
+++ b/src/gallium/state_trackers/vega/SConscript
@@ -3,49 +3,48 @@
Import('*')
-if 'egl' in env['statetrackers']:
+env = env.Clone()
- env = env.Clone()
+env.Append(CPPPATH = [
+ '#/src/mapi',
+])
- env.Append(CPPPATH = [
- '#/src/mapi',
- ])
+vega_sources = [
+ 'api.c',
+ 'api_context.c',
+ 'api_filters.c',
+ 'api_images.c',
+ 'api_masks.c',
+ 'api_misc.c',
+ 'api_paint.c',
+ 'api_params.c',
+ 'api_path.c',
+ 'api_text.c',
+ 'api_transform.c',
+ 'vgu.c',
+ 'vg_context.c',
+ 'vg_manager.c',
+ 'vg_state.c',
+ 'vg_translate.c',
+ 'polygon.c',
+ 'bezier.c',
+ 'path.c',
+ 'paint.c',
+ 'arc.c',
+ 'image.c',
+ 'renderer.c',
+ 'stroker.c',
+ 'mask.c',
+ 'shader.c',
+ 'shaders_cache.c',
+]
- vega_sources = [
- 'api.c',
- 'api_context.c',
- 'api_filters.c',
- 'api_images.c',
- 'api_masks.c',
- 'api_misc.c',
- 'api_paint.c',
- 'api_params.c',
- 'api_path.c',
- 'api_text.c',
- 'api_transform.c',
- 'vgu.c',
- 'vg_context.c',
- 'vg_manager.c',
- 'vg_state.c',
- 'vg_translate.c',
- 'polygon.c',
- 'bezier.c',
- 'path.c',
- 'paint.c',
- 'arc.c',
- 'image.c',
- 'renderer.c',
- 'stroker.c',
- 'mask.c',
- 'shader.c',
- 'shaders_cache.c',
- ]
+# vgapi_header must be generated first
+env.Depends(vega_sources, vgapi_header)
- # vgapi_header must be generated first
- env.Depends(vega_sources, vgapi_header)
+st_vega = env.ConvenienceLibrary(
+ target = 'st_vega',
+ source = vega_sources,
+)
- st_vega = env.ConvenienceLibrary(
- target = 'st_vega',
- source = vega_sources,
- )
- Export('st_vega')
+Export('st_vega')
diff --git a/src/gallium/state_trackers/xorg/SConscript b/src/gallium/state_trackers/xorg/SConscript
index 0b598dab6e3..ffaa1c26846 100644
--- a/src/gallium/state_trackers/xorg/SConscript
+++ b/src/gallium/state_trackers/xorg/SConscript
@@ -3,34 +3,35 @@
Import('*')
-if 'xorg' in env['statetrackers']:
-
- env = env.Clone()
-
- env.Append(CPPPATH = [
- '#/src/mesa',
- ])
-
- env.ParseConfig('pkg-config --cflags --libs libdrm xorg-server')
-
- conf = env.Configure()
-
- if conf.CheckHeader('X11/extensions/dpmsconst.h'):
- env.Append(CPPDEFINES = [('HAVE_XEXTPROTO_71', '1')])
-
- conf.Finish()
-
- st_xorg = env.ConvenienceLibrary(
- target = 'st_xorg',
- source = [ 'xorg_composite.c',
- 'xorg_crtc.c',
- 'xorg_dri2.c',
- 'xorg_driver.c',
- 'xorg_exa.c',
- 'xorg_exa_tgsi.c',
- 'xorg_output.c',
- 'xorg_renderer.c',
- 'xorg_xv.c',
- ]
- )
- Export('st_xorg')
+if not env['x11'] or not env['dri'] or not env['xorg']:
+ Return()
+
+env = env.Clone()
+
+env.Append(CPPPATH = [
+ '#/src/mesa',
+])
+
+env.ParseConfig('pkg-config --cflags --libs libdrm xorg-server')
+
+conf = env.Configure()
+
+if conf.CheckHeader('X11/extensions/dpmsconst.h'):
+ env.Append(CPPDEFINES = [('HAVE_XEXTPROTO_71', '1')])
+
+conf.Finish()
+
+st_xorg = env.ConvenienceLibrary(
+target = 'st_xorg',
+source = [ 'xorg_composite.c',
+ 'xorg_crtc.c',
+ 'xorg_dri2.c',
+ 'xorg_driver.c',
+ 'xorg_exa.c',
+ 'xorg_exa_tgsi.c',
+ 'xorg_output.c',
+ 'xorg_renderer.c',
+ 'xorg_xv.c',
+ ]
+)
+Export('st_xorg')