Home | History | Annotate | Download | only in gen
      1 Import('*')
      2 
      3 from 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 
     10 GLAPI = '#src/mapi/glapi/'
     11 
     12 glapi_headers = []
     13 
     14 glapi_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 
     21 glapi_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 
     28 glapi_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 
     35 glapi_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 
     42 glapi_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 
     49 env.Export('glapi_headers')
     50