X-Git-Url: https://git.libre-soc.org/?a=blobdiff_plain;f=src%2Fglx%2FSConscript;h=619e4c373ed533d43c9df6f50a4ede55cd594b56;hb=d35391cfda13afdb19a47003af260e258575ef45;hp=afef33727dfde5bd0bc872e0743c44c2bbd130f3;hpb=424b1210d951c206e7c2fb8f2778acbd384eb247;p=mesa.git diff --git a/src/glx/SConscript b/src/glx/SConscript index afef33727df..619e4c373ed 100644 --- a/src/glx/SConscript +++ b/src/glx/SConscript @@ -1,13 +1,18 @@ 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/', + '#src/loader', '#src/mesa', '#src/mapi', '#src/mapi/glapi', @@ -23,10 +28,12 @@ env.Append(CPPDEFINES = [ ]) env.Prepend(LIBS = [ + libloader, glapi ]) env.PkgUseModules('X11') +env.PkgUseModules('XCB') env.PkgUseModules('DRM') if env['HAVE_XF86VIDMODE']: @@ -38,8 +45,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', @@ -56,6 +66,7 @@ sources = [ 'indirect_vertex_program.c', 'pixel.c', 'pixelstore.c', + 'query_renderer.c', 'render2.c', 'renderpix.c', 'single2.c', @@ -71,6 +82,8 @@ sources = [ 'glxhash.c', 'dri2_glx.c', 'dri2.c', + 'dri_common_query_renderer.c', + #'dri3_glx.c', 'applegl_glx.c', ] @@ -79,6 +92,50 @@ 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/' +sources = [GLAPI + 'gen/gl_API.xml'] + env.Glob(GLAPI + 'gen/*.xml') + +env.CodeGenerate( + target = 'indirect.c', + script = GLAPI + 'gen/glX_proto_send.py', + source = sources, + command = python_cmd + ' $SCRIPT -f $SOURCE -m proto > $TARGET' + ) + +env.CodeGenerate( + target = 'indirect_size.c', + script = GLAPI + 'gen/glX_proto_size.py', + source = sources, + 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 = sources, + command = python_cmd + ' $SCRIPT -f $SOURCE -m init_c > $TARGET' +) + +env.CodeGenerate( + target = 'indirect_size.h', + script = GLAPI + 'gen/glX_proto_size.py', + source = sources, + command = python_cmd + ' $SCRIPT -f $SOURCE -m size_h --only-set --header-tag _INDIRECT_SIZE_H > $TARGET' +) + +env.CodeGenerate( + target = 'indirect.h', + script = GLAPI + 'gen/glX_proto_send.py', + source = sources, + command = python_cmd + ' $SCRIPT -m init_h -f $SOURCE > $TARGET', + ) + + libgl = env.InstallSharedLibrary(libgl, version=(1, 2)) env.Alias('glx', libgl)