Move java,lua api and remaining plugins to src/

Change-Id: I1c3b87e886603678368428ae56a6bd3327cbc90d
Signed-off-by: Damjan Marion <damarion@cisco.com>
This commit is contained in:
Damjan Marion
2016-12-28 18:38:59 +01:00
parent fdc62abdc1
commit cb034b9b37
253 changed files with 719 additions and 2298 deletions

10
.gitignore vendored
View File

@ -80,11 +80,11 @@ GTAGS
*.pyc
# Python api generator
/vpp-api/python/build
/vpp-api/python/dist
/vpp-api/python/vpp_papi.egg-info
/vpp-api/python/vpp_papi/memclnt.py
/vpp-api/python/vpp_papi/vpe.py
/src/vpp-api/python/build
/src/vpp-api/python/dist
/src/vpp-api/python/vpp_papi.egg-info
/src/vpp-api/python/vpp_papi/memclnt.py
/src/vpp-api/python/vpp_papi/vpe.py
# Build files in the test directory
/test/*.ok

View File

@ -57,7 +57,7 @@ endif
.PHONY: help bootstrap wipe wipe-release build build-release rebuild rebuild-release
.PHONY: run run-release debug debug-release build-vat run-vat pkg-deb pkg-rpm
.PHONY: ctags cscope plugins plugins-release build-vpp-api
.PHONY: ctags cscope
.PHONY: test test-debug retest retest-debug test-doc test-wipe-doc test-help test-wipe
.PHONY: test-cov test-wipe-cov
@ -69,8 +69,6 @@ help:
@echo " wipe-release - wipe all products of release build "
@echo " build - build debug binaries"
@echo " build-release - build release binaries"
@echo " plugins - build debug plugin binaries"
@echo " plugins-release - build release plugin binaries"
@echo " rebuild - wipe and build debug binares"
@echo " rebuild-release - wipe and build release binares"
@echo " run - run debug binary"
@ -83,8 +81,6 @@ help:
@echo " retest - run functional tests"
@echo " retest-debug - run functional tests (debug build)"
@echo " test-help - show help on test framework"
@echo " build-vat - build vpp-api-test tool"
@echo " build-vpp-api - build vpp-api"
@echo " run-vat - run vpp-api-test tool"
@echo " pkg-deb - build DEB packages"
@echo " pkg-rpm - build RPM packages"
@ -206,19 +202,10 @@ wipe-release: $(BR)/.bootstrap.ok
rebuild-release: wipe-release build-release
plugins: $(BR)/.bootstrap.ok
$(call make,$(PLATFORM)_debug,plugins-install)
plugins-release: $(BR)/.bootstrap.ok
$(call make,$(PLATFORM),plugins-install)
build-vpp-api: $(BR)/.bootstrap.ok
$(call make,$(PLATFORM)_debug,vpp-api-install)
VPP_PYTHON_PREFIX=$(BR)/python
define test
$(if $(filter-out $(3),retest),make -C $(BR) PLATFORM=$(1) TAG=$(2) vpp-api-install plugins-install vpp-install,)
$(if $(filter-out $(3),retest),make -C $(BR) PLATFORM=$(1) TAG=$(2) vpp-install,)
make -C test \
BR=$(BR) \
VPP_TEST_BUILD_DIR=$(BR)/build-$(2)-native \
@ -265,12 +252,12 @@ define run
@echo "WARNING: STARTUP_CONF not defined or file doesn't exist."
@echo " Running with minimal startup config: $(MINIMAL_STARTUP_CONF)\n"
@cd $(STARTUP_DIR) && \
sudo $(2) $(1)/vpp/bin/vpp $(MINIMAL_STARTUP_CONF) plugin_path $(1)/plugins/lib64/vpp_plugins
sudo $(2) $(1)/vpp/bin/vpp $(MINIMAL_STARTUP_CONF) plugin_path $(1)/vpp/lib64/vpp_plugins
endef
else
define run
@cd $(STARTUP_DIR) && \
sudo $(2) $(1)/vpp/bin/vpp $(shell cat $(STARTUP_CONF) | sed -e 's/#.*//') plugin_path $(1)/plugins/lib64/vpp_plugins
sudo $(2) $(1)/vpp/bin/vpp $(shell cat $(STARTUP_CONF) | sed -e 's/#.*//') plugin_path $(1)/vpp/lib64/vpp_plugins
endef
endif

View File

