mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-22 17:28:09 +02:00
This variable won't be set when called from non-automake makefiles, but it cleans up shared-glapi's output. Reviewed-by: Matt Turner <mattst88@gmail.com> Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
44 lines
1.2 KiB
Makefile
44 lines
1.2 KiB
Makefile
# Helpers for glapi header generation
|
|
|
|
ifndef TOP
|
|
$(error TOP must be defined.)
|
|
endif
|
|
|
|
glapi_gen_common_deps := \
|
|
$(wildcard $(TOP)/src/mapi/glapi/gen/*.xml) \
|
|
$(wildcard $(TOP)/src/mapi/glapi/gen/*.py)
|
|
|
|
glapi_gen_mapi_script := $(TOP)/src/mapi/mapi/mapi_abi.py
|
|
glapi_gen_mapi_deps := \
|
|
$(glapi_gen_mapi_script) \
|
|
$(glapi_gen_common_deps)
|
|
|
|
# $(1): path to an XML file
|
|
# $(2): name of the printer
|
|
define glapi_gen_mapi
|
|
@mkdir -p $(dir $@)
|
|
$(AM_V_GEN)$(PYTHON2) $(PYTHON_FLAGS) $(glapi_gen_mapi_script) \
|
|
--mode lib --printer $(2) $(1) > $@
|
|
endef
|
|
|
|
glapi_gen_dispatch_script := $(TOP)/src/mapi/glapi/gen/gl_table.py
|
|
glapi_gen_dispatch_deps := $(glapi_gen_common_deps)
|
|
|
|
# $(1): path to an XML file
|
|
# $(2): empty, es1, or es2 for entry point filtering
|
|
define glapi_gen_dispatch
|
|
@mkdir -p $(dir $@)
|
|
$(AM_V_GEN)$(PYTHON2) $(PYTHON_FLAGS) $(glapi_gen_dispatch_script) \
|
|
-f $(1) -m remap_table $(if $(2),-c $(2),) > $@
|
|
endef
|
|
|
|
glapi_gen_remap_script := $(TOP)/src/mapi/glapi/gen/remap_helper.py
|
|
glapi_gen_remap_deps := $(glapi_gen_common_deps)
|
|
|
|
# $(1): path to an XML file
|
|
# $(2): empty, es1, or es2 for entry point filtering
|
|
define glapi_gen_remap
|
|
@mkdir -p $(dir $@)
|
|
$(AM_V_GEN)$(PYTHON2) $(PYTHON_FLAGS) $(glapi_gen_remap_script) \
|
|
-f $(1) $(if $(2),-c $(2),) > $@
|
|
endef
|