scons: Move dependancy checks to the main gallium scons file
authorJakob Bornecrantz <jakob@vmware.com>
Fri, 5 Nov 2010 18:18:09 +0000 (18:18 +0000)
committerJakob Bornecrantz <jakob@vmware.com>
Fri, 5 Nov 2010 20:58:49 +0000 (20:58 +0000)
src/gallium/SConscript
src/gallium/state_trackers/dri/drm/SConscript
src/gallium/state_trackers/dri/sw/SConscript
src/gallium/state_trackers/egl/SConscript
src/gallium/state_trackers/glx/xlib/SConscript
src/gallium/state_trackers/wgl/SConscript
src/gallium/state_trackers/xorg/SConscript

index 9436b684e4e744ef66a25c39ada42335838229e5..207987bedc54f43cd481aa185623637abe2803a3 100644 (file)
@@ -54,14 +54,22 @@ SConscript('winsys/sw/null/SConscript')
 
 SConscript('state_trackers/python/SConscript')
 if env['platform'] != 'embedded':
-    SConscript('state_trackers/glx/xlib/SConscript')
-    SConscript('state_trackers/dri/SConscript')
-    SConscript('state_trackers/xorg/SConscript')
-    SConscript('state_trackers/egl/SConscript')
     SConscript('state_trackers/vega/SConscript')
 
+    if env['x11']:
+        SConscript('state_trackers/glx/xlib/SConscript')
+
+    if env['dri']:
+        SConscript('state_trackers/dri/SConscript')
+
+    if env['dri'] and env['xorg']:
+        SConscript('state_trackers/xorg/SConscript')
+
 if env['platform'] == 'windows':
-    SConscript('state_trackers/wgl/SConscript')
+    SConscript([
+        'state_trackers/egl/SConscript',
+        'state_trackers/wgl/SConscript',
+    ])
 
 #
 # Winsys
index 7e3a264d1c16ad244d3665867a72e395e91e54b3..90082ffb6ae9cc7a86ac8986e3061606432f1784 100644 (file)
@@ -3,20 +3,18 @@
 
 Import('*')
 
-if env['dri']:
+env = env.Clone()
 
-    env = env.Clone()
+env.ParseConfig('pkg-config --cflags --libs libdrm')
 
-    env.ParseConfig('pkg-config --cflags --libs libdrm')
+env.Append(CPPPATH = [
+    '#/src/mapi',
+    '#/src/mesa',
+    '#/src/gallium/state_trackers/dri/common',
+    '#/src/mesa/drivers/dri/common',
+])
 
