aboutsummaryrefslogtreecommitdiffstats
path: root/src/mesa/drivers/dri/common
diff options
context:
space:
mode:
authorEmil Velikov <[email protected]>2014-06-17 01:04:51 +0100
committerEmil Velikov <[email protected]>2014-07-10 01:06:48 +0100
commitdab5d16f0e54eab41f863bb6fc6637b5e2d70aa0 (patch)
treeb061ace95c1643cc098f6dd160cf7b313ada8976 /src/mesa/drivers/dri/common
parent0e357234f3289058f9ee0653e2dbdef4ef825e31 (diff)
scons: build and use a single dri_common library
Rather than building two identical ones for dri-vmwgfx and dri-swrast build a single library, and drop some duplication in the build. Signed-off-by: Emil Velikov <[email protected]> Tested-by: Rob Clark <[email protected]> Tested-by: Thomas Helland <thomashelland90 at gmail.com> Acked-by: Tom Stellard <[email protected]>
Diffstat (limited to 'src/mesa/drivers/dri/common')
-rw-r--r--src/mesa/drivers/dri/common/SConscript55
1 files changed, 10 insertions, 45 deletions
diff --git a/src/mesa/drivers/dri/common/SConscript b/src/mesa/drivers/dri/common/SConscript
index 2763380cd8a..d003139bfdb 100644
--- a/src/mesa/drivers/dri/common/SConscript
+++ b/src/mesa/drivers/dri/common/SConscript
@@ -27,55 +27,22 @@ drienv.Replace(CPPPATH = [
'#src/egl/drivers/dri',
])
-driswenv = drienv.Clone()
-driswenv.Append(CPPDEFINES = [
- '__NOT_HAVE_DRM_H',
- 'HAVE_DLADDR',
+drienv.AppendUnique(LIBS = [
+ 'expat',
])
+# if HAVE_DRI2
drienv.PkgUseModules('DRM')
+# else
+#env.Append(CPPDEFINES = ['__NOT_HAVE_DRM_H'])
-dri_common_utils = drienv.SharedObject(
- target = 'utils.o',
- source = '#src/mesa/drivers/dri/common/utils.c'
-)
-
-dri_common_xmlconfig = drienv.SharedObject(
- target = 'xmlconfig.o',
- source = '#src/mesa/drivers/dri/common/xmlconfig.c'
-)
+sources = drienv.ParseSourceList('Makefile.sources', 'DRI_COMMON_FILES')
-dri_common_dri_util = drienv.SharedObject(
- target = 'dri_util.o',
- source = '#src/mesa/drivers/dri/common/dri_util.c'
-)
-
-dri_common_drisw_util = driswenv.SharedObject(
- target = 'drisw_util.o',
- source = '#src/mesa/drivers/dri/common/dri_util.c'
+dri_common = drienv.ConvenienceLibrary(
+ target = 'dri_common',
+ source = sources,
)
-
-COMMON_DRI_SW_OBJECTS = [
- dri_common_utils,
- dri_common_xmlconfig,
- dri_common_drisw_util,
-]
-
-COMMON_DRI_DRM_OBJECTS = [
- dri_common_utils,
- dri_common_xmlconfig,
- dri_common_dri_util,
-]
-
-drienv.AppendUnique(LIBS = [
- 'expat',
-])
-
-driswenv.AppendUnique(LIBS = [
- 'expat',
-])
-
#
# megadrivers_stub
#
@@ -104,8 +71,6 @@ env.Alias('megadrivers_stub', megadrivers_stub)
Export([
'drienv',
- 'driswenv',
- 'COMMON_DRI_SW_OBJECTS',
- 'COMMON_DRI_DRM_OBJECTS',
+ 'dri_common',
'megadrivers_stub',
])