1Import('*') 2 3from sys import executable as python_cmd 4 5 6# Generate the GL API headers that are used by various parts of the 7# Mesa and GLX tree. Other .c and .h files are generated elsewhere 8# if they're only used in one place. 9 10GLAPI = '#src/mapi/glapi/' 11 12glapi_headers = [] 13 14glapi_headers += env.CodeGenerate( 15 target = '#src/mesa/main/dispatch.h', 16 script = GLAPI + 'gen/gl_table.py', 17 source = GLAPI + 'gen/gl_API.xml', 18 command = python_cmd + ' $SCRIPT -m remap_table -f $SOURCE > $TARGET', 19 ) 20 21glapi_headers += env.CodeGenerate( 22 target = '#src/mapi/glapi/glapitable.h', 23 script = GLAPI + 'gen/gl_table.py', 24 source = GLAPI + 'gen/gl_API.xml', 25 command = python_cmd + ' $SCRIPT -f $SOURCE > $TARGET' 26 ) 27 28glapi_headers += env.CodeGenerate( 29 target = '#src/mapi/glapi/glapitemp.h', 30 script = GLAPI + 'gen/gl_apitemp.py', 31 source = GLAPI + 'gen/gl_API.xml', 32 command = python_cmd + ' $SCRIPT -f $SOURCE > $TARGET' 33 ) 34 35glapi_headers += env.CodeGenerate( 36 target = '#src/mapi/glapi/glprocs.h', 37 script = GLAPI + 'gen/gl_procs.py', 38 source = GLAPI + 'gen/gl_API.xml', 39 command = python_cmd + ' $SCRIPT -f $SOURCE > $TARGET' 40 ) 41 42glapi_headers += env.CodeGenerate( 43 target = '#src/mesa/main/remap_helper.h', 44 script = GLAPI + 'gen/remap_helper.py', 45 source = GLAPI + 'gen/gl_API.xml', 46 command = python_cmd + ' $SCRIPT -f $SOURCE > $TARGET' 47 ) 48 49env.Export('glapi_headers') 50