@ -1,34 +0,0 @@
plugins_configure_depend = \
vpp-api-install \
vpp-install
plugins_CPPFLAGS = $(call installed_includes_fn, \
vpp \
vpp-api)
plugins_LDFLAGS = $(call installed_libs_fn, \
vpp)
ifeq ($($(PLATFORM)_enable_tests),yes)
plugins_configure_args += --enable-tests
endif
# Platform dependent configure flags
plugins_configure_args += $(plugins_configure_args_$(PLATFORM))
# include & link with openssl only if needed
ifneq ($($(PLATFORM)_uses_openssl),no)
plugins_CPPFLAGS += $(call installed_includes_fn, openssl)
plugins_LDFLAGS += $(call installed_libs_fn, openssl)
endif
ifneq ($($(PLATFORM)_uses_dpdk),no)
ifeq ($($(PLATFORM)_uses_external_dpdk),yes)
plugins_CPPFLAGS += -I$($(PLATFORM)_dpdk_inc_dir)
plugins_LDFLAGS += -L$($(PLATFORM)_dpdk_lib_dir)
else
plugins_configure_depend += dpdk-install
plugins_CPPFLAGS += $(call installed_includes_fn, dpdk)
plugins_LDFLAGS += $(call installed_libs_fn, dpdk)
endif
endif

View File

@ -1,47 +0,0 @@
vnet_configure_depend = \
vppinfra-install \
svm-install \
vlib-api-install \
vlib-install
vnet_CPPFLAGS = $(call installed_includes_fn, \
vppinfra \
svm \
vlib \
vlib-api)
vnet_LDFLAGS = $(call installed_libs_fn, \
vppinfra \
svm \
vlib \
vlib-api)
ifeq ($($(PLATFORM)_enable_tests),yes)
vnet_configure_args += --enable-tests
endif
# Platform dependent configure flags
vnet_configure_args += $(vnet_configure_args_$(PLATFORM))
# include & link with openssl only if needed
ifneq ($($(PLATFORM)_uses_openssl),no)
vnet_CPPFLAGS += $(call installed_includes_fn, openssl)
vnet_LDFLAGS += $(call installed_libs_fn, openssl)
endif
ifneq ($($(PLATFORM)_uses_dpdk),no)
ifeq ($($(PLATFORM)_uses_external_dpdk),yes)
vnet_CPPFLAGS += -I$($(PLATFORM)_dpdk_inc_dir)
vnet_LDFLAGS += -L$($(PLATFORM)_dpdk_lib_dir)
else
vnet_configure_depend += dpdk-install
vnet_CPPFLAGS += $(call installed_includes_fn, dpdk)
vnet_LDFLAGS += $(call installed_libs_fn, dpdk)
endif
ifeq ($($(PLATFORM)_uses_dpdk_cryptodev),yes)
vnet_configure_args += --with-dpdk-crypto
endif
ifeq ($($(PLATFORM)_uses_dpdk_mlx5_pmd),yes)
vnet_configure_args += --with-dpdk-mlx5-pmd
endif
endif

View File

@ -1,9 +0,0 @@
vpp-api_configure_depend = \
vpp-install
vpp-api_CPPFLAGS = $(call installed_includes_fn, \
vpp)
vpp-api_LDFLAGS =
vpp-api_CPPFLAGS += -I/usr/lib/jvm/java-8-openjdk-amd64/include

View File

