+
+# Generate GLX-specific .c and .h files here. Other GL API-related
+# files are used, but they're generated in mapi/glapi/gen/ since they're
+# used by other targets as well.
+
+GLAPI = '#src/mapi/glapi/'
+sources = [GLAPI + 'gen/gl_API.xml'] + env.Glob(GLAPI + 'gen/*.xml')
+
+env.CodeGenerate(
+ target = 'indirect.c',
+ script = GLAPI + 'gen/glX_proto_send.py',
+ source = sources,
+ command = python_cmd + ' $SCRIPT -f $SOURCE -m proto > $TARGET'
+ )
+
+env.CodeGenerate(
+ target = 'indirect_size.c',
+ script = GLAPI + 'gen/glX_proto_size.py',
+ source = sources,
+ command = python_cmd + ' $SCRIPT -f $SOURCE -m size_c --only-set > $TARGET'
+)
+
+env.CodeGenerate(
+ target = 'indirect_init.c',
+ script = GLAPI + 'gen/glX_proto_send.py',
+ source = sources,
+ command = python_cmd + ' $SCRIPT -f $SOURCE -m init_c > $TARGET'
+)
+
+env.CodeGenerate(
+ target = 'indirect_size.h',
+ script = GLAPI + 'gen/glX_proto_size.py',
+ source = sources,
+ command = python_cmd + ' $SCRIPT -f $SOURCE -m size_h --only-set --header-tag _INDIRECT_SIZE_H > $TARGET'
+)
+
+env.CodeGenerate(
+ target = 'indirect.h',
+ script = GLAPI + 'gen/glX_proto_send.py',
+ source = sources,
+ command = python_cmd + ' $SCRIPT -m init_h -f $SOURCE > $TARGET',
+ )
+
+