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')
43 if False: # XXX: SHARED_GLAPI
44 env.Append(CPPDEFINES = ['GLX_SHARED_GLAPI'])
62 'indirect_window_pos.c',
63 'indirect_texture_compression.c',
64 'indirect_transpose_matrix.c',
65 'indirect_vertex_array.c',
66 'indirect_vertex_program.c',
85 'dri_common_query_renderer.c',
90 libgl = env.SharedLibrary(
96 # Generate GLX-specific .c and .h files here. Other GL API-related
97 # files are used, but they're generated in mapi/glapi/gen/ since they're
98 # used by other targets as well.
100 GLAPI = '#src/mapi/glapi/'
101 sources = [GLAPI + 'gen/gl_API.xml'] + env.Glob(GLAPI + 'gen/*.xml')
104 target = 'indirect.c',
105 script = GLAPI + 'gen/glX_proto_send.py',
107 command = python_cmd + ' $SCRIPT -f $SOURCE -m proto > $TARGET'
111 target = 'indirect_size.c',
112 script = GLAPI + 'gen/glX_proto_size.py',
114 command = python_cmd + ' $SCRIPT -f $SOURCE -m size_c --only-set > $TARGET'
118 target = 'indirect_init.c',
119 script = GLAPI + 'gen/glX_proto_send.py',
121 command = python_cmd + ' $SCRIPT -f $SOURCE -m init_c > $TARGET'
125 target = 'indirect_size.h',
126 script = GLAPI + 'gen/glX_proto_size.py',
128 command = python_cmd + ' $SCRIPT -f $SOURCE -m size_h --only-set -h _INDIRECT_SIZE_H > $TARGET'
132 target = 'indirect.h',
133 script = GLAPI + 'gen/glX_proto_send.py',
135 command = python_cmd + ' $SCRIPT -m init_h -f $SOURCE > $TARGET',
139 libgl = env.InstallSharedLibrary(libgl, version=(1, 2))
141 env.Alias('glx', libgl)
142 env.Alias('libgl', libgl)