X-Git-Url: https://git.libre-soc.org/?a=blobdiff_plain;f=src%2Fglx%2FSConscript;h=09e0e16861cf4d0be854771c9f0f29f0fe21cce0;hb=7db83d8d4b6329f8edcac7bc72d225016b5188d4;hp=afef33727dfde5bd0bc872e0743c44c2bbd130f3;hpb=c3b2230b71cb3a00a7f4c0987197d397bada650b;p=mesa.git diff --git a/src/glx/SConscript b/src/glx/SConscript index afef33727df..09e0e16861c 100644 --- a/src/glx/SConscript +++ b/src/glx/SConscript @@ -1,11 +1,14 @@ Import('*') -if env['platform'] == 'windows': +if not env['x11'] or not env['xcb'] or not env['drm']: Return() +from sys import executable as python_cmd + env = env.Clone() env.Prepend(CPPPATH = [ + '.', # the build//glx/ directory '#include', '#include/GL/internal', '#src/mesa', @@ -27,6 +30,7 @@ env.Prepend(LIBS = [ ]) env.PkgUseModules('X11') +env.PkgUseModules('XCB') env.PkgUseModules('DRM') if env['HAVE_XF86VIDMODE']: @@ -38,8 +42,11 @@ if False: # XXX: SHARED_GLAPI sources = [ 'clientattrib.c', + 'clientinfo.c', + 'create_context.c', 'compsize.c', 'eval.c', + 'glx_error.c', 'glxconfig.c', 'glxcmds.c', 'glxcurrent.c', @@ -79,6 +86,49 @@ libgl = env.SharedLibrary( source = sources, ) + +# Generate GLX-specific .c and .h files here. Other GL API-related +# files are used, but they're generated in mapi/glapi/gen/ since they're +# used by other targets as well. + +GLAPI = '#src/mapi/glapi/' + +env.CodeGenerate( + target = 'indirect.c', + script = GLAPI + 'gen/glX_proto_send.py', + source = GLAPI + 'gen/gl_and_es_API.xml', + command = python_cmd + ' $SCRIPT -f $SOURCE -m proto > $TARGET' + ) + +env.CodeGenerate( + target = 'indirect_size.c', + script = GLAPI + 'gen/glX_proto_size.py', + source = GLAPI + 'gen/gl_API.xml', + command = python_cmd + ' $SCRIPT -f $SOURCE -m size_c --only-set > $TARGET' +) + +env.CodeGenerate( + target = 'indirect_init.c', + script = GLAPI + 'gen/glX_proto_send.py', + source = GLAPI + 'gen/gl_API.xml', + command = python_cmd + ' $SCRIPT -f $SOURCE -m init_c > $TARGET' +) + +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' +) + +env.CodeGenerate( + target = 'indirect.h', + script = GLAPI + 'gen/glX_proto_send.py', + source = GLAPI + 'gen/gl_API.xml', + command = python_cmd + ' $SCRIPT -m init_h -f $SOURCE > $TARGET', + ) + + libgl = env.InstallSharedLibrary(libgl, version=(1, 2)) env.Alias('glx', libgl)