summaryrefslogtreecommitdiffstats
path: root/src/mesa/Makefile.am
diff options
context:
space:
mode:
authorImre Deak <[email protected]>2012-09-10 08:46:13 +0300
committerOliver McFadden <[email protected]>2012-10-10 12:43:19 +0300
commit98f880e0c47229ae6b6063527276096259d60b5a (patch)
treea2503138203f90bb53c2f1a74d1538c2ed18022c /src/mesa/Makefile.am
parent6678125eaee1bbf231d997971cde30f22ba4e013 (diff)
mesa: glGet: add script to generate hash tables in build time
This will be needed by the next patch, which will switch to using the parameter descriptor- and hash tables generated by the script. The hash algorithm remains the same, the output parameter descriptor table format changes slightly. There the TYPE_API_MASK entries are removed and an invalid NULL entry is inserted at the beginning. This is ok, as get.c:find_value() doesn't rely on TYPE_API_MASK any more to detect an invalid enum. Signed-off-by: Imre Deak <[email protected]> Reviewed-by: Brian Paul <[email protected]> Reviewed-by: Oliver McFadden <[email protected]>
Diffstat (limited to 'src/mesa/Makefile.am')
-rw-r--r--src/mesa/Makefile.am12
1 files changed, 12 insertions, 0 deletions
diff --git a/src/mesa/Makefile.am b/src/mesa/Makefile.am
index feec1070da1..1dc3132c748 100644
--- a/src/mesa/Makefile.am
+++ b/src/mesa/Makefile.am
@@ -56,6 +56,7 @@ BUILT_SOURCES = \
main/api_exec_es1_dispatch.h \
main/api_exec_es1_remap_helper.h \
main/api_exec_es1.c \
+ main/get_hash.h \
program/program_parse.tab.c \
program/program_parse.tab.h \
program/lex.yy.c
@@ -83,6 +84,17 @@ program/lex.yy.c: program/program_lexer.l
$(MKDIR_P) program
$(AM_V_GEN) $(LEX) --never-interactive --outfile=$@ $<
+GET_HASH_GEN = main/get_hash_generator.py
+GET_HASH_GEN_FLAGS := $(patsubst -DFEATURE_%=1,-a %, \
+ $(patsubst -DFEATURE_%=0,,$(API_DEFINES)))
+
+main/get_hash.h: $(GLAPI)/gl_and_es_API.xml main/get_hash_params.py \
+ $(GET_HASH_GEN) Makefile
+ $(AM_V_GEN)set -e; \
+ $(PYTHON2) $(PYTHON_FLAGS) $(srcdir)/$(GET_HASH_GEN) \
+ $(GET_HASH_GEN_FLAGS) -f $< > [email protected]; \
+
noinst_LTLIBRARIES =
if NEED_LIBMESA
noinst_LTLIBRARIES += libmesa.la