18158ff8b10e9dbacd52beb150d0f4c40065f8f9
[mesa.git] / src / mapi / glapi / gen / SConscript
1 Import('*')
2
3 from sys import executable as python_cmd
4
5
6 # Be conservative and depend on all XML files here. Missing dependencies means
7 # broken builds, whereas extraneous dependencies merely means regenerate the
8 # .[ch] files -- scons should not recompile them though.
9 sources = ['gl_and_es_API.xml'] + env.Glob('*.xml')
10
11
12 # Generate the GL API headers that are used by various parts of the
13 # Mesa and GLX tree. Other .c and .h files are generated elsewhere
14 # if they're only used in one place.
15
16 env.CodeGenerate(
17 target = '../../../mesa/main/dispatch.h',
18 script = 'gl_table.py',
19 source = sources,
20 command = python_cmd + ' $SCRIPT -m remap_table -f $SOURCE > $TARGET',
21 )
22
23 env.CodeGenerate(
24 target = '../../../mapi/glapi/glapitable.h',
25 script = 'gl_table.py',
26 source = sources,
27 command = python_cmd + ' $SCRIPT -f $SOURCE > $TARGET'
28 )
29
30 env.CodeGenerate(
31 target = '../../../mapi/glapi/glapitemp.h',
32 script = 'gl_apitemp.py',
33 source = sources,
34 command = python_cmd + ' $SCRIPT -f $SOURCE > $TARGET'
35 )
36
37 env.CodeGenerate(
38 target = '../../../mapi/glapi/glprocs.h',
39 script = 'gl_procs.py',
40 source = sources,
41 command = python_cmd + ' $SCRIPT -f $SOURCE > $TARGET'
42 )
43
44 env.CodeGenerate(
45 target = '../../../mesa/main/remap_helper.h',
46 script = 'remap_helper.py',
47 source = 'gl_and_es_API.xml',
48 command = python_cmd + ' $SCRIPT -f $SOURCE > $TARGET'
49 )