3 if not env['x11'] or not env['xcb'] or not env['drm']:
6 from sys import executable as python_cmd
10 env.Prepend(CPPPATH = [
11 '.', # the build/<platform>/glx/ directory
13 '#include/GL/internal',
25 env.Append(CPPDEFINES = [
35 env.PkgUseModules('X11')
36 env.PkgUseModules('XCB')
37 env.PkgUseModules('DRM')
38 env.PkgUseModules('XF86VIDMODE')
56 'indirect_window_pos.c',
57 'indirect_texture_compression.c',
58 'indirect_transpose_matrix.c',
59 'indirect_vertex_array.c',
60 'indirect_vertex_program.c',
79 'dri_common_query_renderer.c',
80 'dri_common_interop.c',
85 libgl = env.SharedLibrary(
91 # Generate GLX-specific .c and .h files here. Other GL API-related
92 # files are used, but they're generated in mapi/glapi/gen/ since they're
93 # used by other targets as well.
95 GLAPI = '#src/mapi/glapi/'
96 sources = [GLAPI + 'gen/gl_API.xml'] + env.Glob(GLAPI + 'gen/*.xml')
99 target = 'indirect.c',
100 script = GLAPI + 'gen/glX_proto_send.py',
102 command = python_cmd + ' $SCRIPT -f $SOURCE -m proto > $TARGET'
106 target = 'indirect_size.c',
107 script = GLAPI + 'gen/glX_proto_size.py',
109 command = python_cmd + ' $SCRIPT -f $SOURCE -m size_c --only-set > $TARGET'
113 target = 'indirect_init.c',
114 script = GLAPI + 'gen/glX_proto_send.py',
116 command = python_cmd + ' $SCRIPT -f $SOURCE -m init_c > $TARGET'
120 target = 'indirect_size.h',
121 script = GLAPI + 'gen/glX_proto_size.py',
123 command = python_cmd + ' $SCRIPT -f $SOURCE -m size_h --only-set --header-tag _INDIRECT_SIZE_H > $TARGET'
127 target = 'indirect.h',
128 script = GLAPI + 'gen/glX_proto_send.py',
130 command = python_cmd + ' $SCRIPT -m init_h -f $SOURCE > $TARGET',
134 libgl = env.InstallSharedLibrary(libgl, version=(1, 2))
136 env.Alias('glx', libgl)
137 env.Alias('libgl', libgl)