aboutsummaryrefslogtreecommitdiff
path: root/mesalib/src/mapi/glapi/gen/glapi_gen.mk
diff options
context:
space:
mode:
authormarha <marha@users.sourceforge.net>2011-08-29 08:51:20 +0200
committermarha <marha@users.sourceforge.net>2011-08-29 08:51:20 +0200
commit01df5d59e56a1b060568f8cad2e89f7eea22fc70 (patch)
tree9db83037fd85d0974b60fc1a05e0665083f26000 /mesalib/src/mapi/glapi/gen/glapi_gen.mk
parentfd1f4d9fe3ea67fa6def8ee4927a8f71e0440f12 (diff)
downloadvcxsrv-01df5d59e56a1b060568f8cad2e89f7eea22fc70.tar.gz
vcxsrv-01df5d59e56a1b060568f8cad2e89f7eea22fc70.tar.bz2
vcxsrv-01df5d59e56a1b060568f8cad2e89f7eea22fc70.zip
xwininfo libX11 libXmu libxcb mesa xserver xkeyboard-config git update 29
aug 2011
Diffstat (limited to 'mesalib/src/mapi/glapi/gen/glapi_gen.mk')
-rw-r--r--mesalib/src/mapi/glapi/gen/glapi_gen.mk44
1 files changed, 44 insertions, 0 deletions
diff --git a/mesalib/src/mapi/glapi/gen/glapi_gen.mk b/mesalib/src/mapi/glapi/gen/glapi_gen.mk
new file mode 100644
index 000000000..c7fa7c015
--- /dev/null
+++ b/mesalib/src/mapi/glapi/gen/glapi_gen.mk
@@ -0,0 +1,44 @@
+# 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 $@)
+$(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 $@)
+$(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 $@)
+$(PYTHON2) $(PYTHON_FLAGS) $(glapi_gen_remap_script) \
+ -f $(1) $(if $(2),-c $(2),) > $@
+endef