summaryrefslogtreecommitdiffstats
path: root/plugins/sample-plugin
diff options
context:
space:
mode:
Diffstat (limited to 'plugins/sample-plugin')
-rw-r--r--plugins/sample-plugin/Makefile.am11
1 files changed, 10 insertions, 1 deletions
diff --git a/plugins/sample-plugin/Makefile.am b/plugins/sample-plugin/Makefile.am
index 0b213791c1a..e221f8c1aa9 100644
--- a/plugins/sample-plugin/Makefile.am
+++ b/plugins/sample-plugin/Makefile.am
@@ -25,7 +25,7 @@ vppplugins_LTLIBRARIES = sample_plugin.la
sample_plugin_la_SOURCES = sample/sample.c sample/node.c \
sample/sample_plugin.api.h
-BUILT_SOURCES = sample/sample.api.h
+BUILT_SOURCES = sample/sample.api.h sample/sample.api.json
SUFFIXES = .api.h .api
@@ -34,6 +34,15 @@ SUFFIXES = .api.h .api
$(CC) $(CPPFLAGS) -E -P -C -x c $^ \
| vppapigen --input - --output $@ --show-name $@
+%.api.json: %.api
+ @echo " JSON APIGEN " $@ ; \
+ mkdir -p `dirname $@` ; \
+ $(CC) $(CPPFLAGS) -E -P -C -x c $^ \
+ | vppapigen --input - --json $@
+
+apidir = $(prefix)/sample/
+api_DATA = sample.api.json
+
noinst_HEADERS = \
sample/sample_all_api_h.h \
sample/sample_msg_enum.h \