anv/lower_ycbcr: make sure to set 0s on all components
[mesa.git] / src / glx / SConscript
index 664cb86268da9dd228e0ae21dd0dc768b9a10bdb..8ce177158140b23fe641f05ff031c102a92dec1d 100644 (file)
@@ -1,5 +1,8 @@
 Import('*')
 
+if not env['x11'] or not env['xcb'] or not env['drm']:
+    Return()
+
 from sys import executable as python_cmd
 
 env = env.Clone()
@@ -8,6 +11,8 @@ env.Prepend(CPPPATH = [
        '.',           # the build/<platform>/glx/ directory
        '#include',
        '#include/GL/internal',
+       '#src/',
+       '#src/loader',
        '#src/mesa',
        '#src/mapi',
        '#src/mapi/glapi',
@@ -23,6 +28,8 @@ env.Append(CPPDEFINES = [
 ])
 
 env.Prepend(LIBS = [
+    libloader,
+    mesautil,
     glapi
 ])
 
@@ -34,9 +41,6 @@ if env['HAVE_XF86VIDMODE']:
     env.Append(CPPDEFINES = ['XF86VIDMODE'])
     env.PkgUseModules('XF86VIDMODE')
 
-if False: # XXX: SHARED_GLAPI
-    env.Append(CPPDEFINES = ['GLX_SHARED_GLAPI'])
-
 sources = [
     'clientattrib.c',
     'clientinfo.c',
@@ -60,6 +64,7 @@ sources = [
     'indirect_vertex_program.c',
     'pixel.c',
     'pixelstore.c',
+    'query_renderer.c',
     'render2.c',
     'renderpix.c',
     'single2.c',
@@ -75,6 +80,9 @@ sources = [
     'glxhash.c',
     'dri2_glx.c',
     'dri2.c',
+    'dri_common_query_renderer.c',
+    'dri_common_interop.c',
+    #'dri3_glx.c',
     'applegl_glx.c',
 ]
 
@@ -89,48 +97,44 @@ libgl = env.SharedLibrary(
 # used by other targets as well.
 
 GLAPI = '#src/mapi/glapi/'
+sources = [GLAPI + 'gen/gl_API.xml'] + env.Glob(GLAPI + 'gen/*.xml')
 
 env.CodeGenerate(
     target = 'indirect.c',
     script = GLAPI + 'gen/glX_proto_send.py',
-    source = GLAPI + 'gen/gl_and_es_API.xml',
+    source = sources,
     command = python_cmd + ' $SCRIPT -f $SOURCE -m proto > $TARGET'
     )
 
 env.CodeGenerate(
-    target = 'indirect_size.c', 
+    target = 'indirect_size.c',
     script = GLAPI + 'gen/glX_proto_size.py',
-    source = GLAPI + 'gen/gl_API.xml',
+    source = sources,
     command = python_cmd + ' $SCRIPT -f $SOURCE -m size_c --only-set > $TARGET'
 )
 
 env.CodeGenerate(
-    target = 'indirect_init.c', 
+    target = 'indirect_init.c',
     script = GLAPI + 'gen/glX_proto_send.py',
-    source = GLAPI + 'gen/gl_API.xml',
+    source = sources,
     command = python_cmd + ' $SCRIPT -f $SOURCE -m init_c > $TARGET'
 )
 
-headers = []
-
-headers += env.CodeGenerate(
+env.CodeGenerate(
     target = 'indirect_size.h',
     script = GLAPI + 'gen/glX_proto_size.py',
-    source = GLAPI + 'gen/gl_API.xml',
-    command = python_cmd + ' $SCRIPT -f $SOURCE -m size_h --only-set -h _INDIRECT_SIZE_H > $TARGET'
+    source = sources,
+    command = python_cmd + ' $SCRIPT -f $SOURCE -m size_h --only-set --header-tag _INDIRECT_SIZE_H > $TARGET'
 )
 
-headers += env.CodeGenerate(
+env.CodeGenerate(
     target = 'indirect.h',
     script = GLAPI + 'gen/glX_proto_send.py',
-    source = GLAPI + 'gen/gl_API.xml',
+    source = sources,
     command = python_cmd + ' $SCRIPT -m init_h -f $SOURCE > $TARGET',
     )
 
 
-env.Depends(sources, headers)
-
-
 libgl = env.InstallSharedLibrary(libgl, version=(1, 2))
 
 env.Alias('glx', libgl)