2012-05-30 17:08:11 +01:00
|
|
|
Import('*')
|
|
|
|
|
|
|
|
from sys import executable as python_cmd
|
|
|
|
|
|
|
|
|
2013-06-27 07:25:10 +01:00
|
|
|
# Be conservative and depend on all XML files here. Missing dependencies means
|
|
|
|
# broken builds, whereas extraneous dependencies merely means regenerate the
|
|
|
|
# .[ch] files -- scons should not recompile them though.
|
|
|
|
sources = ['gl_and_es_API.xml'] + env.Glob('*.xml')
|
|
|
|
|
|
|
|
|
2012-05-30 17:08:11 +01:00
|
|
|
# Generate the GL API headers that are used by various parts of the
|
|
|
|
# Mesa and GLX tree. Other .c and .h files are generated elsewhere
|
|
|
|
# if they're only used in one place.
|
|
|
|
|
2013-01-21 17:47:51 +00:00
|
|
|
env.CodeGenerate(
|
|
|
|
target = '../../../mesa/main/dispatch.h',
|
|
|
|
script = 'gl_table.py',
|
2013-06-27 07:25:10 +01:00
|
|
|
source = sources,
|
2012-05-30 17:08:11 +01:00
|
|
|
command = python_cmd + ' $SCRIPT -m remap_table -f $SOURCE > $TARGET',
|
|
|
|
)
|
|
|
|
|
2013-01-21 17:47:51 +00:00
|
|
|
env.CodeGenerate(
|
|
|
|
target = '../../../mapi/glapi/glapitable.h',
|
|
|
|
script = 'gl_table.py',
|
2013-06-27 07:25:10 +01:00
|
|
|
source = sources,
|
2012-06-01 15:27:21 +01:00
|
|
|
command = python_cmd + ' $SCRIPT -f $SOURCE > $TARGET'
|
|
|
|
)
|
|
|
|
|
2013-01-21 17:47:51 +00:00
|
|
|
env.CodeGenerate(
|
2019-05-31 17:39:32 +01:00
|
|
|
target = '../../../mapi/glapi/gen/glapitemp.h',
|
2013-01-21 17:47:51 +00:00
|
|
|
script = 'gl_apitemp.py',
|
2013-06-27 07:25:10 +01:00
|
|
|
source = sources,
|
2012-05-30 17:08:11 +01:00
|
|
|
command = python_cmd + ' $SCRIPT -f $SOURCE > $TARGET'
|
|
|
|
)
|
|
|
|
|
2013-01-21 17:47:51 +00:00
|
|
|
env.CodeGenerate(
|
|
|
|
target = '../../../mapi/glapi/glprocs.h',
|
|
|
|
script = 'gl_procs.py',
|
2013-06-27 07:25:10 +01:00
|
|
|
source = sources,
|
2014-04-02 20:30:27 +01:00
|
|
|
command = python_cmd + ' $SCRIPT -c -f $SOURCE > $TARGET'
|
2012-05-30 17:08:11 +01:00
|
|
|
)
|
|
|
|
|
2013-01-21 17:47:51 +00:00
|
|
|
env.CodeGenerate(
|
|
|
|
target = '../../../mesa/main/remap_helper.h',
|
|
|
|
script = 'remap_helper.py',
|
2013-07-01 12:04:59 +01:00
|
|
|
source = sources,
|
|
|
|
command = python_cmd + ' $SCRIPT -f $SOURCE > $TARGET'
|
|
|
|
)
|
|
|
|
|
|
|
|
env.CodeGenerate(
|
|
|
|
target = '../../../mesa/main/enums.c',
|
|
|
|
script = 'gl_enums.py',
|
2015-12-01 20:01:53 +00:00
|
|
|
source = '../registry/gl.xml',
|
2013-07-01 12:04:59 +01:00
|
|
|
command = python_cmd + ' $SCRIPT -f $SOURCE > $TARGET'
|
|
|
|
)
|
|
|
|
|
|
|
|
env.CodeGenerate(
|
|
|
|
target = '../../../mesa/main/api_exec.c',
|
|
|
|
script = 'gl_genexec.py',
|
|
|
|
source = sources,
|
2012-05-30 17:08:11 +01:00
|
|
|
command = python_cmd + ' $SCRIPT -f $SOURCE > $TARGET'
|
|
|
|
)
|