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',
24 env.Append(CPPDEFINES = [
26 #('DEFAULT_DRIVER_DIR', 'DRI_DRIVER_SEARCH_DIR')
34 env.PkgUseModules('X11')
35 env.PkgUseModules('XCB')
36 env.PkgUseModules('DRM')
38 if env['HAVE_XF86VIDMODE']:
39 env.Append(CPPDEFINES = ['XF86VIDMODE'])
40 env.PkgUseModules('XF86VIDMODE')
42 if False: # XXX: SHARED_GLAPI
43 env.Append(CPPDEFINES = ['GLX_SHARED_GLAPI'])
61 'indirect_window_pos.c',
62 'indirect_texture_compression.c',
63 'indirect_transpose_matrix.c',
64 'indirect_vertex_array.c',
65 'indirect_vertex_program.c',
84 'dri2_query_renderer.c',
89 libgl = env.SharedLibrary(
95 # Generate GLX-specific .c and .h files here. Other GL API-related
96 # files are used, but they're generated in mapi/glapi/gen/ since they're
97 # used by other targets as well.
99 GLAPI = '#src/mapi/glapi/'
100 sources = [GLAPI + 'gen/gl_API.xml'] + env.Glob(GLAPI + 'gen/*.xml')
103 target = 'indirect.c',
104 script = GLAPI + 'gen/glX_proto_send.py',
106 command = python_cmd + ' $SCRIPT -f $SOURCE -m proto > $TARGET'
110 target = 'indirect_size.c',
111 script = GLAPI + 'gen/glX_proto_size.py',
113 command = python_cmd + ' $SCRIPT -f $SOURCE -m size_c --only-set > $TARGET'
117 target = 'indirect_init.c',
118 script = GLAPI + 'gen/glX_proto_send.py',
120 command = python_cmd + ' $SCRIPT -f $SOURCE -m init_c > $TARGET'
124 target = 'indirect_size.h',
125 script = GLAPI + 'gen/glX_proto_size.py',
127 command = python_cmd + ' $SCRIPT -f $SOURCE -m size_h --only-set -h _INDIRECT_SIZE_H > $TARGET'
131 target = 'indirect.h',
132 script = GLAPI + 'gen/glX_proto_send.py',
134 command = python_cmd + ' $SCRIPT -m init_h -f $SOURCE > $TARGET',
138 libgl = env.InstallSharedLibrary(libgl, version=(1, 2))
140 env.Alias('glx', libgl)
141 env.Alias('libgl', libgl)