summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJakob Bornecrantz <[email protected]>2010-11-05 16:55:46 +0000
committerJakob Bornecrantz <[email protected]>2010-11-05 20:58:49 +0000
commitc0db7854d502d0b24110cbe8560967794d7938cb (patch)
tree38bbfad082a387e557da40d355df1d9b51bd045d
parent98d6ed87421cd8a8a43b061a6ba634b8cbbec086 (diff)
scons: Check for libdrm_[intel|radeon] as well
And run SConscripts if they are present. Also make dri depend on both drm and x11.
-rw-r--r--scons/gallium.py6
-rw-r--r--src/gallium/SConscript40
2 files changed, 30 insertions, 16 deletions
diff --git a/scons/gallium.py b/scons/gallium.py
index 36f1831af89..75e9b9e7fc3 100644
--- a/scons/gallium.py
+++ b/scons/gallium.py
@@ -560,10 +560,14 @@ def generate(env):
env.Tool('udis86')
pkg_config_modules(env, 'x11', ['x11', 'xext'])
- pkg_config_modules(env, 'dri', ['libdrm'])
+ pkg_config_modules(env, 'drm', ['libdrm'])
+ pkg_config_modules(env, 'drm_intel', ['libdrm_intel'])
+ pkg_config_modules(env, 'drm_radeon', ['libdrm_radeon'])
pkg_config_modules(env, 'xorg', ['xorg-server'])
pkg_config_modules(env, 'kms', ['libkms'])
+ env['dri'] = env['x11'] and env['drm']
+
# Custom builders and methods
env.Tool('custom')
createInstallMethods(env)
diff --git a/src/gallium/SConscript b/src/gallium/SConscript
index 63435a30658..9436b684e4e 100644
--- a/src/gallium/SConscript
+++ b/src/gallium/SConscript
@@ -29,17 +29,21 @@ if not env['msvc']:
'drivers/r300/SConscript',
])
-if env['dri']:
+if env['drm']:
# These drivers depend on drm headers
- SConscript([
- # XXX: nouveau drivers have a tight dependency on libdrm, so to enable
- # we need some version logic before we enable them. Also, ATM there is
- # no nouveau target in scons
- #'drivers/nouveau/SConscript',
- #'drivers/nv50/SConscript',
- #'drivers/nvfx/SConscript',
- 'drivers/r600/SConscript',
- ])
+ if env['drm_radeon']:
+ SConscript([
+ 'drivers/r600/SConscript',
+ ])
+ # XXX: nouveau drivers have a tight dependency on libdrm, so to enable
+ # we need some version logic before we enable them. Also, ATM there is
+ # no nouveau target in scons
+ # if env['drm_nouveau']:
+ # SConscript([
+ # 'drivers/nouveau/SConscript',
+ # 'drivers/nv50/SConscript',
+ # 'drivers/nvfx/SConscript',
+ # ])
#
# State trackers
@@ -89,14 +93,20 @@ if env['platform'] == 'windows':
if env['dri']:
SConscript([
'targets/SConscript.dri',
- 'targets/dri-i915/SConscript',
- 'targets/dri-i965/SConscript',
- #'targets/dri-nouveau/SConscript',
- 'targets/dri-r300/SConscript',
- 'targets/dri-r600/SConscript',
'targets/dri-swrast/SConscript',
'targets/dri-vmwgfx/SConscript',
+ #'targets/dri-nouveau/SConscript',
])
+ if env['drm_intel']:
+ SConscript([
+ 'targets/dri-i915/SConscript',
+ 'targets/dri-i965/SConscript',
+ ])
+ if env['drm_radeon']:
+ SConscript([
+ 'targets/dri-r300/SConscript',
+ 'targets/dri-r600/SConscript',
+ ])
if env['xorg']:
SConscript([