summaryrefslogtreecommitdiffstats
path: root/plugins/snat-plugin
diff options
context:
space:
mode:
Diffstat (limited to 'plugins/snat-plugin')
-rw-r--r--plugins/snat-plugin/Makefile.am11
1 files changed, 10 insertions, 1 deletions
diff --git a/plugins/snat-plugin/Makefile.am b/plugins/snat-plugin/Makefile.am
index 0fe694cf7bd..91fec414363 100644
--- a/plugins/snat-plugin/Makefile.am
+++ b/plugins/snat-plugin/Makefile.am
@@ -28,7 +28,7 @@ snat_plugin_la_SOURCES = snat/snat.c \
snat/out2in.c \
snat/snat_plugin.api.h
-BUILT_SOURCES = snat/snat.api.h
+BUILT_SOURCES = snat/snat.api.h snat/snat.py
SUFFIXES = .api.h .api
@@ -37,6 +37,15 @@ SUFFIXES = .api.h .api
$(CC) $(CPPFLAGS) -E -P -C -x c $^ \
| vppapigen --input - --output $@ --show-name $@
+%.py: %.api
+ $(info Creating Python binding for $@)
+ $(CC) $(CPPFLAGS) -E -P -C -x c $< \
+ | vppapigen --input - --python - \
+ | pyvppapigen.py --input - > $@
+
+pyapidir = ${prefix}/vpp_papi_plugins
+pyapi_DATA = snat/snat.py
+
noinst_HEADERS = \
snat/snat_all_api_h.h \
snat/snat_msg_enum.h \