-    env.Append(CPPPATH = [
-        '#/src/mapi',
-        '#/src/mesa',
-        '#/src/gallium/state_trackers/dri/common',
-        '#/src/mesa/drivers/dri/common',
-    ])
-
-    st_dri = env.ConvenienceLibrary(
+st_dri = env.ConvenienceLibrary(
     target = 'st_dri',
     source = [ 'dri_context.c',
                'dri_drawable.c',
@@ -24,4 +22,5 @@ if env['dri']:
                'dri2.c',
         ]
     )
-    Export('st_dri')
+
+Export('st_dri')
index 03c2ef6ab1dd4bb4dcf911dddcc5ccc7157f135f..8646d276c8d93d72ff6198bb773ff5d78f899048 100644 (file)
@@ -3,20 +3,18 @@
 
 Import('*')
 
-if env['dri']:
+env = env.Clone()
 
-    env = env.Clone()
+env.Append(CPPPATH = [
+    '#/src/mapi',
+    '#/src/mesa',
+    '#/src/gallium/state_trackers/dri/common',
+    '#/src/mesa/drivers/dri/common',
+])
 
-    env.Append(CPPPATH = [
-        '#/src/mapi',
-        '#/src/mesa',
-        '#/src/gallium/state_trackers/dri/common',
-        '#/src/mesa/drivers/dri/common',
-    ])
+env.Append(CPPDEFINES = [('__NOT_HAVE_DRM_H', '1')])
 
-    env.Append(CPPDEFINES = [('__NOT_HAVE_DRM_H', '1')])
-
-    st_drisw = env.ConvenienceLibrary(
+st_drisw = env.ConvenienceLibrary(
     target = 'st_drisw',
     source = [ 'dri_context.c',
                'dri_drawable.c',
@@ -24,4 +22,5 @@ if env['dri']:
                'drisw.c',
         ]
     )
-    Export('st_drisw')
+
+Export('st_drisw')
index 8d34e47df0ee35a8389d01d083e9e6aada076bfa..50c76819954c31b66140e3ff98ebc0e3d7b5909b 100644 (file)
@@ -3,9 +3,6 @@
 
 Import('*')
 
-if env['platform'] != 'windows':
-    Return()
-
 env = env.Clone()
 
 env.Append(CPPPATH = [
index 775000eacce81ac5905377c8efe23b9b3e1330ec..0542a5fc89bbc479ff64eb62675bf334f68ed046 100644 (file)
@@ -3,9 +3,6 @@
 
 Import('*')
 
-if not env['x11']:
-    Return()
-
 env = env.Clone()
 
 env.Append(CPPPATH = [
index 994b0c86143ea5f25e2c6bb79a9e83fde6a347e6..ec55f042f909f5a02a55bc0e02b60af27906e23e 100644 (file)
@@ -2,41 +2,38 @@ import os
 
 Import('*')
 
-if env['platform'] in ['windows']:
-     
-    env = env.Clone()
-     
-    env.Append(CPPPATH = [
-        '#src/mapi',
-        '#src/mesa',
-        '.',
-    ])
-     
-    env.AppendUnique(CPPDEFINES = [
-        '_GDI32_', # prevent wgl* being declared __declspec(dllimport)
-        'BUILD_GL32', # declare gl* as __declspec(dllexport) in Mesa headers 
-        'WIN32_THREADS', # use Win32 thread API
-        'WIN32_LEAN_AND_MEAN', # http://msdn2.microsoft.com/en-us/library/6dwk3a1z.aspx
-    ])
-     
-    sources = [
-        'stw_context.c',
-        'stw_device.c',
-        'stw_ext_extensionsstring.c',
-        'stw_ext_gallium.c',
-        'stw_ext_pixelformat.c',
-        'stw_ext_swapinterval.c',
-        'stw_framebuffer.c',
-        'stw_getprocaddress.c',
-        'stw_pixelformat.c',
-        'stw_st.c',
-        'stw_tls.c',
-        'stw_wgl.c',
-    ]
+env = env.Clone()
 
-    wgl = env.ConvenienceLibrary(
-        target ='wgl',
-        source = sources,
-    )
-    
-    Export('wgl')
+env.Append(CPPPATH = [
+    '#src/mapi',
+    '#src/mesa',
+    '.',
+])
+
+env.AppendUnique(CPPDEFINES = [
+    '_GDI32_', # prevent wgl* being declared __declspec(dllimport)
+    'BUILD_GL32', # declare gl* as __declspec(dllexport) in Mesa headers 
+    'WIN32_THREADS', # use Win32 thread API
+    'WIN32_LEAN_AND_MEAN', # http://msdn2.microsoft.com/en-us/library/6dwk3a1z.aspx
+])
+
+sources = [
+    'stw_context.c',
+    'stw_device.c',
+    'stw_ext_extensionsstring.c',
+    'stw_ext_gallium.c',
+    'stw_ext_pixelformat.c',
+    'stw_ext_swapinterval.c',
+    'stw_framebuffer.c',
+    'stw_getprocaddress.c',
+    'stw_pixelformat.c',
+    'stw_st.c',
+    'stw_tls.c',
+    'stw_wgl.c',
+]
+
+wgl = env.ConvenienceLibrary(
+    target ='wgl',
+    source = sources,
+)
+Export('wgl')
index bc7821f8a8d40f04ded09003c080b4fbd6e07eac..1022954ca09a9ab2bf5d2622c95681483aa04a2a 100644 (file)
@@ -3,9 +3,6 @@
 
 Import('*')
 
-if not env['x11'] or not env['dri'] or not env['xorg']:
-    Return()
-
 env = env.Clone()
 
 env.Append(CPPPATH = [