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 = [
27 #('DEFAULT_DRIVER_DIR', 'DRI_DRIVER_SEARCH_DIR')
35 env.PkgUseModules('X11')
36 env.PkgUseModules('XCB')
37 env.PkgUseModules('DRM')
39 if env['HAVE_XF86VIDMODE']:
40 env.Append(CPPDEFINES = ['XF86VIDMODE'])
41 env.PkgUseModules('XF86VIDMODE')
59 'indirect_window_pos.c',
60 'indirect_texture_compression.c',
61 'indirect_transpose_matrix.c',
62 'indirect_vertex_array.c',
63 'indirect_vertex_program.c',
82 'dri_common_query_renderer.c',
83 'dri_common_interop.c',
88 libgl = env.SharedLibrary(
94 # Generate GLX-specific .c and .h files here. Other GL API-related
95 # files are used, but they're generated in mapi/glapi/gen/ since they're
96 # used by other targets as well.
98 GLAPI = '#src/mapi/glapi/'
99 sources = [GLAPI + 'gen/gl_API.xml'] + env.Glob(GLAPI + 'gen/*.xml')
102 target = 'indirect.c',
103 script = GLAPI + 'gen/glX_proto_send.py',
105 command = python_cmd + ' $SCRIPT -f $SOURCE -m proto > $TARGET'
109 target = 'indirect_size.c',
110 script = GLAPI + 'gen/glX_proto_size.py',
112 command = python_cmd + ' $SCRIPT -f $SOURCE -m size_c --only-set > $TARGET'
116 target = 'indirect_init.c',
117 script = GLAPI + 'gen/glX_proto_send.py',
119 command = python_cmd + ' $SCRIPT -f $SOURCE -m init_c > $TARGET'
123 target = 'indirect_size.h',
124 script = GLAPI + 'gen/glX_proto_size.py',
126 command = python_cmd + ' $SCRIPT -f $SOURCE -m size_h --only-set --header-tag _INDIRECT_SIZE_H > $TARGET'
130 target = 'indirect.h',
131 script = GLAPI + 'gen/glX_proto_send.py',
133 command = python_cmd + ' $SCRIPT -m init_h -f $SOURCE > $TARGET',
137 libgl = env.InstallSharedLibrary(libgl, version=(1, 2))
139 env.Alias('glx', libgl)
140 env.Alias('libgl', libgl)