summaryrefslogtreecommitdiff
path: root/src/gallium/winsys
diff options
context:
space:
mode:
authorJosé Fonseca <jrfonseca@tungstengraphics.com>2008-06-03 00:04:19 +0900
committerJosé Fonseca <jrfonseca@tungstengraphics.com>2008-06-03 00:05:54 +0900
commit5a67df6d7cc8c74bfb71a8f19b8f6fdfb525091b (patch)
treed48b2e582502045de6730b32f3fc5a37949e4f85 /src/gallium/winsys
parent7c22bb383a8fcccf71d7916ce91ae6cb17ac1e3c (diff)
scons: Integrate gdi winsys.
Conditional build of the winsys based on the platform.
Diffstat (limited to 'src/gallium/winsys')
-rw-r--r--src/gallium/winsys/SConscript9
-rw-r--r--src/gallium/winsys/dri/SConscript101
-rw-r--r--src/gallium/winsys/dri/intel/SConscript76
-rw-r--r--src/gallium/winsys/xlib/SConscript50
4 files changed, 124 insertions, 112 deletions
diff --git a/src/gallium/winsys/SConscript b/src/gallium/winsys/SConscript
index e8a581adb2..bf1718e7a5 100644
--- a/src/gallium/winsys/SConscript
+++ b/src/gallium/winsys/SConscript
@@ -1,11 +1,16 @@
Import('*')
-if 'intel' in env['winsys'] and dri:
+if env['dri']:
SConscript([
'dri/SConscript',
])
-if 'xlib' in env['winsys'] and not dri:
+if 'xlib' in env['winsys']:
SConscript([
'xlib/SConscript',
])
+
+if 'gdi' in env['winsys']:
+ SConscript([
+ 'gdi/SConscript',
+ ])
diff --git a/src/gallium/winsys/dri/SConscript b/src/gallium/winsys/dri/SConscript
index 8c56ce917c..aef5210a32 100644
--- a/src/gallium/winsys/dri/SConscript
+++ b/src/gallium/winsys/dri/SConscript
@@ -1,51 +1,54 @@
Import('*')
-drienv = env.Clone()
-
-drienv.Replace(CPPPATH = [
- '#src/mesa/drivers/dri/common',
- '#include',
- '#include/GL/internal',
- '#src/gallium/include',
- '#src/gallium/auxiliary',
- '#src/gallium/drivers',
- '#src/mesa',
- '#src/mesa/main',
- '#src/mesa/glapi',
- '#src/mesa/math',
- '#src/mesa/transform',
- '#src/mesa/shader',
- '#src/mesa/swrast',
- '#src/mesa/swrast_setup',
- '#src/egl/main',
- '#src/egl/drivers/dri',
-])
-
-drienv.ParseConfig('pkg-config --cflags --libs libdrm')
-
-COMMON_GALLIUM_SOURCES = [
- '#src/mesa/drivers/dri/common/utils.c',
- '#src/mesa/drivers/dri/common/vblank.c',
- '#src/mesa/drivers/dri/common/dri_util.c',
- '#src/mesa/drivers/dri/common/xmlconfig.c',
-]
-
-COMMON_BM_SOURCES = [
- '#src/mesa/drivers/dri/common/dri_bufmgr.c',
- '#src/mesa/drivers/dri/common/dri_drmpool.c',
-]
-
-Export([
- 'drienv',
- 'COMMON_GALLIUM_SOURCES',
- 'COMMON_BM_SOURCES',
-])
-
-# TODO: Installation
-#install: $(LIBNAME)
-# $(INSTALL) -d $(DRI_DRIVER_INSTALL_DIR)
-# $(INSTALL) -m 755 $(LIBNAME) $(DRI_DRIVER_INSTALL_DIR)
-
-SConscript([
- 'intel/SConscript',
-])
+if env['dri']:
+
+ drienv = env.Clone()
+
+ drienv.Replace(CPPPATH = [
+ '#src/mesa/drivers/dri/common',
+ '#include',
+ '#include/GL/internal',
+ '#src/gallium/include',
+ '#src/gallium/auxiliary',
+ '#src/gallium/drivers',
+ '#src/mesa',
+ '#src/mesa/main',
+ '#src/mesa/glapi',
+ '#src/mesa/math',
+ '#src/mesa/transform',
+ '#src/mesa/shader',
+ '#src/mesa/swrast',
+ '#src/mesa/swrast_setup',
+ '#src/egl/main',
+ '#src/egl/drivers/dri',
+ ])
+
+ drienv.ParseConfig('pkg-config --cflags --libs libdrm')
+
+ COMMON_GALLIUM_SOURCES = [
+ '#src/mesa/drivers/dri/common/utils.c',
+ '#src/mesa/drivers/dri/common/vblank.c',
+ '#src/mesa/drivers/dri/common/dri_util.c',
+ '#src/mesa/drivers/dri/common/xmlconfig.c',
+ ]
+
+ COMMON_BM_SOURCES = [
+ '#src/mesa/drivers/dri/common/dri_bufmgr.c',
+ '#src/mesa/drivers/dri/common/dri_drmpool.c',
+ ]
+
+ Export([
+ 'drienv',
+ 'COMMON_GALLIUM_SOURCES',
+ 'COMMON_BM_SOURCES',
+ ])
+
+ # TODO: Installation
+ #install: $(LIBNAME)
+ # $(INSTALL) -d $(DRI_DRIVER_INSTALL_DIR)
+ # $(INSTALL) -m 755 $(LIBNAME) $(DRI_DRIVER_INSTALL_DIR)
+
+ if 'intel' in env['winsys']:
+ SConscript([
+ 'intel/SConscript',
+ ])
diff --git a/src/gallium/winsys/dri/intel/SConscript b/src/gallium/winsys/dri/intel/SConscript
index 0ad19d42a8..6a4f50afcc 100644
--- a/src/gallium/winsys/dri/intel/SConscript
+++ b/src/gallium/winsys/dri/intel/SConscript
@@ -1,39 +1,41 @@
Import('*')
-env = drienv.Clone()
-
-env.Append(CPPPATH = [
- '../intel',
- 'server'
-])
-
-#MINIGLX_SOURCES = server/intel_dri.c
-
-DRIVER_SOURCES = [
- 'intel_winsys_pipe.c',
- 'intel_winsys_softpipe.c',
- 'intel_winsys_i915.c',
- 'intel_batchbuffer.c',
- 'intel_swapbuffers.c',
- 'intel_context.c',
- 'intel_lock.c',
- 'intel_screen.c',
- 'intel_batchpool.c',
-]
-
-sources = \
- COMMON_GALLIUM_SOURCES + \
- COMMON_BM_SOURCES + \
- DRIVER_SOURCES
-
-drivers = [
- softpipe,
- i915simple
-]
-
-# TODO: write a wrapper function http://www.scons.org/wiki/WrapperFunctions
-env.SharedLibrary(
- target ='i915tex_dri.so',
- source = sources,
- LIBS = drivers + mesa + auxiliaries + env['LIBS'],
-) \ No newline at end of file
+if 'mesa' in env['statetrackers']:
+
+ env = drienv.Clone()
+
+ env.Append(CPPPATH = [
+ '../intel',
+ 'server'
+ ])
+
+ #MINIGLX_SOURCES = server/intel_dri.c
+
+ DRIVER_SOURCES = [
+ 'intel_winsys_pipe.c',
+ 'intel_winsys_softpipe.c',
+ 'intel_winsys_i915.c',
+ 'intel_batchbuffer.c',
+ 'intel_swapbuffers.c',
+ 'intel_context.c',
+ 'intel_lock.c',
+ 'intel_screen.c',
+ 'intel_batchpool.c',
+ ]
+
+ sources = \
+ COMMON_GALLIUM_SOURCES + \
+ COMMON_BM_SOURCES + \
+ DRIVER_SOURCES
+
+ drivers = [
+ softpipe,
+ i915simple
+ ]
+
+ # TODO: write a wrapper function http://www.scons.org/wiki/WrapperFunctions
+ env.SharedLibrary(
+ target ='i915tex_dri.so',
+ source = sources,
+ LIBS = drivers + mesa + auxiliaries + env['LIBS'],
+ )
diff --git a/src/gallium/winsys/xlib/SConscript b/src/gallium/winsys/xlib/SConscript
index 218b89285f..5e98a36abc 100644
--- a/src/gallium/winsys/xlib/SConscript
+++ b/src/gallium/winsys/xlib/SConscript
@@ -3,30 +3,32 @@
Import('*')
-env = env.Clone()
+if env['platform'] == 'linux' and 'mesa' in env['statetrackers'] and not env['dri']:
-env.Append(CPPPATH = [
- '#/src/mesa',
- '#/src/mesa/main',
-])
+ env = env.Clone()
-sources = [
- 'glxapi.c',
- 'fakeglx.c',
- 'xfonts.c',
- 'xm_api.c',
- 'xm_winsys.c',
- 'xm_winsys_aub.c',
- 'brw_aub.c',
-]
-
-drivers = [
- softpipe,
-]
+ env.Append(CPPPATH = [
+ '#/src/mesa',
+ '#/src/mesa/main',
+ ])
-# TODO: write a wrapper function http://www.scons.org/wiki/WrapperFunctions
-env.SharedLibrary(
- target ='GL',
- source = sources,
- LIBS = glapi + mesa + drivers + auxiliaries + env['LIBS'],
-)
+ sources = [
+ 'glxapi.c',
+ 'fakeglx.c',
+ 'xfonts.c',
+ 'xm_api.c',
+ 'xm_winsys.c',
+ 'xm_winsys_aub.c',
+ 'brw_aub.c',
+ ]
+
+ drivers = [
+ softpipe,
+ ]
+
+ # TODO: write a wrapper function http://www.scons.org/wiki/WrapperFunctions
+ env.SharedLibrary(
+ target ='GL',
+ source = sources,
+ LIBS = glapi + mesa + drivers + auxiliaries + env['LIBS'],
+ )