From 601498ae73e654c2de997ea75075613a694d604d Mon Sep 17 00:00:00 2001 From: José Fonseca Date: Mon, 1 Nov 2010 13:30:22 +0000 Subject: scons: Revamp how to specify targets to build. Use scons target and dependency system instead of ad-hoc options. Now is simply a matter of naming what to build. For example: scons libgl-xlib scons libgl-gdi scons graw-progs scons llvmpipe and so on. And there is also the possibility of scepcified subdirs, e.g. scons src/gallium/drivers If nothing is specified then everything will be build. There might be some rough corners over the next days. Please bare with me. --- src/gallium/targets/libgl-xlib/SConscript | 27 +++++++++------------------ 1 file changed, 9 insertions(+), 18 deletions(-) (limited to 'src/gallium/targets/libgl-xlib') diff --git a/src/gallium/targets/libgl-xlib/SConscript b/src/gallium/targets/libgl-xlib/SConscript index 27b562e1d5..582760eac9 100644 --- a/src/gallium/targets/libgl-xlib/SConscript +++ b/src/gallium/targets/libgl-xlib/SConscript @@ -3,17 +3,6 @@ Import('*') -if env['platform'] != 'linux': - Return() - -if 'mesa' not in env['statetrackers']: - print 'warning: Mesa state tracker disabled: skipping build of xlib libGL.so' - Return() - -if env['dri']: - print 'warning: DRI enabled: skipping build of xlib libGL.so' - Return() - env = env.Clone() env.Append(CPPPATH = [ @@ -25,6 +14,8 @@ env.Append(CPPPATH = [ env.Append(CPPDEFINES = ['USE_XSHM']) +env.Prepend(LIBS = env['X11_LIBS']) + env.Prepend(LIBS = [ st_xlib, ws_xlib, @@ -42,8 +33,6 @@ sources = [ 'xlib.c', ] -env.Tool('x11') - if True: env.Append(CPPDEFINES = 'GALLIUM_SOFTPIPE') env.Prepend(LIBS = [softpipe]) @@ -54,10 +43,10 @@ if True: if env['llvm']: env.Append(CPPDEFINES = 'GALLIUM_LLVMPIPE') - env.Tool('udis86') env.Prepend(LIBS = [llvmpipe]) -if 'cell' in env['drivers']: +if False: + # TODO: Detect Cell SDK env.Append(CPPDEFINES = 'GALLIUM_CELL') env.Prepend(LIBS = [cell]) @@ -67,6 +56,8 @@ libgl = env.SharedLibrary( source = sources, ) -if not env['dri']: - # Only install this libGL.so if DRI not enabled - env.InstallSharedLibrary(libgl, version=(1, 5)) +if True: + # XXX: Only install this libGL.so if DRI not enabled + libgl = env.InstallSharedLibrary(libgl, version=(1, 5)) + +env.Alias('libgl-xlib', libgl) -- cgit v1.2.3