summaryrefslogtreecommitdiffstats
path: root/src/gallium/targets
diff options
context:
space:
mode:
authorChia-I Wu <[email protected]>2011-01-09 23:37:32 +0800
committerChia-I Wu <[email protected]>2011-01-12 17:40:01 +0800
commita8b6b6555c7d6a02a3d095c72ebbdc218bc45cd3 (patch)
treed0d21b537682efd23b3d107a639bb86eaf825782 /src/gallium/targets
parent49ed5bb28d501cd6751bd59dc25a60a4293bcd75 (diff)
scons: Updates for targets/egl-static.
Update SConscripts to re-enable or add support for EGL on windows and x11 platforms respectively. targets/egl-gdi is replaced by targets/egl-static, where "-static" means pipe drivers and state trackers are linked to statically by egl_gallium, and egl_gallium is a built-in driver of libEGL. There is no more egl_gallium.dll on Windows.
Diffstat (limited to 'src/gallium/targets')
-rw-r--r--src/gallium/targets/egl-static/SConscript122
1 files changed, 122 insertions, 0 deletions
diff --git a/src/gallium/targets/egl-static/SConscript b/src/gallium/targets/egl-static/SConscript
new file mode 100644
index 00000000000..1fa40806319
--- /dev/null
+++ b/src/gallium/targets/egl-static/SConscript
@@ -0,0 +1,122 @@
+#######################################################################
+# SConscript for egl-static target
+
+Import('*')
+
+env = env.Clone()
+
+env.Append(CPPPATH = [
+ '#/include',
+ '#/src/egl/main',
+ '#/src/gallium/auxiliary',
+ '#/src/gallium/drivers',
+ '#/src/gallium/include',
+ '#/src/gallium/winsys',
+ '#/src/gallium/state_trackers/egl',
+ '#/src/gallium/state_trackers/vega',
+ '#/src/mesa',
+])
+
+env.Append(CPPDEFINES = [
+ 'GALLIUM_SOFTPIPE',
+ 'GALLIUM_RBUG',
+ 'GALLIUM_TRACE',
+ 'GALLIUM_GALAHAD',
+ '_EGL_MAIN=_eglBuiltInDriverGALLIUM',
+])
+
+env.Prepend(LIBS = [
+ softpipe,
+ rbug,
+ trace,
+ galahad,
+ gallium,
+ egl,
+])
+
+if env['llvm']:
+ env.Append(CPPDEFINES = ['GALLIUM_LLVMPIPE'])
+ env.Prepend(LIBS = [llvmpipe])
+
+sources = [
+ 'egl.c',
+ 'egl_pipe.c',
+ 'egl_st.c',
+]
+
+if env['platform'] == 'windows':
+ sources.append('#src/egl/main/egl.def')
+
+ env.Append(LIBS = [
+ 'gdi32',
+ 'user32',
+ 'kernel32',
+ 'ws2_32',
+ ])
+
+ env.Prepend(LIBS = [
+ st_egl,
+ ws_gdi,
+ ])
+
+ # OpenVG
+ env.Append(CPPDEFINES = ['FEATURE_VG=1'])
+ env.Prepend(LIBS = [vgapi, st_vega])
+else:
+ env.Prepend(LIBS = [
+ st_egl,
+ ws_xlib,
+ ])
+
+ # OpenGL
+ env.Append(CPPDEFINES = ['FEATURE_GL=1'])
+ env.Prepend(LIBS = ['GL', 'talloc', glsl, mesa])
+
+ # OpenVG
+ env.Append(CPPDEFINES = ['FEATURE_VG=1'])
+ env.Prepend(LIBS = ['OpenVG', st_vega])
+
+
+if env['dri']:
+ env.ParseConfig('pkg-config --cflags --libs xfixes')
+
+# pipe drivers
+if env['drm']:
+ env.ParseConfig('pkg-config --cflags --libs libdrm')
+
+ if env['drm_intel']:
+ env.ParseConfig('pkg-config --cflags --libs libdrm_intel')
+ env.Append(CPPDEFINES = ['_EGL_PIPE_I915', '_EGL_PIPE_I965'])
+ env.Prepend(LIBS = [
+ i915drm,
+ i915,
+ i965drm,
+ i965,
+ ])
+
+ if env['drm_radeon']:
+ env.ParseConfig('pkg-config --cflags --libs libdrm_radeon')
+ env.Append(CPPDEFINES = ['_EGL_PIPE_R300', '_EGL_PIPE_R600'])
+ env.Prepend(LIBS = [
+ radeonwinsys,
+ r300,
+ r600winsys,
+ r600,
+ ])
+
+ env.Append(CPPDEFINES = ['_EGL_PIPE_VMWGFX'])
+ env.Prepend(LIBS = [
+ svgadrm,
+ svga,
+ ])
+
+egl_gallium = env.SharedLibrary(
+ target ='libEGL',
+ source = sources,
+)
+
+env.Depends(egl_gallium, [vgapi])
+
+egl_gallium = env.InstallSharedLibrary(egl_gallium, version=(1, 4, 0))
+
+env.Alias('egl-gallium', egl_gallium)