glapi: Generate GL API marshalling code from the XML.
[mesa.git] / src / mesa / SConscript
index e375de6ee77b7f4372abe95452b141e6060ba220..9398ddb13bfa6064e839155bf1cdaac4d90ca827 100644 (file)
@@ -118,6 +118,22 @@ if env['platform'] not in ('cygwin', 'darwin', 'windows', 'haiku'):
         env.Prepend(CPPPATH = [matypes[0].dir])
 
 
+# The marshal_generated.c file is generated from the GL/ES API.xml file
+env.CodeGenerate(
+    target = 'main/marshal_generated.c',
+    script = GLAPI + 'gen/gl_marshal.py',
+    source = GLAPI + 'gen/gl_and_es_API.xml',
+    command = python_cmd + ' $SCRIPT -f $SOURCE > $TARGET'
+    )
+
+# The marshal_generated.h file is generated from the GL/ES API.xml file
+env.CodeGenerate(
+    target = 'main/marshal_generated.h',
+    script = GLAPI + 'gen/gl_marshal_h.py',
+    source = GLAPI + 'gen/gl_and_es_API.xml',
+    command = python_cmd + ' $SCRIPT -f $SOURCE > $TARGET'
+    )
+
 #
 # Libraries
 #