1 # Helpers for glapi header generation 2 3 glapi_gen_common_deps := \ 4 $(wildcard $(top_srcdir)/src/mapi/glapi/gen/*.xml) \ 5 $(wildcard $(top_srcdir)/src/mapi/glapi/gen/*.py) 6 7 glapi_gen_mapi_script := $(top_srcdir)/src/mapi/mapi/mapi_abi.py 8 glapi_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 14 define glapi_gen_mapi 15 @mkdir -p $(dir $@) 16 $(AM_V_GEN)$(PYTHON2) $(PYTHON_FLAGS) $(glapi_gen_mapi_script) \ 17 --mode lib --printer $(2) $(1) > $@ 18 endef 19 20 glapi_gen_dispatch_script := $(top_srcdir)/src/mapi/glapi/gen/gl_table.py 21 glapi_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 25 define 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),) > $@ 29 endef 30 31 glapi_gen_remap_script := $(top_srcdir)/src/mapi/glapi/gen/remap_helper.py 32 glapi_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 36 define 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),) > $@ 40 endef 41