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',
23 env.Append(CPPDEFINES = [
25 #('DEFAULT_DRIVER_DIR', 'DRI_DRIVER_SEARCH_DIR')
32 env.PkgUseModules('X11')
33 env.PkgUseModules('XCB')
34 env.PkgUseModules('DRM')
36 if env['HAVE_XF86VIDMODE']:
37 env.Append(CPPDEFINES = ['XF86VIDMODE'])
38 env.PkgUseModules('XF86VIDMODE')
40 if False: # XXX: SHARED_GLAPI
41 env.Append(CPPDEFINES = ['GLX_SHARED_GLAPI'])
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',
84 libgl = env.SharedLibrary(
90 # Generate GLX-specific .c and .h files here. Other GL API-related
91 # files are used, but they're generated in mapi/glapi/gen/ since they're
92 # used by other targets as well.
94 GLAPI = '#src/mapi/glapi/'
95 sources = [GLAPI + 'gen/gl_API.xml'] + env.Glob(GLAPI + 'gen/*.xml')
98 target = 'indirect.c',
99 script = GLAPI + 'gen/glX_proto_send.py',
101 command = python_cmd + ' $SCRIPT -f $SOURCE -m proto > $TARGET'
105 target = 'indirect_size.c',
106 script = GLAPI + 'gen/glX_proto_size.py',
108 command = python_cmd + ' $SCRIPT -f $SOURCE -m size_c --only-set > $TARGET'
112 target = 'indirect_init.c',
113 script = GLAPI + 'gen/glX_proto_send.py',
115 command = python_cmd + ' $SCRIPT -f $SOURCE -m init_c > $TARGET'
119 target = 'indirect_size.h',
120 script = GLAPI + 'gen/glX_proto_size.py',
122 command = python_cmd + ' $SCRIPT -f $SOURCE -m size_h --only-set -h _INDIRECT_SIZE_H > $TARGET'
126 target = 'indirect.h',
127 script = GLAPI + 'gen/glX_proto_send.py',
129 command = python_cmd + ' $SCRIPT -m init_h -f $SOURCE > $TARGET',
133 libgl = env.InstallSharedLibrary(libgl, version=(1, 2))
135 env.Alias('glx', libgl)
136 env.Alias('libgl', libgl)