• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1# Helpers for glapi header generation
2
3glapi_gen_common_deps := \
4	$(wildcard $(top_srcdir)/src/mapi/glapi/gen/*.xml) \
5	$(wildcard $(top_srcdir)/src/mapi/glapi/gen/*.py)
6
7glapi_gen_mapi_script := $(top_srcdir)/src/mapi/mapi/mapi_abi.py
8glapi_gen_mapi_deps := \
9	$(glapi_gen_mapi_script) \
10	$(glapi_gen_common_deps)
11
12# $(1): path to an XML file
13# $(2): name of the printer
14define glapi_gen_mapi
15@mkdir -p $(dir $@)
16$(AM_V_GEN)$(PYTHON2) $(PYTHON_FLAGS) $(glapi_gen_mapi_script) \
17	--mode lib --printer $(2) $(1) > $@
18endef
19
20glapi_gen_dispatch_script := $(top_srcdir)/src/mapi/glapi/gen/gl_table.py
21glapi_gen_dispatch_deps := $(glapi_gen_common_deps)
22
23# $(1): path to an XML file
24# $(2): empty, es1, or es2 for entry point filtering
25define glapi_gen_dispatch
26@mkdir -p $(dir $@)
27$(AM_V_GEN)$(PYTHON2) $(PYTHON_FLAGS) $(glapi_gen_dispatch_script) \
28	-f $(1) -m remap_table $(if $(2),-c $(2),) > $@
29endef
30
31glapi_gen_remap_script := $(top_srcdir)/src/mapi/glapi/gen/remap_helper.py
32glapi_gen_remap_deps := $(glapi_gen_common_deps)
33
34# $(1): path to an XML file
35# $(2): empty, es1, or es2 for entry point filtering
36define glapi_gen_remap
37@mkdir -p $(dir $@)
38$(AM_V_GEN)$(PYTHON2) $(PYTHON_FLAGS) $(glapi_gen_remap_script) \
39	-f $(1) $(if $(2),-c $(2),) > $@
40endef
41