summaryrefslogtreecommitdiffstats
path: root/src/vpp-api/vapi/Makefile.am
diff options
context:
space:
mode:
authorKlement Sekera <ksekera@cisco.com>2017-06-12 06:49:33 +0200
committerNeale Ranns <nranns@cisco.com>2017-09-19 20:06:08 +0000
commitdc15be2ca7c51772b00e4c5548934a35aa7e4add (patch)
treeba4b707b73d21d3875264248a3affa93249816d3 /src/vpp-api/vapi/Makefile.am
parent9d063047eb1a3738cb0fc9ebebb55793d155bb20 (diff)
Add C++ API
Change-Id: Iff634f22d43470e2dc028387b3816257fd7b4156 Signed-off-by: Klement Sekera <ksekera@cisco.com>
Diffstat (limited to 'src/vpp-api/vapi/Makefile.am')
-rw-r--r--src/vpp-api/vapi/Makefile.am27
1 files changed, 19 insertions, 8 deletions
diff --git a/src/vpp-api/vapi/Makefile.am b/src/vpp-api/vapi/Makefile.am
index ce681c38459..74b2b47e8e4 100644
--- a/src/vpp-api/vapi/Makefile.am
+++ b/src/vpp-api/vapi/Makefile.am
@@ -15,7 +15,7 @@ AUTOMAKE_OPTIONS = foreign
ACLOCAL_AMFLAGS = -I m4
AM_LIBTOOLFLAGS = --quiet
-AM_CFLAGS = -Wall -I${top_srcdir} -I${top_builddir} -I. -I$(top_srcdir)/vpp-api/vapi
+AM_CFLAGS = -Wall -I${top_srcdir} -I${top_builddir} -I. -I$(top_srcdir)/vpp-api/
AM_LDFLAGS = -shared -avoid-version -rpath /none -no-undefined
@@ -23,26 +23,33 @@ bin_PROGRAMS =
noinst_LTLIBRARIES =
CLEANDIRS =
-%.api.vapi.h: %.api.json vapi_c_gen.py
+vapi/%.api.vapi.h: %.api.json vapi_c_gen.py vapi_json_parser.py
@echo " VAPI C GEN $< " $@ ; \
mkdir -p `dirname $@` ; \
- $(top_srcdir)/vpp-api/vapi/vapi_c_gen.py $<
+ $(top_srcdir)/vpp-api/vapi/vapi_c_gen.py --prefix=vapi $<
+
+vapi/%.api.vapi.hpp: %.api.json vapi_cpp_gen.py vapi_c_gen.py vapi_json_parser.py
+ @echo " VAPI CPP GEN $< " $@ ; \
+ mkdir -p `dirname $@` ; \
+ $(top_srcdir)/vpp-api/vapi/vapi_cpp_gen.py --prefix=vapi --gen-h-prefix=vapi $<
%.api.json:
find $(top_builddir) -name '$@' | xargs ln -s
BUILT_SOURCES = $(shell find $(top_builddir) -name '*.api.json' | xargs -n1 basename) \
- $(patsubst %.api.json,%.api.vapi.h,$(JSON_FILES))
+ $(patsubst %.api.json,vapi/%.api.vapi.h,$(JSON_FILES)) \
+ $(patsubst %.api.json,vapi/%.api.vapi.hpp,$(JSON_FILES))
vapi.c: $(BUILT_SOURCES)
JSON_FILES = $(wildcard *.api.json)
-
lib_LTLIBRARIES = libvapiclient.la
libvapiclient_la_SOURCES = vapi.c
+libvapiclient_la_DEPENDENCIES = libvapiclient.map
+
libvapiclient_la_LIBADD = -lpthread -lm -lrt \
$(top_builddir)/libvppinfra.la \
$(top_builddir)/libvlibmemoryclient.la \
@@ -54,10 +61,14 @@ libvapiclient_la_LDFLAGS = \
libvapiclient_la_CPPFLAGS = -I. -I$(top_builddir)/vpp-api/vapi
-nobase_include_HEADERS = ${top_srcdir}/vpp-api/client/vppapiclient.h \
- vapi.h \
+vapiincludedir = $(includedir)/vapi
+
+vapiinclude_HEADERS = vapi.h \
+ vapi.hpp \
vapi_dbg.h \
+ vapi_common.h \
vapi_internal.h \
- $(patsubst %.api.json,%.api.vapi.h,$(JSON_FILES))
+ $(patsubst %.api.json,vapi/%.api.vapi.h,$(JSON_FILES)) \
+ $(patsubst %.api.json,vapi/%.api.vapi.hpp,$(JSON_FILES))
# vi:syntax=automake