From 39087f636afcee058fc9af2c58cb1e2474c9b258 Mon Sep 17 00:00:00 2001 From: Keith Whitwell Date: Fri, 14 May 2010 10:55:07 +0100 Subject: scons: add 'targets' variable, for specifying ... targets Ideally scons should be able to work backwards from the list of targets to figure out which drivers, state trackers and other convenience libraries need to be built. --- src/gallium/targets/SConscript | 20 ++++++++++++++------ 1 file changed, 14 insertions(+), 6 deletions(-) (limited to 'src/gallium/targets/SConscript') diff --git a/src/gallium/targets/SConscript b/src/gallium/targets/SConscript index ca3e1ec132..9077cbf6a4 100644 --- a/src/gallium/targets/SConscript +++ b/src/gallium/targets/SConscript @@ -1,5 +1,8 @@ +import os Import('*') +# Compatibility with old build scripts: +# if 'xlib' in env['winsys']: SConscript([ 'libgl-xlib/SConscript', @@ -10,12 +13,7 @@ if 'gdi' in env['winsys']: 'libgl-gdi/SConscript', ]) -if env['platform'] == 'linux' and 'xlib' in env['winsys'] and 'graw-xlib' in env['winsys']: - SConscript([ - 'graw-xlib/SConscript', - ]) -else: - if not env['msvc']: +if not 'graw-xlib' in env['targets'] and not env['msvc']: # XXX: disable until MSVC can link correctly SConscript('graw-null/SConscript') @@ -30,3 +28,13 @@ if 'xorg' in env['statetrackers']: SConscript([ 'xorg-vmwgfx/SConscript', ]) + +# Ideally all non-target directories would produce convenience +# libraries, and the actual shared libraries and other installables +# would be finally assembled in the targets subtree: +# +for target in env['targets']: + SConscript(os.path.join(target, 'SConscript')) + + + -- cgit v1.2.3