@ -25,7 +25,7 @@ install-deb: $(patsubst %,%-find-source,$(ROOT_PACKAGES))
\
: generate file manifests ; \
find $(INSTALL_PREFIX)$(ARCH)/*/bin -type f -print \
| sed -e 's:.*:../& /usr/bin:' \
| sed -e 's:.*:../& /usr/bin:' | grep -v vppapigen \
> deb/debian/vpp.install ; \
\
: core api definitions ; \
@ -51,9 +51,17 @@ install-deb: $(patsubst %,%-find-source,$(ROOT_PACKAGES))
./scripts/find-plugins-contents $(INSTALL_PREFIX)$(ARCH) \
deb/debian/vpp-plugins.install ; \
\
: python-api package ; \
./scripts/find-python-api-contents $(INSTALL_PREFIX)$(ARCH) \
deb/debian/vpp-python-api.install ; \
: vpp-api-lua package ; \
./scripts/find-vpp-api-lua-contents $(INSTALL_PREFIX)$(ARCH) \
deb/debian/vpp-api-lua.install ; \
\
: vpp-api-java package ; \
./scripts/find-vpp-api-java-contents $(INSTALL_PREFIX)$(ARCH) \
deb/debian/vpp-api-java.install ; \
\
: vpp-api-python package ; \
./scripts/find-vpp-api-python-contents $(INSTALL_PREFIX)$(ARCH) \
deb/debian/vpp-api-python.install ; \
\
: dpdk headers ; \
./scripts/find-dpdk-contents $(INSTALL_PREFIX)$(ARCH) \
@ -70,9 +78,9 @@ install-deb: $(patsubst %,%-find-source,$(ROOT_PACKAGES))
: dev package needs a couple of additions ; \
echo ../build-tool-native/tools/vppapigen /usr/bin \
>> deb/debian/vpp-dev.install ; \
echo ../../vpp-api/java/jvpp/gen/jvpp_gen.py /usr/bin \
echo ../../src/vpp-api/java/jvpp/gen/jvpp_gen.py /usr/bin \
>> deb/debian/vpp-dev.install ; \
for i in $$(ls ../vpp-api/java/jvpp/gen/jvppgen/*.py); do \
for i in $$(ls ../src/vpp-api/java/jvpp/gen/jvppgen/*.py); do \
echo ../$${i} /usr/lib/python2.7/dist-packages/jvppgen \
>> deb/debian/vpp-dev.install; \
done; \

View File

@ -29,15 +29,13 @@ vpp_uses_dpdk = yes
# Uncoment to enable building unit tests
# vpp_enable_tests = yes
vpp_root_packages = vpp vpp-api gmod plugins
vpp_root_packages = vpp gmod
vpp_configure_args_vpp = --with-dpdk
# Set these parameters carefully. The vlib_buffer_t is 128 bytes, i.e.
vlib_configure_args_vpp = --with-pre-data=128
plugins_configure_args_vpp = --with-dpdk
# DPDK configuration parameters
# vpp_uses_dpdk_cryptodev = yes
# vpp_uses_dpdk_mlx5_pmd = yes

View File

@ -27,7 +27,7 @@ vpp_lite_uses_dpdk = no
# Uncoment to enable building unit tests
#vpp_lite_enable_tests = yes
vpp_lite_root_packages = vpp vpp-api gmod
vpp_lite_root_packages = vpp gmod
vlib_configure_args_vpp_lite = --with-pre-data=128

View File

@ -11,4 +11,6 @@ vpp-dpdk-dev/
vpp-dpdk-dkms/
vpp-dbg/
vppctl/
vpp-python-api/
vpp-api-lua/
vpp-api-java/
vpp-api-python/

View File

@ -60,7 +60,21 @@ Depends: ${shlibs:Depends}, ${misc:Depends}
Description: DPDK 2.1 igb_uio_driver
This package contains Linux kernel modules distributed with DPDK.
Package: vpp-python-api
Package: vpp-api-lua
Architecture: any
Depends: ${python:Depends}, ${misc:Depends}, vpp (= ${source:Version})
Description: VPP LUA API bindings
This package contains VPP lua api bindings
.
Package: vpp-api-java
Architecture: any
Depends: ${python:Depends}, ${misc:Depends}, vpp (= ${source:Version})
Description: VPP Java API bindings
This package contains VPP java api bindings
.
Package: vpp-api-python
Architecture: any
Depends: ${python:Depends}, ${misc:Depends}, vpp (= ${source:Version})
Description: VPP Python API bindings

View File

@ -1,3 +1,3 @@
tools_source = src
tools_configure_args = --disable-vlib
tools_configure_args = --disable-vlib --disable-svm --disable-japi

View File

@ -71,12 +71,28 @@ Requires: vpp = %{_version}-%{_release}
%description plugins
This package contains VPP plugins
%package python-api
%package api-lua
Summary: VPP api lua bindings
Group: Development/Libraries
Requires: vpp = %{_version}-%{_release}, vpp-lib = %{_version}-%{_release}
%description api-lua
This package contains the lua bindings for the vpp api
%package api-java
Summary: VPP api java bindings
Group: Development/Libraries
Requires: vpp = %{_version}-%{_release}, vpp-lib = %{_version}-%{_release}
%description api-java
This package contains the java bindings for the vpp api
%package api-python
Summary: VPP api python bindings
Group: Development/Libraries
Requires: vpp = %{_version}-%{_release}, vpp-lib = %{_version}-%{_release}, python-setuptools
%description python-api
%description api-python
This package contains the python bindings for the vpp api
%prep
@ -131,6 +147,22 @@ do
install -p -m 644 $file %{buildroot}/usr/share/vpp/api
done
# Lua bindings
mkdir -p -m755 %{buildroot}/usr/share/doc/vpp/examples/lua/examples/cli
mkdir -p -m755 %{buildroot}/usr/share/doc/vpp/examples/lua/examples/lute
for file in $(cd %{_mu_build_dir}/%{_vpp_install_dir}/../../src/vpp-api/lua && git ls-files .)
do
install -p -m 644 %{_mu_build_dir}/%{_vpp_install_dir}/../../src/vpp-api/lua/$file \
%{buildroot}/usr/share/doc/vpp/examples/lua/$file
done
# Java bindings
mkdir -p -m755 %{buildroot}/usr/share/java
for file in $(find %{_mu_build_dir}/%{_vpp_install_dir}/vpp/share/java -type f -name '*.jar' -print )
do
install -p -m 644 $file %{buildroot}/usr/share/java
done
# Python bindings
mkdir -p -m755 %{buildroot}%{python2_sitelib}
install -p -m 666 %{_mu_build_dir}/%{_vpp_install_dir}/*/lib/python2.7/site-packages/vpp_papi-*.egg %{buildroot}%{python2_sitelib}
@ -151,16 +183,16 @@ do
done
mkdir -p -m755 %{buildroot}%{python2_sitelib}/jvppgen
install -p -m755 %{_mu_build_dir}/../vpp-api/java/jvpp/gen/jvpp_gen.py %{buildroot}/usr/bin
for i in $(ls %{_mu_build_dir}/../vpp-api/java/jvpp/gen/jvppgen/*.py); do
install -p -m755 %{_mu_build_dir}/../src/vpp-api/java/jvpp/gen/jvpp_gen.py %{buildroot}/usr/bin
for i in $(ls %{_mu_build_dir}/../src/vpp-api/java/jvpp/gen/jvppgen/*.py); do
install -p -m666 ${i} %{buildroot}%{python2_sitelib}/jvppgen
done;
# sample plugin
mkdir -p -m755 %{buildroot}/usr/share/doc/vpp/examples/sample-plugin/sample
for file in $(cd %{_mu_build_dir}/%{_vpp_install_dir}/../../plugins/sample-plugin && git ls-files .)
for file in $(cd %{_mu_build_dir}/%{_vpp_install_dir}/../../src/examples/sample-plugin && git ls-files .)
do
install -p -m 644 %{_mu_build_dir}/%{_vpp_install_dir}/../../plugins/sample-plugin/$file \
install -p -m 644 %{_mu_build_dir}/%{_vpp_install_dir}/../../src/examples/sample-plugin/$file \
%{buildroot}/usr/share/doc/vpp/examples/sample-plugin/$file
done
@ -170,24 +202,12 @@ done
#
mkdir -p -m755 %{buildroot}/usr/lib/vpp_plugins
mkdir -p -m755 %{buildroot}/usr/lib/vpp_api_test_plugins
for file in $(cd %{_mu_build_dir}/%{_vpp_install_dir}/plugins/lib64/vpp_plugins && find -type f -print)
do
install -p -m 644 %{_mu_build_dir}/%{_vpp_install_dir}/plugins/lib64/vpp_plugins/$file \
%{buildroot}/usr/lib/vpp_plugins/$file
done
for file in $(cd %{_mu_build_dir}/%{_vpp_install_dir}/vpp/lib64/vpp_plugins && find -type f -print)
do
install -p -m 644 %{_mu_build_dir}/%{_vpp_install_dir}/vpp/lib64/vpp_plugins/$file \
%{buildroot}/usr/lib/vpp_plugins/$file
done
for file in $(cd %{_mu_build_dir}/%{_vpp_install_dir}/plugins/lib64/vpp_api_test_plugins && find -type f -print)
do
install -p -m 644 %{_mu_build_dir}/%{_vpp_install_dir}/plugins/lib64/vpp_api_test_plugins/$file \
%{buildroot}/usr/lib/vpp_api_test_plugins/$file
done
for file in $(cd %{_mu_build_dir}/%{_vpp_install_dir}/vpp/lib64/vpp_api_test_plugins && find -type f -print)
do
install -p -m 644 %{_mu_build_dir}/%{_vpp_install_dir}/vpp/lib64/vpp_api_test_plugins/$file \
@ -208,13 +228,13 @@ done
sysctl --system
%systemd_post vpp.service
%post python-api
%post api-python
easy_install -z %{python2_sitelib}/vpp_papi-*.egg
%preun
%systemd_preun vpp.service
%preun python-api
%preun api-python
easy_install -mxNq vpp_papi
%postun
@ -255,7 +275,15 @@ fi
%{_libdir}/*
/usr/share/vpp/api/*
%files python-api
%files api-lua
%defattr(644,root,root)
/usr/share/doc/vpp/examples/lua
%files api-java
%defattr(644,root,root)
/usr/share/java/*
%files api-python
%defattr(644,root,root)
%{python2_sitelib}/vpp_papi-*.egg

View File

@ -1,6 +1,6 @@
#!/bin/bash
for i in $(find ${1}/vpp -name *.api.json -type f -print); do
for i in $(find ${1}/vpp/share/vpp/api/core -name *.api.json -type f -print); do
echo ../${i} /usr/share/vpp/api/ >> ${2}
done
for i in $(find ${1}/vlib-api -name *.api.json -type f -print); do

View File

@ -16,16 +16,16 @@ do
done
# sample plugin
paths=`(cd ..; find plugins/sample-plugin -type f -print | grep -v autom4te)`
paths=`(cd ..; find src/examples/sample-plugin -type f -print | grep -v autom4te)`
for path in $paths
do
relpath=`echo $path | sed -e 's:.*plugins/::'`
relpath=`echo $path | sed -e 's:.*src/examples/::'`
dir=`dirname $relpath`
if [ $dir = "sample-plugin" ] ; then
echo ../../$path /usr/share/doc/vpp/examples/plugins/sample-plugin >> $2
echo ../../$path /usr/share/doc/vpp/examples/sample-plugin/ >> $2
else
echo ../../$path \
/usr/share/doc/vpp/examples/plugins/$dir >> $2
/usr/share/doc/vpp/examples/$dir >> $2
fi
done

View File

@ -2,11 +2,11 @@
rm -f $2
for i in ${1}/{plugins,vpp}/lib64/vpp_plugins/*.so; do
for i in ${1}/vpp/lib64/vpp_plugins/*.so; do
echo ../${i} /usr/lib/vpp_plugins >> ${2}
done
for i in ${1}/{plugins,vpp}/lib64/vpp_api_test_plugins/*.so; do
for i in ${1}/vpp/lib64/vpp_api_test_plugins/*.so; do
echo ../${i} /usr/lib/vpp_api_test_plugins >> ${2}
done

View File

@ -0,0 +1,8 @@
#!/bin/bash
rm -f $2
for i in $(find ${1}/vpp/share/java/ -type f -print); do
echo ../${i} /usr/share/java >> ${2}
done

View File

@ -0,0 +1,6 @@
#!/bin/bash
#i for now put everything into examples directory
echo ../../src/vpp-api/lua /usr/share/vpp/examples > ${2}

View File

@ -2,7 +2,7 @@
rm -f $2
for i in $(find ${1}/{vpp,vpp-api}/lib/python2.7/site-packages/ -type f -print); do
for i in $(find ${1}/vpp/lib/python2.7/site-packages/ -type f -print); do
echo ../${i} /usr/lib/python2.7/site-packages/vpp_papi >> ${2}
done

View File

@ -52,8 +52,7 @@ DOXY_SRC_DIRECTORIES = \
$(DOXY_SRC)/vlibsocket \
$(DOXY_SRC)/vnet \
$(DOXY_SRC)/vpp \
$(DOXY_SRC)/vpp-api \
vpp-api
$(DOXY_SRC)/vpp-api
# Input directories and files
DOXY_INPUT ?= \
@ -74,8 +73,8 @@ DOXY_INPUT := $(subst $(WS_ROOT)/,,$(DOXY_INPUT))
DOXY_EXCLUDE ?= \
$(DOXY_SRC)/vlib/vlib/buffer.c \
$(DOXY_SRC)/vlib/example \
plugins/sample-plugin \
vpp-api/lua
$(DOXY_SRC)/vpp-api/lua \
plugins/sample-plugin
# Generate a regexp for filenames to exclude
DOXY_EXCLUDE_REGEXP = ($(subst .,\.,$(shell echo '$(strip $(DOXY_EXCLUDE))' | sed -e 's/ /|/g')))

View File

@ -28,22 +28,7 @@ if ENABLE_sample_PLUGIN
SUBDIRS += sample-plugin
endif
if ENABLE_ioam_PLUGIN
SUBDIRS += ioam-plugin
endif
if ENABLE_vcgn_PLUGIN
SUBDIRS += vcgn-plugin
endif
if ENABLE_snat_PLUGIN
SUBDIRS += snat-plugin
endif
if ENABLE_lb_PLUGIN
SUBDIRS += lb-plugin
endif
if ENABLE_acl_PLUGIN
SUBDIRS += acl-plugin
endif

View File

@ -1,114 +0,0 @@
# Copyright (c) 2016 Cisco and/or its affiliates.
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at:
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
AUTOMAKE_OPTIONS = foreign subdir-objects
AM_CFLAGS = -Wall
AM_LDFLAGS = -module -shared -avoid-version
vppapitestpluginsdir = ${libdir}/vpp_api_test_plugins
vpppluginsdir = ${libdir}/vpp_plugins
vppapitestplugins_LTLIBRARIES = acl_test_plugin.la
vppplugins_LTLIBRARIES = acl_plugin.la
acl_plugin_la_SOURCES = \
acl/acl.c \
acl/node_in.c \
acl/node_out.c \
acl/l2sess.c \
acl/l2sess_node.c \
acl/l2sess.h \
acl/acl_plugin.api.h
BUILT_SOURCES = acl/acl.api.h acl/acl.api.json
SUFFIXES = .api.h .api .api.json
#
# ACL API
#
%.api.h: %.api
mkdir -p `dirname $@` ; \
$(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)/acl
api_DATA = acl/acl.api.json
noinst_HEADERS = \
acl/acl_all_api_h.h \
acl/acl_msg_enum.h \
acl/acl.api.h
acl_test_plugin_la_SOURCES = acl/acl_test.c acl/acl_plugin.api.h
# Remove *.la files
install-data-hook:
@(cd $(vpppluginsdir) && $(RM) $(vppplugins_LTLIBRARIES))
@(cd $(vppapitestpluginsdir) && $(RM) $(vppapitestplugins_LTLIBRARIES))
#
# Java code generation
#
jvpp_registry_root = ../../vpp-api/java
jvpp_registry_version = 17.04
jacl_jarfile = jvpp-acl-$(PACKAGE_VERSION).jar
jvpp_package_dir = io/fd/vpp/jvpp/acl
jvpp_root = acl/jvpp
jvpp_target_dir = target
jvpp_target = $(jvpp_root)/$(jvpp_target_dir)
lib_LTLIBRARIES = libjvpp_acl.la
libjvpp_acl_la_SOURCES = acl/acl.api.h acl/jvpp_acl.c acl/jvpp/io_fd_vpp_jvpp_acl_JVppAclImpl.h
libjvpp_acl_la_LIBADD = -lvlibmemoryclient -lvlibapi -lvppinfra \
-lpthread -lm -lrt -L$(jvpp_registry_root)/.libs -ljvpp_common
libjvpp_acl_la_LDFLAGS = -module
libjvpp_acl_la_CPPFLAGS = -I$(JAVA_HOME)/include -I$(JAVA_HOME)/include/linux -I../ -I$(srcdir)/../
BUILT_SOURCES += $(jvpp_root)/io_fd_vpp_jvpp_acl_JVppAclImpl.h
$(jvpp_root)/io_fd_vpp_jvpp_acl_JVppAclImpl.h: acl/acl.api.json
dir=`pwd`; \
mkdir -p $(jvpp_target); \
mkdir -p $(jvpp_root)/$(jvpp_package_dir); \
cd $(jvpp_root)/$(jvpp_package_dir); \
mkdir -p types dto future callfacade callback notification test; \
@srcdir@/$(jvpp_registry_root)/jvpp/gen/jvpp_gen.py -i $${dir}/acl/acl.api.json --plugin_name acl; \
cd -; \
mv -f $(jvpp_root)/$(jvpp_package_dir)/jvpp_acl_gen.h $(jvpp_root)/jvpp_acl_gen.h; \
cp $(srcdir)/$(jvpp_root)/$(jvpp_package_dir)/test/*.java $(jvpp_root)/$(jvpp_package_dir)/test/; \
cd $(jvpp_root); \
$(JAVAC) -classpath .:$(jvpp_target_dir):../../$(jvpp_registry_root)/jvpp-registry-$(jvpp_registry_version).jar -d $(jvpp_target_dir) $(jvpp_package_dir)/*.java \
$(jvpp_package_dir)/types/*.java \
$(jvpp_package_dir)/dto/*.java \
$(jvpp_package_dir)/callback/*.java \
$(jvpp_package_dir)/notification/*.java \
$(jvpp_package_dir)/future/*.java \
$(jvpp_package_dir)/callfacade/*.java \
$(jvpp_package_dir)/test/*.java \
|| (echo "acl jvpp compilation failed: $$?"; exit 1); \
$(JAVAH) -classpath .:$(jvpp_target_dir):../../$(jvpp_registry_root)/jvpp-registry-$(jvpp_registry_version).jar -d . io.fd.vpp.jvpp.acl.JVppAclImpl ;
$(jacl_jarfile): libjvpp_acl.la
cp .libs/libjvpp_acl.so.0.0.0 $(jvpp_target); \
cd $(jvpp_target); \
$(JAR) cfv $(JARFLAGS) ../../../$@ libjvpp_acl.so.0.0.0 $(jvpp_package_dir)/* ; cd ..;
all-local: $(jacl_jarfile)

View File

@ -1,24 +0,0 @@
AC_INIT(acl_plugin, 1.0)
AC_CONFIG_MACRO_DIR([../../vpp-api/java/m4])
LT_INIT
AM_INIT_AUTOMAKE
AM_SILENT_RULES([yes])
AC_PREFIX_DEFAULT([/usr])
AC_PROG_CC
if test -f /usr/bin/lsb_release && test `lsb_release -si` == "Ubuntu" && test `lsb_release -sr` == "14.04" && test -d /usr/lib/jvm/java-8-openjdk-amd64/ ; then
JAVA_HOME=/usr/lib/jvm/java-8-openjdk-amd64/
JAVAC=${JAVA_HOME}/bin/javac
PATH=${JAVA_HOME}/bin/:${PATH}
break
fi
AX_CHECK_JAVA_HOME
AX_PROG_JAVAC
AX_PROG_JAVAH
AX_PROG_JAR
AX_PROG_JAVADOC
AX_PROG_JAVA
AC_OUTPUT([Makefile])

View File

@ -53,11 +53,6 @@ AM_CONDITIONAL(ENABLE_$1_PLUGIN, test "$enable_the_plugin" = "1")
# SUBDIRS += new-plugin
# endif
PLUGIN_ENABLED(ioam)
PLUGIN_ENABLED(snat)
PLUGIN_ENABLED(lb)
PLUGIN_ENABLED(acl)
# Disabled plugins, require --enable-XXX-plugin
PLUGIN_DISABLED(vcgn)
PLUGIN_DISABLED(sample)

File diff suppressed because it is too large Load Diff

View File

@ -1,25 +0,0 @@
AC_INIT(ioam_plugin, 1.0)
LT_INIT
AC_CONFIG_MACRO_DIR([../../vpp-api/java/m4])
AM_INIT_AUTOMAKE
AC_PREFIX_DEFAULT([/usr])
AM_SILENT_RULES([yes])
AC_PROG_CC
if test -f /usr/bin/lsb_release && test `lsb_release -si` == "Ubuntu" && test `lsb_release -sr` == "14.04" && test -d /usr/lib/jvm/java-8-openjdk-amd64/ ; then
JAVA_HOME=/usr/lib/jvm/java-8-openjdk-amd64/
JAVAC=${JAVA_HOME}/bin/javac
PATH=${JAVA_HOME}/bin/:${PATH}
break
fi
AX_CHECK_JAVA_HOME
AX_PROG_JAVAC
AX_PROG_JAVAH
AX_PROG_JAR
AX_PROG_JAVADOC
AX_PROG_JAVA
AC_OUTPUT([Makefile])

View File

@ -1,55 +0,0 @@
# Copyright (c) 2016 Cisco Systems, Inc.
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at:
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
AUTOMAKE_OPTIONS = foreign subdir-objects
AM_CFLAGS = -Wall
AM_LDFLAGS = -module -shared -avoid-version
vppapitestpluginsdir = ${libdir}/vpp_api_test_plugins
vpppluginsdir = ${libdir}/vpp_plugins
vppapitestplugins_LTLIBRARIES = lb_test_plugin.la
vppplugins_LTLIBRARIES = lb_plugin.la
lb_plugin_la_SOURCES = lb/lb.c lb/node.c lb/cli.c lb/util.c lb/refcount.c lb/api.c
BUILT_SOURCES = \
lb/lb.api.h \
lb/lb.api.json
SUFFIXES = .api.h .api .api.json
%.api.h: %.api
mkdir -p `dirname $@` ; \
$(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)/lb/
api_DATA = lb/lb.api.json
noinst_HEADERS = lb/lb.h lb/util.h lb/refcount.h lb/lbhash.h lb/lb.api.h
lb_test_plugin_la_SOURCES = \
lb/lb_test.c lb/lb_plugin.api.h
# Remove *.la files
install-data-hook:
@(cd $(vpppluginsdir) && $(RM) $(vppplugins_LTLIBRARIES))
@(cd $(vppapitestpluginsdir) && $(RM) $(vppapitestplugins_LTLIBRARIES))

View File

@ -1,9 +0,0 @@
AC_INIT(lb_plugin, 1.0)
AM_INIT_AUTOMAKE
AM_SILENT_RULES([yes])
AC_PREFIX_DEFAULT([/usr])
AC_PROG_LIBTOOL
AC_PROG_CC
AC_OUTPUT([Makefile])

View File

@ -1,113 +0,0 @@
# Copyright (c) <current-year> <your-organization>
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at:
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
AUTOMAKE_OPTIONS = foreign subdir-objects
AM_CFLAGS = -Wall @DPDK@
AM_LDFLAGS = -module -shared -avoid-version
vppapitestpluginsdir = ${libdir}/vpp_api_test_plugins
vpppluginsdir = ${libdir}/vpp_plugins
vppapitestplugins_LTLIBRARIES = snat_test_plugin.la
vppplugins_LTLIBRARIES = snat_plugin.la
snat_plugin_la_SOURCES = snat/snat.c \
snat/in2out.c \
snat/out2in.c \
snat/snat_plugin.api.h
BUILT_SOURCES = snat/snat.api.h snat/snat.api.json
SUFFIXES = .api.h .api
%.api.h: %.api
mkdir -p `dirname $@` ; \
$(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)/snat/
api_DATA = snat.api.json
noinst_HEADERS = \
snat/snat_all_api_h.h \
snat/snat_msg_enum.h \
snat/snat.api.h
snat_test_plugin_la_SOURCES = \
snat/snat_test.c snat/snat_plugin.api.h
# Remove *.la files
install-data-hook:
@(cd $(vpppluginsdir) && $(RM) $(vppplugins_LTLIBRARIES))
@(cd $(vppapitestpluginsdir) && $(RM) $(vppapitestplugins_LTLIBRARIES))
#
# Java code generation
#
jvpp_registry_root = ../../vpp-api/java
jvpp_registry_version = 17.04
jsnat_jarfile = jvpp-snat-$(PACKAGE_VERSION).jar
jvpp_package_dir = io/fd/vpp/jvpp/snat
jvpp_root = snat/jvpp
jvpp_target_dir = target
jvpp_target = $(jvpp_root)/$(jvpp_target_dir)
api_file=$(srcdir)/snat/snat.api
lib_LTLIBRARIES = libjvpp_snat.la
libjvpp_snat_la_SOURCES = snat/snat.api.h snat/jvpp_snat.c snat/jvpp/io_fd_vpp_jvpp_snat_JVppSnatImpl.h
libjvpp_snat_la_LIBADD = -lvlibmemoryclient -lvlibapi -lvppinfra \
-lpthread -lm -lrt -L$(jvpp_registry_root)/.libs -ljvpp_common
libjvpp_snat_la_LDFLAGS = -module
libjvpp_snat_la_CPPFLAGS = -I$(JAVA_HOME)/include -I$(JAVA_HOME)/include/linux -I../ -I$(srcdir)/../
BUILT_SOURCES += $(jvpp_root)/io_fd_vpp_jvpp_snat_JVppSnatImpl.h
$(jvpp_root)/io_fd_vpp_jvpp_snat_JVppSnatImpl.h: snat.api.json
dir=`pwd`; \
mkdir -p $(jvpp_target); \
mkdir -p $(jvpp_root)/$(jvpp_package_dir); \
cd $(jvpp_root)/$(jvpp_package_dir); \
mkdir -p dto future callfacade callback notification test; \
@srcdir@/$(jvpp_registry_root)/jvpp/gen/jvpp_gen.py -i $${dir}/snat.api.json --plugin_name snat; \
cd -; \
mv -f $(jvpp_root)/$(jvpp_package_dir)/jvpp_snat_gen.h $(jvpp_root)/jvpp_snat_gen.h; \
cp $(srcdir)/$(jvpp_root)/$(jvpp_package_dir)/test/*.java $(jvpp_root)/$(jvpp_package_dir)/test/; \
cd $(jvpp_root); \
$(JAVAC) -classpath .:$(jvpp_target_dir):../../$(jvpp_registry_root)/jvpp-registry-$(jvpp_registry_version).jar -d $(jvpp_target_dir) $(jvpp_package_dir)/*.java \
$(jvpp_package_dir)/dto/*.java \
$(jvpp_package_dir)/callback/*.java \
$(jvpp_package_dir)/notification/*.java \
$(jvpp_package_dir)/future/*.java \
$(jvpp_package_dir)/callfacade/*.java \
$(jvpp_package_dir)/test/*.java \
|| (echo "snat jvpp compilation failed: $$?"; exit 1); \
$(JAVAH) -classpath .:$(jvpp_target_dir):../../$(jvpp_registry_root)/jvpp-registry-$(jvpp_registry_version).jar -d . io.fd.vpp.jvpp.snat.JVppSnatImpl ;
$(jsnat_jarfile): libjvpp_snat.la
cp .libs/libjvpp_snat.so.0.0.0 $(jvpp_target); \
cd $(jvpp_target); \
$(JAR) cfv $(JARFLAGS) ../../../$@ libjvpp_snat.so.0.0.0 $(jvpp_package_dir)/* ; cd ..;
snat.api.json:
@echo " jSnat_sfc API"; \
vppapigen --input $(api_file) --json snat.api.json;
all-local: $(jsnat_jarfile)

View File

@ -1,32 +0,0 @@
AC_INIT(snat_plugin, 1.0)
AC_CONFIG_MACRO_DIR([../../vpp-api/java/m4])
AM_INIT_AUTOMAKE
AM_SILENT_RULES([yes])
AC_PREFIX_DEFAULT([/usr])
AC_PROG_LIBTOOL
AC_PROG_CC
if test -f /usr/bin/lsb_release && test `lsb_release -si` == "Ubuntu" && test `lsb_release -sr` == "14.04" && test -d /usr/lib/jvm/java-8-openjdk-amd64/ ; then
JAVA_HOME=/usr/lib/jvm/java-8-openjdk-amd64/
JAVAC=${JAVA_HOME}/bin/javac
PATH=${JAVA_HOME}/bin/:${PATH}
break
fi
AX_CHECK_JAVA_HOME
AX_PROG_JAVAC
AX_PROG_JAVAH
AX_PROG_JAR
AX_PROG_JAVADOC
AX_PROG_JAVA
AC_ARG_WITH(dpdk,
AC_HELP_STRING([--with-dpdk],[Use DPDK]),
[with_dpdk=1],
[with_dpdk=0])
AM_CONDITIONAL(WITH_DPDK, test "$with_dpdk" = "1")
AC_SUBST(DPDK,["-DDPDK=${with_dpdk}"])
AC_OUTPUT([Makefile])

View File

@ -79,7 +79,15 @@ include vnet.am
include vpp.am
include vpp-api-test.am
SUBDIRS += vpp-api/python plugins
SUBDIRS += plugins
if ENABLE_PAPI
SUBDIRS += vpp-api/python
endif
if ENABLE_JAPI
SUBDIRS += vpp-api/java
endif
###############################################################################
# API

Some files were not shown because too many files have changed in this diff Show More