DEB_DEPENDS = curl build-essential autoconf automake bison libssl-dev ccache
DEB_DEPENDS += debhelper dkms git libtool libganglia1-dev libapr1-dev dh-systemd
-DEB_DEPENDS += libconfuse-dev git-review exuberant-ctags cscope
+DEB_DEPENDS += libconfuse-dev git-review exuberant-ctags cscope pkg-config
DEB_DEPENDS += python-dev python-virtualenv python-pip lcov chrpath autoconf
ifeq ($(OS_VERSION_ID),14.04)
DEB_DEPENDS += openjdk-8-jdk-headless
@ln -s /usr/bin/ccache $(BR)/tools/ccache-bin/gcc
@ln -s /usr/bin/ccache $(BR)/tools/ccache-bin/g++
endif
- @make -C $(BR) V=$(V) is_build_tool=yes vppapigen-install
+ @make -C $(BR) V=$(V) is_build_tool=yes tools-install
@touch $@
bootstrap: $(BR)/.bootstrap.ok
+++ /dev/null
-# Temporary until Cavium upstreams their work
-
-cavium-dpdk_configure = \
- src_dir=$(call find_source_fn,$(PACKAGE_SOURCE)) ; \
- dst_dir=$(PACKAGE_BUILD_DIR) ; \
- tar -C $${src_dir} -cf - . | tar -C $${dst_dir} -xf - ; \
- cd $${dst_dir} ; \
- : colossal hemorrhoid to configure headroom ; \
- if [ x$($(PACKAGE)_configure_args_$(PLATFORM)) = "x" ] ; then \
- HR=256 ; \
- else \
- dpdk_configure_args=$($(PACKAGE)_configure_args_$(PLATFORM)) ; \
- if [ $$dpdk_configure_args = "--with-headroom=256" ] ; then \
- HR=256 ; \
- elif [ $$dpdk_configure_args = "--with-headroom=384" ] ; then \
- HR=384 ; \
- else \
- HR=256 ; \
- fi ; \
- fi ; \
- env HR=$$HR \
- spp -o \
- $(PACKAGE_BUILD_DIR)/config/common_linuxapp \
- $(PACKAGE_BUILD_DIR)/config/common_linuxapp.spp \
- ; \
- env $(CONFIGURE_ENV) \
- make config T=arm64-thunderx-linuxapp-gcc RTE_ARCH=arm64 \
- CC=aarch64-thunderx-linux-gnu-gcc V=0 \
- RTE_SDK=$(PACKAGE_BUILD_DIR) \
- RTE_TARGET=arm-default-linuxapp-gcc
-
-# Note: add e.g. "-O0" to EXTRA_CFLAGS if desired: EXTRA_CFLAGS='-g -O0'
-
-cavium-dpdk_make_args = install T=arm64-thunderx-linuxapp-gcc RTE_ARCH=arm64 \
- CC=aarch64-thunderx-linux-gnu-gcc V=0 \
- RTE_SDK=$(PACKAGE_BUILD_DIR) \
- RTE_TARGET=arm-default-linuxapp-gcc
-
-cavium-dpdk_install = \
- src_dir=$(PACKAGE_BUILD_DIR) ; \
- dst_dir=$(PACKAGE_INSTALL_DIR) ; \
- tar -h -C $${src_dir}/arm64-thunderx-linuxapp-gcc -cf - . \
- | tar -C $${dst_dir} -xf -
-
-# dpdk libraries end up in .../lib not .../lib64. Fix it.
-cavium-dpdk_post_install = \
- if [ "$(arch_lib_dir)" != "lib" ] ; then \
- mkdir -p $(PACKAGE_INSTALL_DIR)/$(arch_lib_dir) ; \
- cd $(PACKAGE_INSTALL_DIR)/lib ; \
- tar cf - . | ( cd $(PACKAGE_INSTALL_DIR)/$(arch_lib_dir); tar xf - ) ; \
- fi
-
-# nothing to install, all static libraries
-cavium-dpdk_image_include = echo
-
-g2_configure_depend = vppinfra-install
+g2_source = src
-g2_CPPFLAGS = $(call installed_includes_fn, vppinfra)
-
-g2_LDFLAGS = $(call installed_libs_fn, vppinfra)
+g2_configure_args = --disable-vlib --disable-svm --enable-g2
-gmod_configure_depend = vppinfra-install svm-install
+gmod_configure_depend = vpp-install
gmod_configure_args = --libdir=$(PACKAGE_INSTALL_DIR)/$(arch_lib_dir)/ganglia
-gmod_CPPFLAGS = $(call installed_includes_fn, vppinfra svm)
+gmod_CPPFLAGS = $(call installed_includes_fn, vpp)
gmod_CPPFLAGS += -I/usr/include/apr-1.0 -I/usr/include/apr-1 -I/usr/include
-gmod_LDFLAGS = $(call installed_libs_fn, vppinfra svm)
+gmod_LDFLAGS = $(call installed_libs_fn, vpp)
gmod_image_include = echo $(arch_lib_dir)/ganglia/libgmodvpp.so etc
-perftool_configure_depend = vppinfra-install
+perftool_source = src
-perftool_CPPFLAGS = $(call installed_includes_fn, vppinfra)
+perftool_configure_args = --disable-vlib --disable-svm --enable-perftool
-perftool_LDFLAGS = $(call installed_libs_fn, vppinfra)
plugins_configure_depend = \
- vppinfra-install \
- vlib-api-install \
- vpp-api-test-install \
- vnet-install \
- vlib-install \
- vpp-api-install
+ vpp-api-install \
+ vpp-install
-plugins_CPPFLAGS = $(call installed_includes_fn, \
- vppinfra \
- vlib \
- vnet \
- svm \
- vpp-api-test \
- vlib-api \
- vpp-api)
+plugins_CPPFLAGS = $(call installed_includes_fn, \
+ vpp \
+ vpp-api)
-plugins_LDFLAGS = $(call installed_libs_fn, \
- vppinfra \
- vlib \
- vlib-api)
+plugins_LDFLAGS = $(call installed_libs_fn, \
+ vpp)
ifeq ($($(PLATFORM)_enable_tests),yes)
plugins_configure_args += --enable-tests
+++ /dev/null
-svm_top_srcdir = $(call find_source_fn,svm)
-svm_configure_depend = vppinfra-install
-
-svm_CPPFLAGS = $(call installed_includes_fn, vppinfra)
-svm_LDFLAGS = $(call installed_libs_fn, vppinfra)
+++ /dev/null
-vlib-api-cavium-dpdk_source = vlib-api
-
-vlib-api-cavium-dpdk_configure_depend = vppinfra-install svm-install vlib-cavium-dpdk-install
-
-vlib-api-cavium-dpdk_CPPFLAGS = $(call installed_includes_fn, vppinfra svm vlib-cavium-dpdk)
-vlib-api-cavium-dpdk_LDFLAGS = $(call installed_libs_fn, vppinfra svm vlib-cavium-dpdk)
+++ /dev/null
-vlib-api_configure_depend = vppinfra-install svm-install vlib-install
-
-vlib-api_CPPFLAGS = $(call installed_includes_fn, vppinfra svm vlib)
-vlib-api_LDFLAGS = $(call installed_libs_fn, vppinfra svm vlib)
+++ /dev/null
-vlib-cavium-dpdk_source = vlib
-vlib-cavium-dpdk_configure_depend = vppinfra-install cavium-dpdk-install
-
-vlib-cavium-dpdk_configure_args += --with-dpdk
-
-vlib-cavium-dpdk_CPPFLAGS = $(call installed_includes_fn, vppinfra cavium-dpdk)
-vlib-cavium-dpdk_LDFLAGS = $(call installed_libs_fn, vppinfra cavium-dpdk)
+++ /dev/null
-vlib_configure_depend = vppinfra-install
-
-vlib_CPPFLAGS = $(call installed_includes_fn, vppinfra)
-vlib_LDFLAGS = $(call installed_libs_fn, vppinfra)
-
-ifneq ($($(PLATFORM)_uses_dpdk),no)
-vlib_configure_args += --with-dpdk
-ifeq ($($(PLATFORM)_uses_external_dpdk),yes)
-vlib_CPPFLAGS += -I$($(PLATFORM)_dpdk_inc_dir)
-vlib_LDFLAGS += -L$($(PLATFORM)_dpdk_lib_dir)
-else
-vlib_configure_depend += dpdk-install
-vlib_CPPFLAGS += $(call installed_includes_fn, dpdk)
-vlib_LDFLAGS += $(call installed_libs_fn, dpdk)
-endif
-endif
+++ /dev/null
-vnet-cavium-dpdk_source = vnet
-
-vnet-cavium-dpdk_configure_depend = \
- vppinfra-install \
- cavium-dpdk-install \
- svm-install \
- vlib-api-cavium-dpdk-install \
- vlib-cavium-dpdk-install
-
-
-vnet-cavium-dpdk_CPPFLAGS = $(call installed_includes_fn, \
- vppinfra \
- cavium-dpdk \
- openssl \
- svm \
- vlib-cavium-dpdk \
- vlib-api-cavium-dpdk)
-
-vnet-cavium-dpdk_LDFLAGS = $(call installed_libs_fn, \
- vppinfra \
- cavium-dpdk \
- openssl \
- svm \
- vlib-cavium-dpdk \
- vlib-api-cavium-dpdk)
-
-# Platform dependent configure flags
-vnet-cavium-dpdk_configure_args += $(vnet-cavium-dpdk_configure_args_$(PLATFORM))
-
+++ /dev/null
-vpp-api-test-cavium-dpdk_source = vpp-api-test
-
-vpp-api-test-cavium-dpdk_configure_depend = \
- vppinfra-install \
- cavium-dpdk-install \
- svm-install \
- vlib-api-cavium-dpdk-install \
- vlib-cavium-dpdk-install \
- vnet-cavium-dpdk-install \
- vpp-cavium-dpdk-install
-
-#
-vpp-api-test-cavium-dpdk_configure_args = --with-dpdk
-
-vpp-api-test-cavium-dpdk_CPPFLAGS = $(call installed_includes_fn, \
- vppinfra \
- cavium-dpdk \
- svm \
- vlib-cavium-dpdk \
- vlib-api-cavium-dpdk \
- vnet-cavium-dpdk \
- vpp-cavium-dpdk)
-
-vpp-api-test-cavium-dpdk_LDFLAGS = $(call installed_libs_fn, \
- vppinfra \
- cavium-dpdk \
- svm \
- vlib-cavium-dpdk \
- vlib-api-cavium-dpdk \
- vnet-cavium-dpdk \
- vpp-cavium-dpdk)
-
+++ /dev/null
-vpp-api-test_configure_depend = \
- vppinfra-install \
- svm-install \
- vlib-api-install \
- vlib-install \
- vnet-install \
- vpp-install
-
-vpp-api-test_CPPFLAGS = $(call installed_includes_fn, \
- vppinfra \
- svm \
- vlib \
- vlib-api \
- vnet \
- vpp)
-
-vpp-api-test_LDFLAGS = $(call installed_libs_fn, \
- vppinfra \
- svm \
- vlib \
- vlib-api \
- vnet \
- vpp)
-
-ifneq ($($(PLATFORM)_uses_dpdk),no)
-vpp-api-test_configure_args = --with-dpdk
-ifeq ($($(PLATFORM)_uses_external_dpdk),yes)
-vpp-api-test_CPPFLAGS += -I$($(PLATFORM)_dpdk_inc_dir)
-vpp-api-test_LDFLAGS += -L$($(PLATFORM)_dpdk_lib_dir)
-else
-vpp-api-test_configure_depend += dpdk-install
-vpp-api-test_CPPFLAGS += $(call installed_includes_fn, dpdk)
-vpp-api-test_LDFLAGS += $(call installed_libs_fn, dpdk)
-endif
-endif
-ifeq ($($(PLATFORM)_uses_dpdk_cryptodev),yes)
-vpp-api-test_configure_args += --with-dpdk-crypto
-endif
-
vpp-api_configure_depend = \
- vppinfra-install \
- svm-install \
- vlib-api-install \
- vlib-install \
- vnet-install \
vpp-install
vpp-api_CPPFLAGS = $(call installed_includes_fn, \
- vppinfra \
- svm \
- vlib \
- vlib-api \
- vnet \
vpp)
-vpp-api_LDFLAGS = $(call installed_libs_fn, \
- vppinfra \
- svm \
- vlib \
- vlib-api)
+vpp-api_LDFLAGS =
vpp-api_CPPFLAGS += -I/usr/lib/jvm/java-8-openjdk-amd64/include
+++ /dev/null
-vpp-cavium-dpdk_source = vpp
-
-vpp-cavium-dpdk_configure_depend = \
- vppinfra-install \
- cavium-dpdk-install \
- svm-install \
- vlib-api-cavium-dpdk-install \
- vlib-cavium-dpdk-install \
- vnet-cavium-dpdk-install
-
-# Platform dependent configure flags
-vpp-cavium-dpdk_configure_args += $(vpp-cavium-dpdk_configure_args_$(PLATFORM))
-
-vpp-cavium-dpdk_CPPFLAGS = $(call installed_includes_fn, \
- vppinfra \
- cavium-dpdk \
- openssl \
- svm \
- vlib-cavium-dpdk \
- vlib-api-cavium-dpdk \
- vnet-cavium-dpdk)
-
-vpp-cavium-dpdk_LDFLAGS = $(call installed_libs_fn, \
- vppinfra \
- cavium-dpdk \
- openssl \
- svm \
- vlib-cavium-dpdk \
- vlib-api-cavium-dpdk \
- vnet-cavium-dpdk)
-vpp_configure_depend = \
- vppinfra-install \
- svm-install \
- vlib-api-install \
- vlib-install \
- vnet-install \
+vpp_source = src
-#
ifeq ($($(PLATFORM)_dpdk_shared_lib),yes)
vpp_configure_args = --enable-dpdk-shared
else
vpp_configure_args += $(vpp_configure_args_$(PLATFORM))
-vpp_CPPFLAGS = $(call installed_includes_fn, \
- vppinfra \
- svm \
- vlib \
- vlib-api \
- vnet)
-
-vpp_LDFLAGS = $(call installed_libs_fn, \
- vppinfra \
- svm \
- vlib \
- vlib-api \
- vnet)
-
-# include & link with openssl only if needed
-ifneq ($($(PLATFORM)_uses_openssl),no)
-vpp_CPPFLAGS += $(call installed_includes_fn, openssl)
-vpp_LDFLAGS += $(call installed_libs_fn, openssl)
-endif
+vpp_CPPFLAGS =
+vpp_LDFLAGS =
ifneq ($($(PLATFORM)_uses_dpdk),no)
ifeq ($($(PLATFORM)_uses_external_dpdk),yes)
+++ /dev/null
-
-ifeq ($($(PLATFORM)_enable_tests),yes)
-vppinfra_configure_args += --enable-tests
-endif
-
deb/debian/vpp-dpdk-dev.install ; \
\
: bin package needs startup config ; \
- echo ../../vpp/conf/startup.conf /etc/vpp \
+ echo ../../src/vpp/conf/startup.conf /etc/vpp \
>> deb/debian/vpp.install ; \
\
: and sysctl config ; \
- echo ../../vpp/conf/80-vpp.conf /etc/sysctl.d \
+ echo ../../src/vpp/conf/80-vpp.conf /etc/sysctl.d \
>> deb/debian/vpp.install ; \
\
: dev package needs a couple of additions ; \
- echo ../build-tool-native/vppapigen/vppapigen /usr/bin \
+ echo ../build-tool-native/tools/vppapigen /usr/bin \
>> deb/debian/vpp-dev.install ; \
echo ../../vpp-api/java/jvpp/gen/jvpp_gen.py /usr/bin \
>> deb/debian/vpp-dev.install ; \
# Uncoment to enable building unit tests
# vpp_enable_tests = yes
-vpp_root_packages = vpp vlib vlib-api vnet svm vpp-api-test \
- vpp-api gmod plugins
+vpp_root_packages = vpp vpp-api gmod plugins
vpp_configure_args_vpp = --with-dpdk
-vnet_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
# Uncoment to enable building unit tests
#vpp_lite_enable_tests = yes
-vpp_lite_root_packages = vpp vlib vlib-api vnet svm vpp-api-test \
- vpp-api gmod
+vpp_lite_root_packages = vpp vpp-api gmod
vlib_configure_args_vpp_lite = --with-pre-data=128
cd $build_root
echo Compile native tools
-for tool in vppapigen
+for tool in tools
do
make V=0 is_build_tool=yes $tool-install
done
--- /dev/null
+# nothing
+
+
+
--- /dev/null
+tools_source = src
+tools_configure_args = --disable-vlib
+
+++ /dev/null
-vppapigen_configure_depend = vppinfra-install
-
-vppapigen_CPPFLAGS = $(call installed_includes_fn, vppinfra)
-
-vppapigen_LDFLAGS = $(call installed_libs_fn, vppinfra)
mkdir -p -m755 %{buildroot}%{_bindir}
mkdir -p -m755 %{buildroot}%{_unitdir}
install -p -m 755 %{_mu_build_dir}/%{_vpp_install_dir}/*/bin/* %{buildroot}%{_bindir}
-install -p -m 755 %{_mu_build_dir}/%{_vpp_build_dir}/vppapigen/vppapigen %{buildroot}%{_bindir}
+install -p -m 755 %{_mu_build_dir}/%{_vpp_build_dir}/tools/vppapigen %{buildroot}%{_bindir}
-# core api
+# api
mkdir -p -m755 %{buildroot}/usr/share/vpp/api
-install -p -m 644 %{_mu_build_dir}/%{_vpp_install_dir}/vpp/vpp-api/vpe.api.json %{buildroot}/usr/share/vpp/api
-install -p -m 644 %{_mu_build_dir}/%{_vpp_install_dir}/vlib-api/vlibmemory/memclnt.api.json %{buildroot}/usr/share/vpp/api
#
# configs
mkdir -p -m755 %{buildroot}/etc/vpp
mkdir -p -m755 %{buildroot}/etc/sysctl.d
install -p -m 644 %{_mu_build_dir}/rpm/vpp.service %{buildroot}%{_unitdir}
-install -p -m 644 %{_mu_build_dir}/../vpp/conf/startup.uiopcigeneric.conf %{buildroot}/etc/vpp/startup.conf
-install -p -m 644 %{_mu_build_dir}/../vpp/conf/80-vpp.conf %{buildroot}/etc/sysctl.d
+install -p -m 644 %{_mu_build_dir}/../src/vpp/conf/startup.uiopcigeneric.conf %{buildroot}/etc/vpp/startup.conf
+install -p -m 644 %{_mu_build_dir}/../src/vpp/conf/80-vpp.conf %{buildroot}/etc/sysctl.d
#
# libraries
#
( cd %{buildroot}%{_libdir} &&
ln -fs $file $(echo $file | sed -e 's/\(\.so\)\.[0-9]\+.*/\1/') )
done
-for file in $(find %{_mu_build_dir}/%{_vpp_install_dir}/vnet -type f -name '*.api.json' -print )
+for file in $(find %{_mu_build_dir}/%{_vpp_install_dir}/vpp/share/vpp/api -type f -name '*.api.json' -print )
do
install -p -m 644 $file %{buildroot}/usr/share/vpp/api
done
%{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 \
+ %{buildroot}/usr/lib/vpp_api_test_plugins/$file
+done
+
for file in $(find %{_mu_build_dir}/%{_vpp_install_dir}/plugins -type f -name '*.api.json' -print )
do
install -p -m 644 $file %{buildroot}/usr/share/vpp/api
rm -f $2
-for i in ${1}/plugins/lib64/vpp_plugins/*.so; do
+for i in ${1}/{plugins,vpp}/lib64/vpp_plugins/*.so; do
echo ../${i} /usr/lib/vpp_plugins >> ${2}
done
-for i in ${1}/plugins/lib64/vpp_api_test_plugins/*.so; do
+for i in ${1}/{plugins,vpp}/lib64/vpp_api_test_plugins/*.so; do
echo ../${i} /usr/lib/vpp_api_test_plugins >> ${2}
done
-for i in $(find ${1}/plugins -name *.api.json -type f -print); do
+for i in $(find ${1}/plugins ${1}/vpp/share/vpp/api/plugins/ -name *.api.json -type f -print); do
echo ../${i} /usr/share/vpp/api/ >> ${2}
done
rm -f $2
-for i in $(find ${1}/vpp-api/lib/python2.7/site-packages/ -type f -print); do
+for i in $(find ${1}/{vpp,vpp-api}/lib/python2.7/site-packages/ -type f -print); do
echo ../${i} /usr/lib/python2.7/site-packages/vpp_papi >> ${2}
done
#include <vppinfra/clib.h>
#include <vppinfra/vec.h>
#include <vppinfra/hash.h>
-#include <svmdb.h>
+#include <svm/svmdb.h>
#include <errno.h>
mmodule vpp_module;
+++ /dev/null
-# 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
-AM_CFLAGS = -Wall
-
-bin_PROGRAMS = c2cpel cpelatency cpeldump cpelinreg cpelstate
-
-lib_LTLIBRARIES = libcperf.la
-
-libcperf_la_SOURCES = delsvec.c linreg.c props.c cpel_util.c
-
-TOOL_LIBS = libcperf.la -lvppinfra -lm
-
-c2cpel_SOURCE = c2cpel.c
-c2cpel_LDADD = $(TOOL_LIBS)
-
-cpelatency_SOURCE = cpelatency.c
-cpelatency_LDADD = $(TOOL_LIBS)
-
-cpeldump_SOURCE = cpeldump.c
-cpeldump_LDADD = $(TOOL_LIBS)
-
-cpelinreg_SOURCE = cpelinreg.c
-cpelinreg_LDADD = $(TOOL_LIBS)
-
-cpelstate_SOURCE = cpelstate.c
-cpelstate_LDADD = $(TOOL_LIBS)
-
-
-
-
-
-
SUBDIRS += sample-plugin
endif
-if ENABLE_sixrd_PLUGIN
-SUBDIRS += sixrd-plugin
-endif
-
if ENABLE_ioam_PLUGIN
SUBDIRS += ioam-plugin
endif
SUBDIRS += snat-plugin
endif
-if ENABLE_ila_PLUGIN
-SUBDIRS += ila-plugin
-endif
-
if ENABLE_lb_PLUGIN
SUBDIRS += lb-plugin
endif
-if ENABLE_flowperpkt_PLUGIN
-SUBDIRS += flowperpkt-plugin
-endif
-
if ENABLE_acl_PLUGIN
SUBDIRS += acl-plugin
endif
# SUBDIRS += new-plugin
# endif
-PLUGIN_ENABLED(sixrd)
PLUGIN_ENABLED(ioam)
PLUGIN_ENABLED(snat)
-PLUGIN_ENABLED(ila)
PLUGIN_ENABLED(lb)
-PLUGIN_ENABLED(flowperpkt)
PLUGIN_ENABLED(acl)
# Disabled plugins, require --enable-XXX-plugin
+++ /dev/null
-
-# 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
-AM_LDFLAGS = -module -shared -avoid-version
-
-vppapitestpluginsdir = ${libdir}/vpp_api_test_plugins
-vpppluginsdir = ${libdir}/vpp_plugins
-
-vppplugins_LTLIBRARIES = flowperpkt_plugin.la
-vppapitestplugins_LTLIBRARIES = flowperpkt_test_plugin.la
-
-flowperpkt_plugin_la_SOURCES = flowperpkt/flowperpkt.c \
- flowperpkt/l2_node.c \
- flowperpkt/node.c \
- flowperpkt/flowperpkt_plugin.api.h
-flowperpkt_plugin_la_LDFLAGS = -module
-
-BUILT_SOURCES = \
- flowperpkt/flowperpkt.api.h \
- flowperpkt/flowperpkt.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)/flowperpkt/
-api_DATA = flowperpkt/flowperpkt.api.json
-
-noinst_HEADERS = \
- flowperpkt/flowperpkt_all_api_h.h \
- flowperpkt/flowperpkt_msg_enum.h \
- flowperpkt/flowperpkt.api.h
-
-flowperpkt_test_plugin_la_SOURCES = \
- flowperpkt/flowperpkt_test.c flowperpkt/flowperpkt_plugin.api.h
-
-# Remove *.la files
-install-data-hook:
- @(cd $(vpppluginsdir) && $(RM) $(vppplugins_LTLIBRARIES))
- @(cd $(vppapitestpluginsdir) && $(RM) $(vppapitestplugins_LTLIBRARIES))
-
+++ /dev/null
-
-AC_INIT(flowperpkt_plugin, 1.0)
-AM_INIT_AUTOMAKE
-AM_SILENT_RULES([yes])
-
-AC_PROG_LIBTOOL
-AC_PROG_CC
-
-AC_OUTPUT([Makefile])
+++ /dev/null
-AC_INIT(ila_plugin, 1.0)
-AM_INIT_AUTOMAKE
-AM_SILENT_RULES([yes])
-AC_PREFIX_DEFAULT([/usr])
-
-AC_PROG_LIBTOOL
-AC_PROG_CC
-
-AC_OUTPUT([Makefile])
+++ /dev/null
-AC_INIT(sixrd_plugin, 1.0)
-LT_INIT
-AM_INIT_AUTOMAKE
-AM_SILENT_RULES([yes])
-AC_PREFIX_DEFAULT([/usr])
-
-AC_PROG_CC
-
-AC_OUTPUT([Makefile])
--- /dev/null
+# 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.
+
+###############################################################################
+# Global Defines
+###############################################################################
+
+AUTOMAKE_OPTIONS = foreign subdir-objects
+ACLOCAL_AMFLAGS = -I m4
+
+AM_CFLAGS = -Wall
+
+SUBDIRS = .
+SUFFIXES = .api.h .api .api.json
+API_FILES =
+noinst_HEADERS =
+dist_bin_SCRIPTS =
+lib_LTLIBRARIES =
+BUILT_SOURCES =
+
+###############################################################################
+# DPDK
+###############################################################################
+
+if WITH_DPDK
+if ENABLE_DPDK_SHARED
+DPDK_LD_FLAGS = -Wl,--whole-archive,-ldpdk,--no-whole-archive
+else
+DPDK_LD_FLAGS = -Wl,--whole-archive,-l:libdpdk.a,--no-whole-archive
+endif
+if WITH_DPDK_CRYPTO
+DPDK_LD_ADD = -L$(AESNI_MULTI_BUFFER_LIB_PATH) -lIPSec_MB
+endif
+if WITH_DPDK_MLX5_PMD
+DPDK_LD_FLAGS += -libverbs -lmlx5 -lnuma
+endif
+else
+DPDK_LD_FLAGS =
+DPDK_LD_ADD =
+endif
+
+###############################################################################
+# Components
+###############################################################################
+
+include vppinfra.am
+include vppapigen.am
+
+if ENABLE_PERFTOOL
+include perftool.am
+endif
+
+if ENABLE_G2
+include g2.am
+endif
+
+if ENABLE_SVM
+include svm.am
+endif
+
+if ENABLE_VLIB
+include vlib.am
+endif
+
+if ENABLE_SVM
+if ENABLE_VLIB
+include vlib-api.am
+include vnet.am
+include vpp.am
+include vpp-api-test.am
+
+SUBDIRS += vpp-api/python plugins
+
+###############################################################################
+# API
+###############################################################################
+
+include suffix-rules.mk
+
+# Set the suffix list
+apidir = $(prefix)/share/vpp/api/core
+
+api_DATA = \
+ $(patsubst %.api,%.api.json,$(API_FILES))
+
+BUILT_SOURCES += \
+ $(patsubst %.api,%.api.json,$(API_FILES)) \
+ $(patsubst %.api,%.api.h,$(API_FILES))
+
+endif # if ENABLE_VLIB
+endif # if ENABLE_SVM
--- /dev/null
+AC_INIT([vpp], [17.04], [vpp-dev@fd.io])
+LT_INIT
+AC_CONFIG_AUX_DIR([.])
+AM_INIT_AUTOMAKE([subdir-objects])
+AM_SILENT_RULES([yes])
+AC_CONFIG_FILES([Makefile plugins/Makefile vpp-api/python/Makefile])
+
+AC_PROG_CC
+AM_PROG_AS
+AM_PROG_LIBTOOL
+AC_PROG_YACC
+
+###############################################################################
+# Macros
+###############################################################################
+
+AC_DEFUN([ENABLE_ARG],
+[
+ AC_ARG_ENABLE($1,
+ AC_HELP_STRING(patsubst([--enable-$1],[_],[-]), $2),
+ [enable_$1=yes n_enable_$1=1],
+ [enable_$1=no n_enable_$1=0])
+ AM_CONDITIONAL(m4_toupper(ENABLE_$1), test "$enable_$1" = "yes")
+ m4_append([list_of_enabled], [$1], [, ])
+])
+
+AC_DEFUN([DISABLE_ARG],
+[
+ AC_ARG_ENABLE($1,
+ AC_HELP_STRING(patsubst([--disable-$1],[_],[-]), $2),
+ [enable_$1=no n_enable_$1=0],
+ [enable_$1=yes n_enable_$1=1])
+ AM_CONDITIONAL(m4_toupper(ENABLE_$1), test "$enable_$1" = "yes")
+ m4_append([list_of_enabled], [$1], [, ])
+])
+
+AC_DEFUN([WITH_ARG],
+[
+ AC_ARG_WITH($1,
+ AC_HELP_STRING(patsubst([--with-$1],[_],[-]), $2),
+ [with_$1=yes n_with_$1=1],
+ [with_$1=no n_with_$1=0])
+ AM_CONDITIONAL(m4_toupper(WITH_$1), test "$with_$1" = "yes")
+ m4_append([list_of_with], [$1], [, ])
+])
+
+AC_DEFUN([WITHOUT_ARG],
+[
+ AC_ARG_WITH($1,
+ AC_HELP_STRING(patsubst([--without-$1],[_],[-]), $2),
+ [with_$1=no n_with_$1=0],
+ [with_$1=yes n_with_$1=1])
+ AM_CONDITIONAL(m4_toupper(WITH_$1), test "$with_$1" = "yes")
+ m4_append([list_of_with], [$1], [, ])
+])
+
+AC_DEFUN([PLUGIN_ENABLED],
+[
+ AC_ARG_ENABLE($1_plugin,
+ AC_HELP_STRING([--disable-$1-plugin], [Do not build $1 plugin]),
+ [enable_$1_plugin=no],
+ [enable_$1_plugin=yes ])
+ AM_CONDITIONAL(m4_toupper(ENABLE_$1_PLUGIN), test "$enable_$1_plugin" = "yes")
+ m4_append([list_of_plugins], [$1], [, ])
+])
+
+AC_DEFUN([PLUGIN_DISABLED],
+[
+ AC_ARG_ENABLE($1_plugin,
+ AC_HELP_STRING([--enable-$1-plugin], [Build $1 plugin]),
+ [enable_$1_plugin=yes ],
+ [enable_$1_plugin=no])
+ AM_CONDITIONAL(m4_toupper((ENABLE_$1_PLUGIN), test "$enable_$1_plugin" = "yes")
+ m4_append([list_of_plugins], [$1], [, ])
+])
+
+AC_DEFUN([PRINT_VAL], [ AC_MSG_RESULT(AC_HELP_STRING($1,$2)) ])
+
+###############################################################################
+# configure arguments
+###############################################################################
+
+# --enable-X
+ENABLE_ARG(tests, [Enable unit tests])
+ENABLE_ARG(dpdk_shared, [Enable unit tests])
+ENABLE_ARG(perftool, [Enable perftool])
+ENABLE_ARG(g2, [Enable g2])
+
+# --disable-X
+DISABLE_ARG(vlib, [Disable vlib and dependant libs and binaries])
+DISABLE_ARG(svm, [Disable svm and dependant libs and binaries])
+
+# --with-X
+WITH_ARG(dpdk, [Use use DPDK])
+WITH_ARG(dpdk_crypto, [Use DPDK cryptodev])
+WITH_ARG(dpdk_mlx5_pmd, [Use DPDK with mlx5 PMD])
+
+# --without-X
+WITHOUT_ARG(ipsec, [Disable IPSec])
+WITHOUT_ARG(ipv6sr, [Disable IPv6 SR])
+WITHOUT_ARG(apicli, [Disable binary api CLI])
+
+AC_ARG_WITH(unix,
+ AC_HELP_STRING([--with-unix],[Compile unix version of clib]),
+ [],
+ [case $host_os in
+ darwin* | linux*) with_unix=yes;;
+ *) with_unix=no;;
+ esac])
+
+AM_CONDITIONAL(WITH_UNIX, test "$with_unix" = "yes")
+
+AC_ARG_WITH(pre-data,
+ AC_HELP_STRING([--with-pre-data],[Set buffer rewrite space]),
+ [case $with_pre_data in
+ 128) ;;
+ 256) ;;
+ *) with_pre_data="pre-data-not-set" ;;
+ esac], [with_pre_data=128])
+
+###############################################################################
+# Substitutions and defines
+###############################################################################
+
+AC_SUBST(PRE_DATA_SIZE, [$with_pre_data])
+AC_SUBST(APICLI, [-DVPP_API_TEST_BUILTIN=${n_with_apicli}])
+
+AC_DEFINE_UNQUOTED(DPDK, [${n_with_dpdk}])
+AC_DEFINE_UNQUOTED(DPDK_SHARED_LIB, [${n_enable_dpdk_shared}])
+AC_DEFINE_UNQUOTED(DPDK_CRYPTO, [${n_with_dpdk_crypto}])
+AC_DEFINE_UNQUOTED(IPSEC, [${n_with_ipsec}])
+AC_DEFINE_UNQUOTED(IPV6SR, [${n_with_ipv6sr}])
+
+###############################################################################
+# Dependency checks
+###############################################################################
+
+AM_COND_IF([ENABLE_DPDK_SHARED],
+[
+ AC_CHECK_HEADERS([rte_config.h],
+ [],
+ [AC_MSG_ERROR([DPDK header files not found])],)
+ AC_CHECK_LIB( [dpdk], [rte_eal_init],
+ [],
+ [AC_MSG_ERROR([DPDK shared library not found])],)
+])
+
+AM_COND_IF([ENABLE_G2],
+[
+ PKG_CHECK_MODULES(g2, gtk+-2.0)
+])
+
+###############################################################################
+# Plugins
+###############################################################################
+
+PLUGIN_ENABLED(sixrd)
+PLUGIN_ENABLED(ila)
+PLUGIN_ENABLED(flowperpkt)
+
+###############################################################################
+# Output
+###############################################################################
+
+AC_OUTPUT
+
+AC_MSG_RESULT([==============================================================================])
+PRINT_VAL([version], $PACKAGE $VERSION)
+PRINT_VAL([prefix], ${prefix})
+PRINT_VAL([libdir], ${libdir})
+PRINT_VAL([includedir], ${includedir})
+PRINT_VAL([CFLAGS], ${CFLAGS})
+PRINT_VAL([CPPFLAGS], ${CPPFLAGS})
+PRINT_VAL([LDFLAGS], ${LDFLAGS})
+
+AC_MSG_RESULT([])
+AC_MSG_RESULT([with:])
+m4_foreach([x], m4_dquote(list_of_with), [
+ AC_MSG_RESULT(AC_HELP_STRING(x, m4_join([], [${with_], x, [}])))
+])
+
+AC_MSG_RESULT([])
+AC_MSG_RESULT([enabled:])
+m4_foreach([x], m4_dquote(list_of_enabled), [
+ AC_MSG_RESULT(AC_HELP_STRING(x, m4_join([], [${enable_], x, [}])))
+])
+
+AC_MSG_RESULT([])
+AC_MSG_RESULT([plugins:])
+m4_foreach([x], m4_dquote(list_of_plugins), [
+ AC_MSG_RESULT(AC_HELP_STRING(x, m4_join([], [${enable_], x, [_plugin}])))
+])
+AC_MSG_RESULT([==============================================================================])
+
+
# See the License for the specific language governing permissions and
# limitations under the License.
-AUTOMAKE_OPTIONS = foreign
-
-bin_PROGRAMS = g2
-
-AM_CFLAGS = -Wall
+bin_PROGRAMS += g2
g2_SOURCES = \
- clib.c \
- cpel.c \
- cpel.h \
- events.c \
- g2.h \
- main.c \
- menu1.c \
- pointsel.c \
- props.c \
- props.h \
- g2version.c \
- view1.c
+ tools/g2/clib.c \
+ tools/g2/cpel.c \
+ tools/g2/cpel.h \
+ tools/g2/events.c \
+ tools/g2/g2.h \
+ tools/g2/main.c \
+ tools/g2/menu1.c \
+ tools/g2/pointsel.c \
+ tools/g2/props.c \
+ tools/g2/props.h \
+ tools/g2/g2version.c \
+ tools/g2/view1.c
+
+g2_LDADD = $(g2_LIBS) libvppinfra.la -lpthread -lm
-g2_LDADD = $(g2_LIBS) -lvppinfra -lpthread -lm
+# vi:syntax=automake
--- /dev/null
+# 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.
+
+bin_PROGRAMS += c2cpel cpelatency cpeldump cpelinreg cpelstate
+
+lib_LTLIBRARIES += libcperf.la
+
+libcperf_la_SOURCES = \
+ tools/perftool/delsvec.c \
+ tools/perftool/linreg.c \
+ tools/perftool/props.c \
+ tools/perftool/cpel_util.c
+
+PERFTOOL_LIBS = libcperf.la libvppinfra.la -lm
+
+c2cpel_SOURCES = tools/perftool/c2cpel.c
+c2cpel_LDADD = $(PERFTOOL_LIBS)
+
+cpelatency_SOURCES = tools/perftool/cpelatency.c
+cpelatency_LDADD = $(PERFTOOL_LIBS)
+
+cpeldump_SOURCES = tools/perftool/cpeldump.c
+cpeldump_LDADD = $(PERFTOOL_LIBS)
+
+cpelinreg_SOURCES = tools/perftool/cpelinreg.c
+cpelinreg_LDADD = $(PERFTOOL_LIBS)
+
+cpelstate_SOURCES = tools/perftool/cpelstate.c
+cpelstate_LDADD = $(PERFTOOL_LIBS)
+
+# vi:syntax=automake
--- /dev/null
+
+# 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 -I${top_srcdir} -I${top_builddir}
+AM_LDFLAGS = -module -shared -avoid-version
+SUFFIXES = .api.h .api .api.json
+API_FILES =
+BUILT_SOURCES =
+vppplugins_LTLIBRARIES =
+vppapitestplugins_LTLIBRARIES =
+noinst_HEADERS =
+
+vppapitestpluginsdir = ${libdir}/vpp_api_test_plugins
+vpppluginsdir = ${libdir}/vpp_plugins
+
+if ENABLE_FLOWPERPKT_PLUGIN
+include flowperpkt.am
+endif
+
+if ENABLE_ILA_PLUGIN
+include ila.am
+endif
+
+if ENABLE_SIXRD_PLUGIN
+include sixrd.am
+endif
+
+include ../suffix-rules.mk
+
+# Remove *.la files
+install-data-hook:
+ @-(cd $(vpppluginsdir) && $(RM) $(vppplugins_LTLIBRARIES))
+ @-(cd $(vppapitestpluginsdir) && $(RM) $(vppapitestplugins_LTLIBRARIES))
+
+###############################################################################
+# API
+###############################################################################
+
+apidir = $(prefix)/share/vpp/api/plugins
+
+api_DATA = \
+ $(patsubst %.api,%.api.json,$(API_FILES))
+
+BUILT_SOURCES += \
+ $(patsubst %.api,%.api.json,$(API_FILES)) \
+ $(patsubst %.api,%.api.h,$(API_FILES))
+
--- /dev/null
+
+# 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.
+
+vppplugins_LTLIBRARIES += flowperpkt_plugin.la
+vppapitestplugins_LTLIBRARIES += flowperpkt_test_plugin.la
+
+flowperpkt_plugin_la_SOURCES = flowperpkt/flowperpkt.c \
+ flowperpkt/l2_node.c \
+ flowperpkt/node.c \
+ flowperpkt/flowperpkt_plugin.api.h
+
+BUILT_SOURCES += \
+ flowperpkt/flowperpkt.api.h \
+ flowperpkt/flowperpkt.api.json
+
+noinst_HEADERS += \
+ flowperpkt/flowperpkt_all_api_h.h \
+ flowperpkt/flowperpkt_msg_enum.h \
+ flowperpkt/flowperpkt.api.h
+
+flowperpkt_test_plugin_la_SOURCES = \
+ flowperpkt/flowperpkt_test.c \
+ flowperpkt/flowperpkt_plugin.api.h
+
+API_FILES += flowperpkt/flowperpkt.api
+
+# vi:syntax=automake
# 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
-
-vpppluginsdir = ${libdir}/vpp_plugins
-
-vppplugins_LTLIBRARIES = ila_plugin.la
+vppplugins_LTLIBRARIES += ila_plugin.la
ila_plugin_la_SOURCES = ila/ila.c
-noinst_HEADERS = ila/ila.h
+noinst_HEADERS += ila/ila.h
-# Remove *.la files
-install-data-hook:
- @(cd $(vpppluginsdir) && $(RM) $(vppplugins_LTLIBRARIES))
+# vi:syntax=automake
# 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
-
libsixrd_plugin_la_SOURCES = \
sixrd/sixrd.c \
sixrd/sixrd_dpo.c \
sixrd/ip4_sixrd.c \
sixrd/ip6_sixrd.c
-noinst_HEADERS = \
+noinst_HEADERS += \
sixrd/sixrd.h \
sixrd/sixrd_dpo.h
-BUILT_SOURCES =
-
-vpppluginsdir = ${libdir}/vpp_plugins
-
-vppplugins_LTLIBRARIES = libsixrd_plugin.la
-
+vppplugins_LTLIBRARIES += libsixrd_plugin.la
-# Remove *.la files
-install-data-hook:
- @(cd $(vpppluginsdir) && $(RM) $(vppplugins_LTLIBRARIES))
+# vi:syntax=automake
# See the License for the specific language governing permissions and
# limitations under the License.
-AUTOMAKE_OPTIONS = foreign
+bin_PROGRAMS += svmtool svmdbtool
-bin_PROGRAMS = svmtool svmdbtool
+nobase_include_HEADERS += svm/svm.h svm/ssvm.h svm/svmdb.h
-AM_CFLAGS = -Wall
+libsvmdir = ${libdir}
+libsvm_LTLIBRARIES = libsvm.la libsvmdb.la
-nobase_include_HEADERS = svm.h ssvm.h svmdb.h
+libsvm_la_SOURCES = svm/svm.c svm/ssvm.c
-lib_LTLIBRARIES = libsvm.la libsvmdb.la
+svmtool_SOURCES = svm/svmtool.c
+svmtool_LDADD = libsvm.la libvppinfra.la -lpthread -lrt
-libsvm_la_SOURCES = svm.c ssvm.c
+libsvmdb_la_SOURCES = svm/svmdb.c
-svmtool_LDADD = libsvm.la -lvppinfra -lpthread -lrt
+svmdbtool_SOURCES = svm/svmdbtool.c
+svmdbtool_LDADD = libsvmdb.la libsvm.la libvppinfra.la -lpthread -lrt
-libsvmdb_la_SOURCES = svmdb.c
-
-svmdbtool_LDADD = libsvmdb.la libsvm.la -lvppinfra -lpthread -lrt
+# vi:syntax=automake
#include <vlibapi/api.h>
#include <vnet/lisp-cp/packets.h>
+/* FIXME */
+#include <vlibapi/api_helper_macros.h>
+vpe_api_main_t vpe_api_main;
+
#define _assert(e) \
error = CLIB_ERROR_ASSERT (e); \
if (error) \
#include <vnet/lisp-cp/lisp_types.h>
#include <vnet/lisp-cp/lisp_cp_messages.h>
+/* FIXME */
+#include <vlibapi/api_helper_macros.h>
+vpe_api_main_t vpe_api_main;
+
#define _assert(e) \
error = CLIB_ERROR_ASSERT (e); \
if (error) \
}
vec_add2(bound_tracks, btp, 1);
btp->track = track_code;
- btp->track_str = t->name;
+ btp->track_str = (u8 *) t->name;
hash_set(the_trackdef_hash, track_code, btp - bound_tracks);
track_strlen = strlen((char *)btp->track_str);
void sort_state_statistics(sort_t type, FILE *ofp)
{
- int (*compare)(const void *, const void *);
+ int (*compare)(const void *, const void *) = 0;
if (summary_stats_only)
return;
#include "lex.h"
#include "node.h"
-#include "gram.h"
+#include "tools/vppapigen/gram.h"
FILE *ifp, *ofp, *pythonfp, *jsonfp;
char *vlib_app_name = "vpp";
#define YYSTYPE void *
#endif
-#include "gram.h"
+#include "tools/vppapigen/gram.h"
enum lex_state {
START_STATE = 1,
void node_define_generate (node_t *this, enum passid which, FILE *fp)
{
- node_t *child, *save_child;
+ node_t *child;
switch(which) {
case TYPEDEF_PASS:
YYSTYPE add_primtype (YYSTYPE a1, YYSTYPE a2, YYSTYPE a3)
{
- node_t *np1;
-
- np1 = (node_t *)a1;
-
/* Hook instance to type node */
deeper (a1, a2);
if (a3) {
*------------------------------------------------------------------
*/
-#include "vat.h"
+#include <vat/vat.h>
#include <vlibapi/api.h>
#include <vlibmemory/api.h>
#include <vlibsocket/api.h>
#include <vnet/vxlan-gpe/vxlan_gpe.h>
#include <vnet/lisp-gpe/lisp_gpe.h>
-#include <vpp-api/vpe_msg_enum.h>
+#include <vpp/api/vpe_msg_enum.h>
#include <vnet/l2/l2_classify.h>
#include <vnet/l2/l2_vtr.h>
#include <vnet/classify/input_acl.h>
#include <vnet/policer/policer.h>
#include <vnet/policer/police.h>
+#include "vat/json_format.h"
+
#include <inttypes.h>
#include <sys/stat.h>
#define vl_typedefs /* define message structures */
-#include <vpp-api/vpe_all_api_h.h>
+#include <vpp/api/vpe_all_api_h.h>
#undef vl_typedefs
/* declare message handlers for each api */
#define vl_endianfun /* define message structures */
-#include <vpp-api/vpe_all_api_h.h>
+#include <vpp/api/vpe_all_api_h.h>
#undef vl_endianfun
/* instantiate all the print functions we know about */
#define vl_print(handle, ...)
#define vl_printfun
-#include <vpp-api/vpe_all_api_h.h>
+#include <vpp/api/vpe_all_api_h.h>
#undef vl_printfun
static uword
vat_main_t vat_main;
+#include <vlibapi/api_helper_macros.h>
+vpe_api_main_t vpe_api_main;
+
void
vat_suspend (vlib_main_t * vm, f64 interval)
{
#include <vppinfra/clib.h>
#include <vppinfra/vec.h>
#include <vppinfra/hash.h>
-#include <svmdb.h>
+#include <svm/svmdb.h>
#include <vppinfra/format.h>
#include <vppinfra/error.h>
#include <vppinfra/time.h>
#include <vlibapi/api.h>
#include <vlibmemory/api.h>
-#include "json_format.h"
+#include "vat/json_format.h"
#include <vlib/vlib.h>
# See the License for the specific language governing permissions and
# limitations under the License.
-AUTOMAKE_OPTIONS = foreign subdir-objects
-
-AM_CFLAGS = -Wall
-
-lib_LTLIBRARIES = libvlibapi.la libvlibmemory.la libvlibmemoryclient.la \
- libvlibsocket.la
+lib_LTLIBRARIES += libvlibapi.la libvlibmemory.la libvlibmemoryclient.la \
+ libvlibsocket.la
libvlibapi_la_SOURCES = \
vlibapi/api.h \
vlibapi/api_shared.c \
vlibapi/node_serialize.c
-nobase_include_HEADERS = vlibapi/api.h vlibapi/api_helper_macros.h
+nobase_include_HEADERS += vlibapi/api.h vlibapi/api_helper_macros.h
libvlibmemory_la_SOURCES = \
vlibmemory/api.h \
vlibmemory/vl_memory_api_h.h \
vlibmemory/vl_memory_msg_enum.h \
vlibmemory/unix_shared_memory_queue.c \
- vlibmemory/unix_shared_memory_queue.h
+ vlibmemory/unix_shared_memory_queue.h
libvlibmemoryclient_la_SOURCES = \
vlibmemory/api.h \
vlibmemory/vl_memory_api_h.h \
vlibmemory/vl_memory_msg_enum.h \
vlibmemory/unix_shared_memory_queue.c \
- vlibmemory/unix_shared_memory_queue.h
+ vlibmemory/unix_shared_memory_queue.h
nobase_include_HEADERS += \
vlibmemory/api.h \
vlibsocket/vl_socket_msg_enum.h \
vlibsocket/sockclnt.api.h
-BUILT_SOURCES = \
+BUILT_SOURCES += \
vlibsocket/sockclnt.api.h \
vlibmemory/memclnt.api.h \
vlibmemory/memclnt.api.json
-SUFFIXES = .api.h .api .api.json
-
-# The actual %.api.h rule is in .../build-data/packages/suffix-rules.mk
-# and requires a symbolic link at the top of the vnet source tree
-
-include $(top_srcdir)/suffix-rules.mk
+API_FILES += vlibmemory/memclnt.api
-# install the API definition, so we can produce java bindings, etc.
-apidir = $(prefix)/vlibmemory
-api_DATA = vlibmemory/memclnt.api.json
+# vi:syntax=automake
# See the License for the specific language governing permissions and
# limitations under the License.
-AUTOMAKE_OPTIONS = foreign subdir-objects
-AM_CFLAGS = -Wall @DPDK@
+libvlibdir = ${libdir}
+libvlib_LTLIBRARIES = libvlib.la
+libvlib_la_LIBAD = libvppinfra.la
-PRE_DATA_SIZE=@PRE_DATA_SIZE@
-
-lib_LTLIBRARIES = libvlib.la
-
-BUILT_SOURCES = vlib/config.h
+BUILT_SOURCES += vlib/config.h
vlib/config.h:
- echo "#define __PRE_DATA_SIZE" $(PRE_DATA_SIZE) > $@
+ echo "#define __PRE_DATA_SIZE" @PRE_DATA_SIZE@ > $@
libvlib_la_SOURCES = \
vlib/buffer.c \
vlib/threads_cli.c \
vlib/trace.c
-nobase_include_HEADERS = \
+nobase_include_HEADERS += \
vlib/buffer_funcs.h \
vlib/buffer_node.h \
vlib/buffer.h \
vlib/trace.h \
vlib/vlib.h
-lib_LTLIBRARIES += libvlib_unix.la
+libvlib_LTLIBRARIES += libvlib_unix.la
libvlib_unix_la_SOURCES = \
vlib/unix/cj.c \
vlib/unix/unix.h
if !WITH_DPDK
-noinst_PROGRAMS = vlib_unix
+noinst_PROGRAMS += vlib_unix
vlib_unix_SOURCES = \
- example/main_stub.c \
- example/mc_test.c
+ examples/vlib/main_stub.c \
+ examples/vlib/mc_test.c
vlib_unix_LDADD = libvlib_unix.la libvlib.la \
- -lvppinfra -lpthread -lm -ldl -lrt
+ libvppinfra.la -lpthread -lm -ldl -lrt
endif
+
+# vi:syntax=automake
#define included_api_h
#include <vppinfra/error.h>
-#include <svm.h>
+#include <svm/svm.h>
#include <vlib/vlib.h>
#include <vlibmemory/unix_shared_memory_queue.h>
#include <vlib/unix/unix.h>
#define included_vlibmemory_api_h
#include <vppinfra/error.h>
-#include <svm.h>
+#include <svm/svm.h>
#include <vlib/vlib.h>
#include <vlibmemory/unix_shared_memory_queue.h>
#include <vlib/unix/unix.h>
# See the License for the specific language governing permissions and
# limitations under the License.
-AUTOMAKE_OPTIONS = foreign subdir-objects
-
-AM_CFLAGS = -Wall -Werror @DPDK@ @DPDK_CRYPTO@ @IPSEC@ @IPV6SR@
-
-API_FILES =
-
libvnet_la_SOURCES =
libvnetplugin_la_SOURCES =
-nobase_include_HEADERS =
-noinst_PROGRAMS =
-TESTS =
-dpdk_libs =
-if WITH_DPDK
-dpdk_libs += -l:libdpdk.a
-endif
+libvnet_la_LIBAD = libvppinfra.la libvlib.la libsvm.la
########################################
# Generic stuff
vnet/map/test.c
test_map_CPPFLAGS = $(AM_CPPFLAGS) -DCLIB_DEBUG
-test_map_LDADD = libvnet.la -lvppinfra -lvlib \
+test_map_LDADD = libvnet.la libvppinfra.la libvlib.la \
-lpthread -lvlibmemory -lvlibapi -lvlib_unix \
-ldl -lsvm -lrt
API_FILES += vnet/lisp-cp/lisp.api
if ENABLE_TESTS
-LDS = -lvppinfra -l:libvlib.a $(dpdk_libs) -l:libvlibmemory.a \
- -l:libvlibapi.a -l:libsvm.a -lpthread -ldl -lrt -lm -l:libvlib_unix.a
+LDS = \
+ libvppinfra.la \
+ libvnet.la \
+ libvlib.la \
+ libvlib_unix.la \
+ libsvm.la \
+ libsvmdb.la \
+ libvlibapi.la \
+ libvlibmemory.la \
+ -lpthread -ldl -lrt -lm -lcrypto
TESTS += test_cp_serdes test_lisp_types
test_cp_serdes_SOURCES = \
- test/lisp-cp/test_cp_serdes.c \
+ tests/vnet/lisp-cp/test_cp_serdes.c \
vnet/lisp-cp/lisp_msg_serdes.c \
vnet/lisp-cp/lisp_types.c \
vnet/lisp-cp/packets.c \
vnet/ip/ip_checksum.c
test_lisp_types_SOURCES = \
- test/lisp-cp/test_lisp_types.c \
+ tests/vnet/lisp-cp/test_lisp_types.c \
vnet/lisp-cp/lisp_types.c
test_cp_serdes_CPPFLAGS = $(AM_CPPFLAGS) -DCLIB_DEBUG
test_lisp_types_CPPFLAGS = $(AM_CPPFLAGS) -DCLIB_DEBUG
-test_cp_serdes_LDADD = libvnet.la $(LDS)
-test_lisp_types_LDADD = libvnet.la $(LDS)
-
-test_cp_serdes_LDFLAGS = -static
-test_lisp_types_LDFLAGS = -static
+test_cp_serdes_LDFLAGS = $(DPDK_LD_FLAGS)
+test_cp_serdes_LDADD = $(LDS) $(DPDK_LD_ADD)
+test_lisp_types_LDFLAGS = $(DPDK_LD_FLAGS)
+test_lisp_types_LDADD = $(LDS) $(DPDK_LD_ADD)
endif
########################################
if ENABLE_TESTS
TESTS += test_test
-test_test_SOURCES = test/lisp-gpe/test.c
+test_test_SOURCES = tests/vnet/lisp-gpe/test.c
test_test_CPPFLAGS = $(AM_CPPFLAGS) -DCLIB_DEBUG
test_test_LDADD = $(LIBOBJS)
noinst_PROGRAMS += $(TESTS)
-check_PROGRAMS = $(TESTS)
+check_PROGRAMS += $(TESTS)
endif
########################################
nobase_include_HEADERS += \
vnet/plugin/plugin.h
-lib_LTLIBRARIES = libvnet.la libvnetplugin.la
+libvnetdir = ${libdir}
+libvnet_LTLIBRARIES = libvnet.la libvnetplugin.la
pcap2pg_SOURCES = \
vnet/unix/pcap2pg.c \
vnet/unix/pcap.h
pcap2pg_LDFLAGS = -static
-pcap2pg_LDADD = libvnet.la -l:libvppinfra.a -lpthread -lm -ldl
+pcap2pg_LDADD = libvnet.la libvppinfra.la -lpthread libvlibmemory.la -lm -ldl
noinst_PROGRAMS += pcap2pg
-# Set the suffix list
-SUFFIXES = .api.h .api .api.json
-
-# install the API definition, so we can produce java bindings, etc.
-
-apidir = $(prefix)/vnet
-
-api_DATA = \
- $(patsubst %.api,%.api.json,$(API_FILES))
-
-BUILT_SOURCES = \
- $(patsubst %.api,%.api.json,$(API_FILES)) \
- $(patsubst %.api,%.api.h,$(API_FILES))
-
-# The actual %.api.h rule is in .../build-data/packages/suffix-rules.mk
-# and requires a symbolic link at the top of the vnet source tree
-
-include $(top_srcdir)/suffix-rules.mk
+# vi:syntax=automake
#include <vnet/pg/pg.h>
#include <vlibmemory/unix_shared_memory_queue.h>
-#include <ssvm.h>
+#include <svm/ssvm.h>
extern vnet_device_class_t ssvm_eth_device_class;
extern vlib_node_registration_t ssvm_eth_input_node;
--- /dev/null
+# Copyright (c) 2015 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.
+
+libvatplugin_la_SOURCES = \
+ vat/plugin_api.c
+
+lib_LTLIBRARIES += libvatplugin.la
+
+bin_PROGRAMS += vpp_api_test vpp_json_test vpp_restart
+
+vpp_api_test_SOURCES = \
+ vat/api_format.c \
+ vat/main.c \
+ vat/plugin.c \
+ vat/vat.h \
+ vat/json_format.h \
+ vat/json_format.c
+
+vpp_json_test_SOURCES = \
+ vat/json_format.h \
+ vat/json_format.c \
+ vat/json_test.c
+
+vpp_api_test_LDFLAGS = $(DPDK_LD_FLAGS)
+vpp_api_test_LDADD = \
+ libvlib.la \
+ libvlib_unix.la \
+ libvlibmemoryclient.la \
+ libsvm.la \
+ libvatplugin.la \
+ libvppinfra.la \
+ libvlibapi.la \
+ libvlibmemory.la \
+ libvnet.la \
+ $(DPDK_LD_ADD) \
+ -lpthread -lm -lrt -ldl -lcrypto
+
+vpp_json_test_LDADD = libvppinfra.la -lm
+
+nobase_include_HEADERS += \
+ vat/vat.h \
+ vat/json_format.h
+
+vpp_restart_SOURCES = \
+ vat/restart.c
+vpp_restart_LDADD = \
+ libsvmdb.la \
+ libsvm.la \
+ libvppinfra.la \
+ -lpthread -lrt
+
+dist_bin_SCRIPTS += scripts/vppctl
+
+# vi:syntax=automake
# See the License for the specific language governing permissions and
# limitations under the License.
-AUTOMAKE_OPTIONS = foreign subdir-objects
+AUTOMAKE_OPTIONS = foreign
ACLOCAL_AMFLAGS = -I m4
-AM_CFLAGS = -Wall
+AM_CFLAGS = -Wall -I${top_srcdir} -I${top_builddir}
BUILT_SOURCES =
bin_PROGRAMS =
CLEANFILES =
lib_LTLIBRARIES =
-noinst_PROGRAMS = test_pneum
+noinst_PROGRAMS =
nobase_include_HEADERS = pneum/pneum.h
#
#
lib_LTLIBRARIES += libpneum.la
libpneum_la_SOURCES = pneum/pneum.c
-libpneum_la_LIBADD = -lvlibmemoryclient -lvlibapi -lsvm -lvppinfra -lpthread \
- -lm -lrt
+libpneum_la_LIBADD = \
+ $(top_builddir)/libvppinfra.la \
+ $(top_builddir)/libvlibmemoryclient.la \
+ $(top_builddir)/libvlibapi.la \
+ $(top_builddir)/libsvm.la \
+ -lpthread -lm -lrt
+
libpneum_la_LDFLAGS = -module
libpneum_la_CPPFLAGS =
mkdir -p $(prefix)/lib/python2.7/site-packages; \
PYTHONUSERBASE=$(prefix) \
python setup.py build_ext -L $(prefix)/lib64 \
- -I $(prefix)/../vppinfra/include/ install --user
+ -I $(prefix)/include/ install --user
#
# Test client
#
noinst_PROGRAMS += test_pneum
test_pneum_SOURCES = pneum/pneum.c pneum/test_pneum.c
-test_pneum_LDADD = -lvlibmemoryclient -lvlibapi -lsvm -lvppinfra -lpthread \
- -lm -lrt
+test_pneum_LDADD = \
+ $(top_builddir)/libvppinfra.la \
+ $(top_builddir)/libvlibmemoryclient.la \
+ $(top_builddir)/libvlibapi.la \
+ $(top_builddir)/libsvm.la \
+ -lpthread -lm -lrt
#include <vlibapi/api.h>
#include <vlibmemory/api.h>
-#include <vpp-api/vpe_msg_enum.h>
+#include <vpp/api/vpe_msg_enum.h>
#include "pneum.h"
#define vl_typedefs /* define message structures */
-#include <vpp-api/vpe_all_api_h.h>
+#include <vpp/api/vpe_all_api_h.h>
#undef vl_typedefs
#define vl_endianfun /* define message structures */
-#include <vpp-api/vpe_all_api_h.h>
+#include <vpp/api/vpe_all_api_h.h>
#undef vl_endianfun
vlib_main_t vlib_global_main;
#include <vlibmemory/api.h>
#include <vnet/ip/ip.h>
-#include <vpp-api/vpe_msg_enum.h>
+#include <vpp/api/vpe_msg_enum.h>
#include <signal.h>
#include <setjmp.h>
#include "pneum.h"
#define vl_typedefs /* define message structures */
-#include <vpp-api/vpe_all_api_h.h>
+#include <vpp/api/vpe_all_api_h.h>
#undef vl_typedefs
/* we are not linking with vlib */
--- /dev/null
+# Copyright (c) 2015 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.
+
+bin_PROGRAMS += bin/vpp
+
+bin_vpp_SOURCES = \
+ vpp/vnet/main.c \
+ vpp/app/vpe_cli.c \
+ vpp/app/version.c \
+ vpp/oam/oam.c \
+ vpp/stats/stats.c
+
+bin_vpp_SOURCES += \
+ vpp/api/api.c \
+ vpp/api/custom_dump.c \
+ vpp/api/json_format.c
+
+if WITH_APICLI
+ bin_vpp_SOURCES += \
+ vpp/api/api_format.c \
+ vpp/api/api_main.c
+endif
+
+# comment out to disable stats upload to gmond
+
+bin_vpp_CFLAGS = @APICLI@
+bin_vpp_SOURCES += \
+ vpp/api/gmon.c
+
+nobase_include_HEADERS += \
+ vpp/api/vpe_all_api_h.h \
+ vpp/api/vpe_msg_enum.h \
+ vpp/api/vpe.api.h
+
+API_FILES += vpp/api/vpe.api
+
+BUILT_SOURCES += vpp/app/version.h
+
+vpp/app/version.o: vpp/app/version.h
+
+.PHONY: vpp/app/version.h
+
+vpp/app/version.h:
+ @echo " VERSION " $@
+ @echo "#define VPP_BUILD_DATE \"$$(date)\"" > $@
+ @echo "#define VPP_BUILD_USER \"$$(whoami)\"" >> $@
+ @echo "#define VPP_BUILD_HOST \"$$(hostname)\"" >> $@
+ @echo "#define VPP_BUILD_TOPDIR \"$$(git rev-parse --show-toplevel)\"" >> $@
+ @echo "#define VPP_BUILD_VER \"$$(../../scripts/version)\"" >> $@
+
+# Generate a plugin configuration script. Misconfiguring a
+# plugin can cause very subtle problems.
+
+bin_SCRIPTS = vpp_plugin_configure
+
+BUILT_SOURCES += vpp_plugin_configure
+
+.PHONY: vpp_plugin_configure
+
+if WITH_DPDK
+PLUGIN_DPDK_ARG="--with-dpdk"
+else
+PLUGIN_DPDK_ARG=""
+endif
+
+vpp_plugin_configure:
+ @echo "PLUGIN CONFIGURE " $@
+ @echo "#!/bin/bash" > $@
+ @echo " " >> $@
+ @echo "set +eu" >> $@
+ @echo " " >> $@
+ @echo "if [ -f ./configure ] ; then" >> $@
+ @echo " CFLAGS='$(CFLAGS) $(AM_CFLAGS) -I/usr/include/vpp-dpdk' ./configure --with-plugin-toolkit $(PLUGIN_DPDK_ARG)" >> $@
+ @echo "else" >> $@
+ @echo " if [ -f ../configure ] ; then" >> $@
+ @echo " CFLAGS='$(CFLAGS) $(AM_CFLAGS) -I/usr/include/vpp-dpdk' ../configure --with-plugin-toolkit $(PLUGIN_DPDK_ARG)" >> $@
+ @echo " else" >> $@
+ @echo " echo Couldnt find ./configure or ../configure " >> $@
+ @echo " exit 1" >> $@
+ @echo " fi" >> $@
+ @echo "fi" >> $@
+
+bin_vpp_LDADD = \
+ libvlibapi.la \
+ libvlibmemory.la \
+ libvlib_unix.la \
+ libvlib.la \
+ libvnet.la \
+ libsvm.la \
+ libsvmdb.la \
+ libvnetplugin.la \
+ -lrt
+
+bin_vpp_LDFLAGS = $(DPDK_LD_FLAGS)
+bin_vpp_LDADD += libvppinfra.la -lm -lpthread -ldl $(DPDK_LD_ADD)
+
+if WITH_IPV6SR
+ bin_vpp_LDADD += -lcrypto
+endif
+
+noinst_PROGRAMS += bin/test_client
+
+bin_test_client_SOURCES = \
+ vpp/api/test_client.c
+
+bin_test_client_LDADD = \
+ libvlibmemoryclient.la \
+ libvlibapi.la \
+ libsvm.la \
+ libvppinfra.la \
+ -lpthread -lm -lrt
+
+noinst_PROGRAMS += bin/test_client bin/test_ha
+
+bin_test_ha_SOURCES = \
+ vpp/api/test_ha.c
+
+bin_test_ha_LDADD = \
+ libvlibmemoryclient.la \
+ libvlibapi.la \
+ libsvmdb.la \
+ libsvm.la \
+ libvppinfra.la \
+ -lpthread -lm -lrt
+
+noinst_PROGRAMS += bin/summary_stats_client
+
+bin_summary_stats_client_SOURCES = \
+ vpp/api/summary_stats_client.c
+
+bin_summary_stats_client_LDADD = \
+ libvlibmemoryclient.la \
+ libvlibapi.la \
+ libsvm.la \
+ libvppinfra.la \
+ -lpthread -lm -lrt
+
+bin_PROGRAMS += bin/vpp_get_metrics
+
+bin_vpp_get_metrics_SOURCES = \
+ vpp/api/vpp_get_metrics.c
+
+bin_vpp_get_metrics_LDADD = \
+ libsvmdb.la \
+ libsvm.la \
+ libvppinfra.la \
+ -lpthread -lm -lrt
+
+# vi:syntax=automake
#include <vnet/devices/dpdk/dpdk.h>
#endif
-#include <stats/stats.h>
-#include <oam/oam.h>
+#include <vpp/stats/stats.h>
+#include <vpp/oam/oam.h>
+
#include <vnet/ethernet/ethernet.h>
#include <vnet/ethernet/arp_packet.h>
#include <vnet/interface.h>
#include <vnet/l2/l2_fib.h>
#include <vnet/l2/l2_bd.h>
-#include <vpp-api/vpe_msg_enum.h>
+#include <vpp/api/vpe_msg_enum.h>
#include <vnet/span/span.h>
#include <vnet/fib/ip6_fib.h>
#include <vnet/fib/ip4_fib.h>
#include <vnet/dpo/classify_dpo.h>
#include <vnet/dpo/ip_null_dpo.h>
#define vl_typedefs /* define message structures */
-#include <vpp-api/vpe_all_api_h.h>
+#include <vpp/api/vpe_all_api_h.h>
#undef vl_typedefs
#define vl_endianfun /* define message structures */
-#include <vpp-api/vpe_all_api_h.h>
+#include <vpp/api/vpe_all_api_h.h>
#undef vl_endianfun
/* instantiate all the print functions we know about */
#define vl_print(handle, ...) vlib_cli_output (handle, __VA_ARGS__)
#define vl_printfun
-#include <vpp-api/vpe_all_api_h.h>
+#include <vpp/api/vpe_all_api_h.h>
#undef vl_printfun
#include <vlibapi/api_helper_macros.h>
#define foreach_vpe_api_msg \
/* *INDENT-ON* */
#define vl_msg_name_crc_list
-#include <vpp-api/vpe_all_api_h.h>
+#include <vpp/api/vpe_all_api_h.h>
#undef vl_msg_name_crc_list
static void
--- /dev/null
+../../vat/api_format.c
\ No newline at end of file
#include <vlibmemory/api.h>
#include <vnet/lisp-cp/lisp_types.h>
-#include <stats/stats.h>
-#include <oam/oam.h>
+#include <vpp/stats/stats.h>
+#include <vpp/oam/oam.h>
#include <vnet/ethernet/ethernet.h>
#include <vnet/l2/l2_vtr.h>
-#include <vpp-api/vpe_msg_enum.h>
+#include <vpp/api/vpe_msg_enum.h>
#define vl_typedefs /* define message structures */
-#include <vpp-api/vpe_all_api_h.h>
+#include <vpp/api/vpe_all_api_h.h>
#undef vl_typedefs
#define vl_endianfun /* define message structures */
-#include <vpp-api/vpe_all_api_h.h>
+#include <vpp/api/vpe_all_api_h.h>
#undef vl_endianfun
#define vl_print(handle, ...) vlib_cli_output (handle, __VA_ARGS__)
#include <vlib/unix/unix.h>
#include <vnet/api_errno.h>
-#include <svmdb.h>
+#include <svm/svmdb.h>
typedef struct
{
#include <vlibapi/api.h>
#include <vlibmemory/api.h>
-#include <vpp-api/vpe_msg_enum.h>
+#include <vpp/api/vpe_msg_enum.h>
#include <vnet/ip/ip.h>
#define f64_print(a,b)
#define vl_typedefs /* define message structures */
-#include <vpp-api/vpe_all_api_h.h>
+#include <vpp/api/vpe_all_api_h.h>
#undef vl_typedefs
#define vl_endianfun /* define message structures */
-#include <vpp-api/vpe_all_api_h.h>
+#include <vpp/api/vpe_all_api_h.h>
#undef vl_endianfun
/* instantiate all the print functions we know about */
#define vl_print(handle, ...)
#define vl_printfun
-#include <vpp-api/vpe_all_api_h.h>
+#include <vpp/api/vpe_all_api_h.h>
#undef vl_printfun
vl_shmem_hdr_t *shmem_hdr;
#include <vlibapi/api.h>
#include <vlibmemory/api.h>
-#include <vpp-api/vpe_msg_enum.h>
+#include <vpp/api/vpe_msg_enum.h>
#include <vnet/ip/ip.h>
#include <vnet/interface.h>
#define f64_print(a,b)
#define vl_typedefs /* define message structures */
-#include <vpp-api/vpe_all_api_h.h>
+#include <vpp/api/vpe_all_api_h.h>
#undef vl_typedefs
#define vl_endianfun /* define message structures */
-#include <vpp-api/vpe_all_api_h.h>
+#include <vpp/api/vpe_all_api_h.h>
#undef vl_endianfun
/* instantiate all the print functions we know about */
#define vl_print(handle, ...)
#define vl_printfun
-#include <vpp-api/vpe_all_api_h.h>
+#include <vpp/api/vpe_all_api_h.h>
#undef vl_printfun
vl_shmem_hdr_t *shmem_hdr;
#undef vl_api_version
#define vl_api_version(n,v) static u32 vpe_api_version = v;
-#include <vpp-api/vpe.api.h>
+#include <vpp/api/vpe.api.h>
#undef vl_api_version
void
#include <vlib/unix/unix.h>
#include <vlibapi/api.h>
#include <vlibmemory/api.h>
-#include <svm.h>
-#include <svmdb.h>
+#include <svm/svm.h>
+#include <svm/svmdb.h>
-#include <vpp-api/vpe_msg_enum.h>
+#include <vpp/api/vpe_msg_enum.h>
#include <vnet/ip/ip.h>
#define f64_print(a,b)
#define vl_typedefs /* define message structures */
-#include <vpp-api/vpe_all_api_h.h>
+#include <vpp/api/vpe_all_api_h.h>
#undef vl_typedefs
#define vl_endianfun /* define message structures */
-#include <vpp-api/vpe_all_api_h.h>
+#include <vpp/api/vpe_all_api_h.h>
#undef vl_endianfun
/* instantiate all the print functions we know about */
#define vl_print(handle, ...)
#define vl_printfun
-#include <vpp-api/vpe_all_api_h.h>
+#include <vpp/api/vpe_all_api_h.h>
#undef vl_printfun
vl_shmem_hdr_t *shmem_hdr;
--- /dev/null
+../../vat/vat.h
\ No newline at end of file
#undef included_from_layer_3
/* Include the current layer (third) vpp API definition layer */
-#include <vpp-api/vpe.api.h>
+#include <vpp/api/vpe.api.h>
/*
* fd.io coding-style-patch-verification: ON
typedef enum
{
VL_ILLEGAL_MESSAGE_ID = 0,
-#include <vpp-api/vpe_all_api_h.h>
+#include <vpp/api/vpe_all_api_h.h>
VL_MSG_FIRST_AVAILABLE,
} vl_msg_id_t;
#undef vl_msg_id
#include <vlib/unix/unix.h>
#include <vnet/api_errno.h>
-#include <svmdb.h>
+#include <svm/svmdb.h>
svmdb_client_t *c;
volatile int signal_received;
*/
#include <vlib/vlib.h>
#include <vppinfra/cpu.h>
-#include <app/version.h>
+#include <vpp/app/version.h>
#if DPDK > 0
#include <rte_version.h>
* See the License for the specific language governing permissions and
* limitations under the License.
*/
-#include <oam/oam.h>
+#include <vpp/oam/oam.h>
#if DPDK > 0
#include <vnet/devices/dpdk/dpdk.h>
* See the License for the specific language governing permissions and
* limitations under the License.
*/
-#include <stats/stats.h>
+#include <vpp/stats/stats.h>
#include <signal.h>
#include <vlib/threads.h>
#include <vnet/fib/fib_entry.h>
#include <vnet/ip/ip.h>
-#include <vpp-api/vpe_msg_enum.h>
+#include <vpp/api/vpe_msg_enum.h>
#define f64_endian(a)
#define f64_print(a,b)
#define vl_typedefs /* define message structures */
-#include <vpp-api/vpe_all_api_h.h>
+#include <vpp/api/vpe_all_api_h.h>
#undef vl_typedefs
#define vl_endianfun /* define message structures */
-#include <vpp-api/vpe_all_api_h.h>
+#include <vpp/api/vpe_all_api_h.h>
#undef vl_endianfun
/* instantiate all the print functions we know about */
#define vl_print(handle, ...) vlib_cli_output (handle, __VA_ARGS__)
#define vl_printfun
-#include <vpp-api/vpe_all_api_h.h>
+#include <vpp/api/vpe_all_api_h.h>
#undef vl_printfun
#define foreach_stats_msg \
#include <vnet/plugin/plugin.h>
#include <vnet/ethernet/ethernet.h>
-#include <vpp-api/vpe_msg_enum.h>
+#include <vpp/api/vpe_msg_enum.h>
#if DPDK
#include <vnet/devices/dpdk/dpdk.h>
void vlib_set_get_handoff_structure_cb (void *cb);
#if __x86_64__
- const char *msg = "ERROR: This binary requires CPU with %s extensions.\n";
+ CLIB_UNUSED (const char *msg)
+ = "ERROR: This binary requires CPU with %s extensions.\n";
#define _(a,b) \
if (!clib_cpu_supports_ ## a ()) \
{ \
# See the License for the specific language governing permissions and
# limitations under the License.
-AUTOMAKE_OPTIONS = foreign
+bin_PROGRAMS += vppapigen
-bin_PROGRAMS = vppapigen
-bin_SCRIPTS =
+BUILT_SOURCES += tools/vppapigen/gram.h
-BUILT_SOURCES = gram.h
-
-gram.h: gram.y
- $(YACC) -d @srcdir@/gram.y
- mv y.tab.h gram.h
+tools/vppapigen/gram.h: tools/vppapigen/gram.y
+ $(YACC) -d @srcdir@/tools/vppapigen/gram.y
+ mv y.tab.h tools/vppapigen/gram.h
rm y.tab.c
-vppapigen_SOURCES = gram.y lex.c node.c
-vppapigen_CPPFLAGS =
-vppapigen_LDADD = -lvppinfra
+vppapigen_SOURCES = tools/vppapigen/gram.y tools/vppapigen/lex.c tools/vppapigen/node.c
+vppapigen_LDADD = libvppinfra.la
vppapigen_LDFLAGS = -static
+
+# vi:syntax=automake
# 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_CPPFLAGS = -Wall -Werror
+libvppinfradir = ${libdir}
if WITH_UNIX
- lib_LTLIBRARIES = libvppinfra.la
+ libvppinfra_LTLIBRARIES = libvppinfra.la
endif
lib_LIBRARIES =
bin_PROGRAMS = elftool
-elftool_SOURCES = tools/elftool.c
+elftool_SOURCES = tools/elftool/elftool.c
elftool_CPPFLAGS = $(AM_CPPFLAGS)
elftool_LDADD = libvppinfra.la -lpthread -lrt -lm
+
+# vi:syntax=automake
uword elt_size,
u32 * section_index_result)
{
- elf_section_t *s;
+ elf_section_t *s = 0;
clib_error_t *error;
error = elf_get_section_by_start_address (em, start_address, &s);
case ELF_DYNAMIC_ENTRY_SYMBOL_TABLE:
{
- elf_section_t *s;
+ elf_section_t *s = 0;
clib_error_t *error;
error = elf_get_section_by_start_address (em, e->data, &s);
clib_error_t *
elf_delete_named_section (elf_main_t * em, char *section_name)
{
- elf_section_t *s;
+ elf_section_t *s = 0;
clib_error_t *error;
error = elf_get_section_by_name (em, section_name, &s);
+++ /dev/null
-AC_INIT(svm, 1.0)
-LT_INIT
-AM_INIT_AUTOMAKE
-
-AM_SILENT_RULES([yes])
-
-AC_OUTPUT([Makefile])
+++ /dev/null
-AC_INIT(vlibapi, 1.0)
-LT_INIT
-AM_INIT_AUTOMAKE
-
-AM_SILENT_RULES([yes])
-
-AC_PROG_CC
-
-AC_OUTPUT([Makefile])
+++ /dev/null
-../build-data/suffix-rules.mk
\ No newline at end of file
+++ /dev/null
-AC_INIT(vlib, 1.1)
-LT_INIT
-AM_INIT_AUTOMAKE
-AM_SILENT_RULES([yes])
-
-AC_PROG_CC
-
-AC_ARG_WITH(dpdk,
- AC_HELP_STRING([--with-dpdk],[Use DPDK]),
- [with_dpdk=1],
- [with_dpdk=0])
-
-AC_ARG_WITH(pre-data,
- AC_HELP_STRING([--with-pre-data],[Set buffer rewrite space]),
- [case $with_pre_data in
- 128) ;;
- 256) ;;
- *) with_pre_data="pre-data-not-set" ;;
- esac], [with_pre_data=128])
-
-AM_CONDITIONAL(WITH_DPDK, test "$with_dpdk" = "1")
-AC_SUBST(DPDK,[-DDPDK=${with_dpdk}])
-AC_SUBST(PRE_DATA_SIZE,[$with_pre_data])
-
-AC_OUTPUT([Makefile])
+++ /dev/null
-/*
- * Copyright (c) 2016 Cisco and/or its affiliates.
- * Copyright (c) 2016 Comcast Cable Communications Management, LLC.
- *
- * 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.
- */
-/* Doxygen directory documentation */
-/**
-@dir
-@brief VLIB application library.
-*/
+++ /dev/null
-AC_INIT(vnet, 1.1)
-AC_CONFIG_AUX_DIR(config)
-AC_CONFIG_HEADERS(config/config.h)
-LT_INIT
-AM_INIT_AUTOMAKE
-AM_SILENT_RULES([yes])
-
-AC_PROG_CC
-
-AC_ARG_WITH(dpdk,
- AC_HELP_STRING([--with-dpdk],[Use DPDK]),
- [with_dpdk=1],
- [with_dpdk=0])
-
-AC_ARG_WITH(dpdk_crypto,
- AC_HELP_STRING([--with-dpdk-crypto],[Use DPDK cryptodev]),
- [with_dpdk_crypto=1],
- [with_dpdk_crypto=0])
-
-AC_ARG_WITH(ipsec,
- AC_HELP_STRING([--without-ipsec],[Disable ipsec]),
- [with_ipsec=0],
- [with_ipsec=1])
-
-AC_ARG_WITH(ipv6sr,
- AC_HELP_STRING([--without-ipv6sr],[Disable ipv6sr]),
- [with_ipv6sr=0],
- [with_ipv6sr=1])
-
-AC_ARG_ENABLE(tests,
- AC_HELP_STRING([--enable-tests], [Build unit tests]),
- [enable_tests=1],
- [enable_tests=0])
-
-AM_CONDITIONAL(WITH_DPDK_CRYPTO, test "$with_dpdk_crypto" = "1")
-AC_SUBST(DPDK_CRYPTO,[-DDPDK_CRYPTO=${with_dpdk_crypto}])
-
-AM_CONDITIONAL(WITH_DPDK, test "$with_dpdk" = "1")
-AC_SUBST(DPDK,[-DDPDK=${with_dpdk}])
-
-AM_CONDITIONAL(WITH_IPSEC, test "$with_ipsec" = "1")
-AC_SUBST(IPSEC,[-DIPSEC=${with_ipsec}])
-
-AM_CONDITIONAL(WITH_IPV6SR, test "$with_ipv6sr" = "1")
-AC_SUBST(IPV6SR,[-DIPV6SR=${with_ipv6sr}])
-
-AM_CONDITIONAL(ENABLE_TESTS, test "$enable_tests" = "1")
-
-AC_OUTPUT([Makefile])
+++ /dev/null
-../build-data/suffix-rules.mk
\ No newline at end of file
+++ /dev/null
-# Copyright (c) 2015 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 @Q_PLATFORM_DEFINE@ @Q_PLATFORM_PLUGPATH@ @DPDK@ @DPDK_CRYPTO@
-
-libvatplugin_la_SOURCES = \
- vat/plugin_api.c
-
-lib_LTLIBRARIES = libvatplugin.la
-
-bin_PROGRAMS = vpp_api_test vpp_json_test vpp_restart
-
-vpp_api_test_SOURCES = vat/api_format.c vat/main.c vat/plugin.c vat/vat.h vat/json_format.h vat/json_format.c
-vpp_json_test_SOURCES = vat/json_format.h vat/json_format.c vat/json_test.c
-
-vpp_api_test_LDADD = -lvlibmemoryclient -lvlibapi -lsvm \
- -lvppinfra -lpthread -lm \
- -lrt -ldl libvatplugin.la
-vpp_json_test_LDADD = -lvppinfra -lm
-nobase_include_HEADERS = vat/vat.h vat/json_format.h
-
-vpp_restart_SOURCES = vat/restart.c
-vpp_restart_LDADD = -lsvmdb -lsvm -lvppinfra -lpthread -lrt
-
-dist_bin_SCRIPTS = scripts/vppctl
+++ /dev/null
-AC_INIT(vpp-api-test, 1.0)
-LT_INIT
-AM_INIT_AUTOMAKE
-AM_SILENT_RULES([yes])
-
-AC_PROG_CC
-
-AC_ARG_WITH(q-plugin-prefix,
- AC_HELP_STRING([--with-q-plugin-prefix],[vlib plugin prefix]),
- [case $with_q_plugin_prefix in
- *) ;;
- esac])
-
-AC_ARG_WITH(q-platform,
- AC_HELP_STRING([--with-q-platform],[Build version for given platform (qnative)]),
- [case $with_q_platform in
- qnative) ;;
- vpp) with_q_platform=vpp;;
- *) with_q_platform=qnative;;
- esac])
-
-AC_ARG_WITH(dpdk,
- AC_HELP_STRING([--with-dpdk],[Use DPDK]),
- [with_dpdk=1],
- [with_dpdk=0])
-
-AC_ARG_WITH(dpdk_crypto,
- AC_HELP_STRING([--with-dpdk-crypto],[Use DPDK cryptodev]),
- [with_dpdk_crypto=1],
- [with_dpdk_crypto=0])
-
-AC_SUBST(Q_PLATFORM_DEFINE,[-DQ_PLATFORM_${with_q_platform}])
-AC_SUBST(Q_PLATFORM_PLUGPATH,[-DQ_PLUGIN_PREFIX=${with_q_plugin_prefix}])
-AC_SUBST(DPDK,[-DDPDK=${with_dpdk}])
-AM_CONDITIONAL(WITH_DPDK, test "$with_dpdk" = "1")
-AC_SUBST(DPDK_CRYPTO,[-DDPDK_CRYPTO=${with_dpdk_crypto}])
-AM_CONDITIONAL(WITH_DPDK_CRYPTO, test "$with_dpdk_crypto" = "1")
-
-
-AC_OUTPUT([Makefile])
AUTOMAKE_OPTIONS = foreign
-SUBDIRS = python java
+SUBDIRS = java
+
+# vi:syntax=automake
AC_PROG_CC
-AC_OUTPUT([python/Makefile])
AC_CONFIG_FILES([Makefile])
AC_OUTPUT
BUILT_SOURCES += jvpp-core/io_fd_vpp_jvpp_core_JVppCoreImpl.h
JSON_FILES = \
- $(prefix)/../vpp/vpp-api/vpe.api.json \
- $(wildcard $(prefix)/../vnet/vnet/*.api.json)
+ $(wildcard $(prefix)/../vpp/share/vpp/api/core/*.api.json)
jvpp-core/io_fd_vpp_jvpp_core_JVppCoreImpl.h: \
jvpp-registry/io_fd_vpp_jvpp_VppJNIConnection.h \
#include <vnet/vnet.h>
-#include <vpp-api/vpe_msg_enum.h>
+#include <vpp/api/vpe_msg_enum.h>
#define vl_typedefs /* define message structures */
-#include <vpp-api/vpe_all_api_h.h>
+#include <vpp/api/vpe_all_api_h.h>
#undef vl_typedefs
#define vl_endianfun
-#include <vpp-api/vpe_all_api_h.h>
+#include <vpp/api/vpe_all_api_h.h>
#undef vl_endianfun
#define vl_print(handle, ...)
#define vl_printfun
-#include <vpp-api/vpe_all_api_h.h>
+#include <vpp/api/vpe_all_api_h.h>
#undef vl_printfun
#include <vnet/api_errno.h>
#include <vnet/vnet.h>
#define vl_api_version(n,v) static u32 vpe_api_version = (v);
-#include <vpp-api/vpe.api.h>
+#include <vpp/api/vpe.api.h>
#undef vl_api_version
#include "io_fd_vpp_jvpp_VppJNIConnection.h"
#include "io_fd_vpp_jvpp_JVppRegistryImpl.h"
-#include <vpp-api/vpe_msg_enum.h>
+#include <vpp/api/vpe_msg_enum.h>
#define vl_typedefs /* define message structures */
-#include <vpp-api/vpe_all_api_h.h>
+#include <vpp/api/vpe_all_api_h.h>
#undef vl_typedefs
#define vl_endianfun
-#include <vpp-api/vpe_all_api_h.h>
+#include <vpp/api/vpe_all_api_h.h>
#undef vl_endianfun
/* instantiate all the print functions we know about */
#define vl_print(handle, ...)
#define vl_printfun
-#include <vpp-api/vpe_all_api_h.h>
+#include <vpp/api/vpe_all_api_h.h>
#undef vl_printfun
vlib_main_t vlib_global_main;
from jvppgen import jvpp_c_gen
from jvppgen import util
+blacklist = [ "memclnt.api", "flowperpkt.api" ]
+
# Invocation:
# ~/Projects/vpp/vpp-api/jvpp/gen$ mkdir -p java/io/fd/vpp/jvpp && cd java/io/fd/vpp/jvpp
# ~/Projects/vpp/vpp-api/jvpp/gen/java/io/fd/vpp/jvpp$ ../../../../jvpp_gen.py -idefs_api_vpp_papi.py
cfg = {}
for inputfile in args.inputfiles:
+ if any(substring in inputfile for substring in blacklist):
+ print "WARNING: Imput file %s blacklisted" % inputfile
+ continue
_cfg = json.load(open(inputfile, 'r'))
if 'types' in cfg:
cfg['types'].extend(_cfg['types'])
+++ /dev/null
-# Copyright (c) 2015 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 @DPDK@ @DPDK_CRYPTO@ @IPSEC@ @VCGN@ @IPV6SR@ @APICLI@
-
-noinst_PROGRAMS =
-BUILT_SOURCES =
-bin_PROGRAMS =
-CLEANFILES =
-
-bin_PROGRAMS += vpp
-
-vpp_SOURCES = \
- vnet/main.c \
- app/vpe_cli.c \
- app/version.c \
- oam/oam.c \
- stats/stats.c
-
-vpp_SOURCES += \
- vpp-api/api.c \
- vpp-api/custom_dump.c \
- vpp-api/json_format.c
-
-if WITH_APICLI
- vpp_SOURCES += \
- vpp-api/api_format.c \
- vpp-api/api_main.c
-endif
-
-
-# comment out to disable stats upload to gmond
-
-vpp_SOURCES += \
- vpp-api/gmon.c
-
-nobase_include_HEADERS = \
- vpp-api/vpe_all_api_h.h \
- vpp-api/vpe_msg_enum.h \
- vpp-api/vpe.api.h
-
-# install the API definition, so we can produce java bindings, etc.
-
-apidir = $(prefix)/vpp-api
-api_DATA = vpp-api/vpe.api.json
-
-BUILT_SOURCES += vpp-api/vpe.api.h app/version.h vpp-api/vpe.api.json
-
-app/version.o: app/version.h
-
-.PHONY: app/version.h
-
-app/version.h:
- @echo " VERSION " $@
- @echo "#define VPP_BUILD_DATE \"$$(date)\"" > $@
- @echo "#define VPP_BUILD_USER \"$$(whoami)\"" >> $@
- @echo "#define VPP_BUILD_HOST \"$$(hostname)\"" >> $@
- @echo "#define VPP_BUILD_TOPDIR \"$$(git rev-parse --show-toplevel)\"" >> $@
- @echo "#define VPP_BUILD_VER \"$$(../../scripts/version)\"" >> $@
-
-# Generate a plugin configuration script. Misconfiguring a
-# plugin can cause very subtle problems.
-
-bin_SCRIPTS = vpp_plugin_configure
-
-BUILT_SOURCES += vpp_plugin_configure
-
-.PHONY: vpp_plugin_configure
-
-if WITH_DPDK
-PLUGIN_DPDK_ARG="--with-dpdk"
-else
-PLUGIN_DPDK_ARG=""
-endif
-
-vpp_plugin_configure:
- @echo "PLUGIN CONFIGURE " $@
- @echo "#!/bin/bash" > $@
- @echo " " >> $@
- @echo "set +eu" >> $@
- @echo " " >> $@
- @echo "if [ -f ./configure ] ; then" >> $@
- @echo " CFLAGS='$(CFLAGS) $(AM_CFLAGS) -I/usr/include/vpp-dpdk' ./configure --with-plugin-toolkit $(PLUGIN_DPDK_ARG)" >> $@
- @echo "else" >> $@
- @echo " if [ -f ../configure ] ; then" >> $@
- @echo " CFLAGS='$(CFLAGS) $(AM_CFLAGS) -I/usr/include/vpp-dpdk' ../configure --with-plugin-toolkit $(PLUGIN_DPDK_ARG)" >> $@
- @echo " else" >> $@
- @echo " echo Couldnt find ./configure or ../configure " >> $@
- @echo " exit 1" >> $@
- @echo " fi" >> $@
- @echo "fi" >> $@
-
-vpp_LDADD = -lvlibapi -lvlibmemory -lvlib_unix -lvlib
-
-vpp_LDADD += -lvnet
-
-vpp_LDADD += -lsvm -lsvmdb -lrt
-
-vpp_LDADD += -lvnetplugin
-
-if WITH_DPDK
-vpp_LDFLAGS = -Wl,--whole-archive
-if ENABLE_DPDK_SHARED
-vpp_LDFLAGS += -ldpdk
-else
-vpp_LDFLAGS += -l:libdpdk.a
-endif
-vpp_LDFLAGS += -Wl,--no-whole-archive
-if WITH_DPDK_CRYPTO
-vpp_LDADD += -L$(AESNI_MULTI_BUFFER_LIB_PATH) -lIPSec_MB
-endif
-if WITH_DPDK_MLX5_PMD
-vpp_LDFLAGS += -libverbs -lmlx5 -lnuma
-endif
-endif
-
-vpp_LDADD += -lvppinfra -lm -lpthread -ldl
-
-if WITH_IPV6SR
- vpp_LDADD += -lcrypto
-endif
-
-# Set the suffix list
-SUFFIXES = .api.h .api .api.json
-
-# The actual %.api.h rule is in .../build-data/packages/suffix-rules.mk
-# and requires a symbolic link at the top of the vpp source tree
-
-include $(top_srcdir)/suffix-rules.mk
-
-noinst_PROGRAMS += test_client
-
-test_client_SOURCES = vpp-api/test_client.c
-test_client_LDADD = -lvlibmemoryclient -lvlibapi -lsvm -lvppinfra \
- -lpthread -lm -lrt
-
-noinst_PROGRAMS += test_client test_ha
-
-test_ha_SOURCES = vpp-api/test_ha.c
-test_ha_LDADD = -lvlibmemoryclient -lvlibapi -lsvmdb -lsvm -lvppinfra \
- -lpthread -lm -lrt
-
-
-noinst_PROGRAMS += summary_stats_client
-
-summary_stats_client_SOURCES = vpp-api/summary_stats_client.c
-summary_stats_client_LDADD = -lvlibmemoryclient -lvlibapi -lsvm -lvppinfra \
- -lpthread -lm -lrt
-
-bin_PROGRAMS += vpp_get_metrics
-
-vpp_get_metrics_SOURCES = vpp-api/vpp_get_metrics.c
-vpp_get_metrics_LDADD = -lsvmdb -lsvm -lvppinfra \
- -lpthread -lm -lrt
+++ /dev/null
-AC_INIT(vpp, 1.1)
-AM_INIT_AUTOMAKE
-AM_SILENT_RULES([yes])
-
-AC_PROG_CC
-
-AC_ARG_WITH(dpdk,
- AC_HELP_STRING([--with-dpdk],[Use DPDK]),
- [with_dpdk=1],
- [with_dpdk=0])
-
-AC_ARG_WITH(dpdk_crypto,
- AC_HELP_STRING([--with-dpdk-crypto],[Use DPDK cryptodev]),
- [with_dpdk_crypto=1],
- [with_dpdk_crypto=0])
-
-AC_ARG_WITH(dpdk_mlx5_pmd,
- AC_HELP_STRING([--with-dpdk-mlx5-pmd],[Use Mellanox ConnetxX-4 DPDK PMD]),
- [with_dpdk_mlx5_pmd=1],
- [with_dpdk_mlx5_pmd=0])
-
-AC_ARG_ENABLE(dpdk-shared,
- AC_HELP_STRING([--enable-dpdk-shared],[Link with DPDK shared lib]),
- [enable_dpdk_shared=1],
- [enable_dpdk_shared=0])
-
-AC_ARG_WITH(ipsec,
- AC_HELP_STRING([--without-ipsec],[Disable ipsec]),
- [with_ipsec=0],
- [with_ipsec=1])
-
-AC_ARG_WITH(vcgn,
- AC_HELP_STRING([--without-vcgn],[Disable vcgn]),
- [with_vcgn=0],
- [with_vcgn=1])
-
-AC_ARG_WITH(ipv6sr,
- AC_HELP_STRING([--without-ipv6sr],[Disable ipv6sr]),
- [with_ipv6sr=0],
- [with_ipv6sr=1])
-
-AC_ARG_WITH(apicli,
- AC_HELP_STRING([--without-apicli],[Disable binary api CLI]),
- [with_apicli=0],
- [with_apicli=1])
-
-AM_CONDITIONAL(WITH_DPDK, test "$with_dpdk" = "1")
-AM_CONDITIONAL(ENABLE_DPDK_SHARED, test "$enable_dpdk_shared" = "1")
-AC_SUBST(DPDK,["-DDPDK=${with_dpdk} -DDPDK_SHARED_LIB=${enable_dpdk_shared}"])
-AM_CONDITIONAL(WITH_DPDK_CRYPTO, test "$with_dpdk_crypto" = "1")
-AC_SUBST(DPDK_CRYPTO,[-DDPDK_CRYPTO=${with_dpdk_crypto}])
-AM_CONDITIONAL(WITH_DPDK_MLX5_PMD, test "$with_dpdk_mlx5_pmd" = "1")
-
-AM_COND_IF(
- [ENABLE_DPDK_SHARED],
- [
- AC_CHECK_HEADERS(
- [rte_config.h],
- [], [AC_MSG_ERROR([DPDK header files not found])],
- )
- AC_CHECK_LIB(
- [dpdk], [rte_eal_init],
- [], [AC_MSG_ERROR([DPDK shared library not found])],
- )
- ],
-)
-
-AM_CONDITIONAL(WITH_IPSEC, test "$with_ipsec" = "1")
-AC_SUBST(IPSEC,[-DIPSEC=${with_ipsec}])
-
-AM_CONDITIONAL(WITH_VCGN, test "$with_vcgn" = "1")
-AC_SUBST(VCGN,[-DVCGN=${with_vcgn}])
-
-AM_CONDITIONAL(WITH_IPV6SR, test "$with_ipv6sr" = "1")
-AC_SUBST(IPV6SR,[-DIPV6SR=${with_ipv6sr}])
-
-AM_CONDITIONAL(WITH_APICLI, test "$with_apicli" = "1")
-AC_SUBST(APICLI,[-DVPP_API_TEST_BUILTIN=${with_apicli}])
-
-AC_OUTPUT([Makefile])
+++ /dev/null
-../build-data/suffix-rules.mk
\ No newline at end of file
+++ /dev/null
-../../vpp-api-test/vat/api_format.c
\ No newline at end of file
+++ /dev/null
-../../vpp-api-test/vat/vat.h
\ No newline at end of file
+++ /dev/null
-Installation Instructions
-*************************
-
-Copyright (C) 1994, 1995, 1996, 1999, 2000, 2001, 2002, 2004, 2005 Free
-Software Foundation, Inc.
-
-This file is free documentation; the Free Software Foundation gives
-unlimited permission to copy, distribute and modify it.
-
-Basic Installation
-==================
-
-These are generic installation instructions.
-
- The `configure' shell script attempts to guess correct values for
-various system-dependent variables used during compilation. It uses
-those values to create a `Makefile' in each directory of the package.
-It may also create one or more `.h' files containing system-dependent
-definitions. Finally, it creates a shell script `config.status' that
-you can run in the future to recreate the current configuration, and a
-file `config.log' containing compiler output (useful mainly for
-debugging `configure').
-
- It can also use an optional file (typically called `config.cache'
-and enabled with `--cache-file=config.cache' or simply `-C') that saves
-the results of its tests to speed up reconfiguring. (Caching is
-disabled by default to prevent problems with accidental use of stale
-cache files.)
-
- If you need to do unusual things to compile the package, please try
-to figure out how `configure' could check whether to do them, and mail
-diffs or instructions to the address given in the `README' so they can
-be considered for the next release. If you are using the cache, and at
-some point `config.cache' contains results you don't want to keep, you
-may remove or edit it.
-
- The file `configure.ac' (or `configure.in') is used to create
-`configure' by a program called `autoconf'. You only need
-`configure.ac' if you want to change it or regenerate `configure' using
-a newer version of `autoconf'.
-
-The simplest way to compile this package is:
-
- 1. `cd' to the directory containing the package's source code and type
- `./configure' to configure the package for your system. If you're
- using `csh' on an old version of System V, you might need to type
- `sh ./configure' instead to prevent `csh' from trying to execute
- `configure' itself.
-
- Running `configure' takes awhile. While running, it prints some
- messages telling which features it is checking for.
-
- 2. Type `make' to compile the package.
-
- 3. Optionally, type `make check' to run any self-tests that come with
- the package.
-
- 4. Type `make install' to install the programs and any data files and
- documentation.
-
- 5. You can remove the program binaries and object files from the
- source code directory by typing `make clean'. To also remove the
- files that `configure' created (so you can compile the package for
- a different kind of computer), type `make distclean'. There is
- also a `make maintainer-clean' target, but that is intended mainly
- for the package's developers. If you use it, you may have to get
- all sorts of other programs in order to regenerate files that came
- with the distribution.
-
-Compilers and Options
-=====================
-
-Some systems require unusual options for compilation or linking that the
-`configure' script does not know about. Run `./configure --help' for
-details on some of the pertinent environment variables.
-
- You can give `configure' initial values for configuration parameters
-by setting variables in the command line or in the environment. Here
-is an example:
-
- ./configure CC=c89 CFLAGS=-O2 LIBS=-lposix
-
- *Note Defining Variables::, for more details.
-
-Compiling For Multiple Architectures
-====================================
-
-You can compile the package for more than one kind of computer at the
-same time, by placing the object files for each architecture in their
-own directory. To do this, you must use a version of `make' that
-supports the `VPATH' variable, such as GNU `make'. `cd' to the
-directory where you want the object files and executables to go and run
-the `configure' script. `configure' automatically checks for the
-source code in the directory that `configure' is in and in `..'.
-
- If you have to use a `make' that does not support the `VPATH'
-variable, you have to compile the package for one architecture at a
-time in the source code directory. After you have installed the
-package for one architecture, use `make distclean' before reconfiguring
-for another architecture.
-
-Installation Names
-==================
-
-By default, `make install' installs the package's commands under
-`/usr/local/bin', include files under `/usr/local/include', etc. You
-can specify an installation prefix other than `/usr/local' by giving
-`configure' the option `--prefix=PREFIX'.
-
- You can specify separate installation prefixes for
-architecture-specific files and architecture-independent files. If you
-pass the option `--exec-prefix=PREFIX' to `configure', the package uses
-PREFIX as the prefix for installing programs and libraries.
-Documentation and other data files still use the regular prefix.
-
- In addition, if you use an unusual directory layout you can give
-options like `--bindir=DIR' to specify different values for particular
-kinds of files. Run `configure --help' for a list of the directories
-you can set and what kinds of files go in them.
-
- If the package supports it, you can cause programs to be installed
-with an extra prefix or suffix on their names by giving `configure' the
-option `--program-prefix=PREFIX' or `--program-suffix=SUFFIX'.
-
-Optional Features
-=================
-
-Some packages pay attention to `--enable-FEATURE' options to
-`configure', where FEATURE indicates an optional part of the package.
-They may also pay attention to `--with-PACKAGE' options, where PACKAGE
-is something like `gnu-as' or `x' (for the X Window System). The
-`README' should mention any `--enable-' and `--with-' options that the
-package recognizes.
-
- For packages that use the X Window System, `configure' can usually
-find the X include and library files automatically, but if it doesn't,
-you can use the `configure' options `--x-includes=DIR' and
-`--x-libraries=DIR' to specify their locations.
-
-Specifying the System Type
-==========================
-
-There may be some features `configure' cannot figure out automatically,
-but needs to determine by the type of machine the package will run on.
-Usually, assuming the package is built to be run on the _same_
-architectures, `configure' can figure that out, but if it prints a
-message saying it cannot guess the machine type, give it the
-`--build=TYPE' option. TYPE can either be a short name for the system
-type, such as `sun4', or a canonical name which has the form:
-
- CPU-COMPANY-SYSTEM
-
-where SYSTEM can have one of these forms:
-
- OS KERNEL-OS
-
- See the file `config.sub' for the possible values of each field. If
-`config.sub' isn't included in this package, then this package doesn't
-need to know the machine type.
-
- If you are _building_ compiler tools for cross-compiling, you should
-use the option `--target=TYPE' to select the type of system they will
-produce code for.
-
- If you want to _use_ a cross compiler, that generates code for a
-platform different from the build platform, you should specify the
-"host" platform (i.e., that on which the generated programs will
-eventually be run) with `--host=TYPE'.
-
-Sharing Defaults
-================
-
-If you want to set default values for `configure' scripts to share, you
-can create a site shell script called `config.site' that gives default
-values for variables like `CC', `cache_file', and `prefix'.
-`configure' looks for `PREFIX/share/config.site' if it exists, then
-`PREFIX/etc/config.site' if it exists. Or, you can set the
-`CONFIG_SITE' environment variable to the location of the site script.
-A warning: not all `configure' scripts look for a site script.
-
-Defining Variables
-==================
-
-Variables not defined in a site shell script can be set in the
-environment passed to `configure'. However, some packages may run
-configure again during the build, and the customized values of these
-variables may be lost. In order to avoid this problem, you should set
-them in the `configure' command line, using `VAR=value'. For example:
-
- ./configure CC=/usr/local2/bin/gcc
-
-causes the specified `gcc' to be used as the C compiler (unless it is
-overridden in the site shell script). Here is a another example:
-
- /bin/bash ./configure CONFIG_SHELL=/bin/bash
-
-Here the `CONFIG_SHELL=/bin/bash' operand causes subsequent
-configuration-related scripts to be executed by `/bin/bash'.
-
-`configure' Invocation
-======================
-
-`configure' recognizes the following options to control how it operates.
-
-`--help'
-`-h'
- Print a summary of the options to `configure', and exit.
-
-`--version'
-`-V'
- Print the version of Autoconf used to generate the `configure'
- script, and exit.
-
-`--cache-file=FILE'
- Enable the cache: use and save the results of the tests in FILE,
- traditionally `config.cache'. FILE defaults to `/dev/null' to
- disable caching.
-
-`--config-cache'
-`-C'
- Alias for `--cache-file=config.cache'.
-
-`--quiet'
-`--silent'
-`-q'
- Do not print messages saying which checks are being made. To
- suppress all normal output, redirect it to `/dev/null' (any error
- messages will still be shown).
-
-`--srcdir=DIR'
- Look for the package's source code in directory DIR. Usually
- `configure' can determine that directory automatically.
-
-`configure' also accepts some other, not widely useful, options. Run
-`configure --help' for more details.
-
+++ /dev/null
-# Copyright (c) 2001, 2002 Eliot Dresselhaus
-#
-# Permission is hereby granted, free of charge, to any person obtaining
-# a copy of this software and associated documentation files (the
-# "Software"), to deal in the Software without restriction, including
-# without limitation the rights to use, copy, modify, merge, publish,
-# distribute, sublicense, and/or sell copies of the Software, and to
-# permit persons to whom the Software is furnished to do so, subject to
-# the following conditions:
-#
-# The above copyright notice and this permission notice shall be
-# included in all copies or substantial portions of the Software.
-#
-# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
-# EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
-# MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
-# NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
-# LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
-# OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
-# WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
-
-# Basic toolchain defines.
-CC = $(CROSS_COMPILE)gcc
-LD = $(CROSS_COMPILE)ld
-AR = $(CROSS_COMPILE)ar
-RANLIB = $(CROSS_COMPILE)ranlib
-INSTALL = install
-
-ifneq ($(origin CROSS_COMPILE), undefined)
- IS_CROSS_COMPILE=yes
-endif
-
-CLIB_ARCH = $(shell $(CC) -dumpmachine)
-
-# Where to get linux kernel includes.
-# By default get linux includes from /usr/include/linux...
-KERNEL_PREFIX ?= /usr
-
-# Where to find compiler include directory (since we may
-# be using -nostdinc).
-CC_PREFIX = $(shell dirname `$(CC) --print-libgcc-file-name`)
-
-# Where to get LIBC includes for cross compiles
-LIBC_PREFIX ?= $(CC_PREFIX)/../../../../$(CLIB_ARCH)
-
-# Where to find CLIB includes/libraries for cross compiles
-CLIB_PREFIX ?= /usr/local/$(CLIB_ARCH)
-
-OBJ = $(CLIB_ARCH).o
-SHARED_OBJ = shared.$(OBJ)
-KERNEL_OBJ = kernel.$(OBJ)
-MODULE_OBJ = module.$(OBJ)
-
-DEP = $(CLIB_ARCH).d
-SHARED_DEP = shared.$(DEP)
-KERNEL_DEP = kernel.$(DEP)
-
-STATIC_LIB = $(CLIB_ARCH).a
-SHARED_LIB = $(CLIB_ARCH).so
-KERNEL_LIB = kernel.$(CLIB_ARCH).a
-
-STATIC_CFLAGS = $(DEFAULT_CFLAGS)
-SHARED_CFLAGS = $(STATIC_CFLAGS) -fPIC
-
-# Compile flags common to user/kernel
-CLIB_COMMON_CFLAGS += -Wall
-
-DEBUG ?= no
-ifeq ($(DEBUG),yes)
- COPTS ?= -g -O0
- CLIB_COMMON_CFLAGS += -DDEBUG
-else
- COPTS ?= -O2
-endif
-
-CLIB_COMMON_CFLAGS += $(COPTS)
-
-CLIB_USER_CFLAGS = $(CLIB_COMMON_CFLAGS)
-
-ifeq ($(IS_CROSS_COMPILE),yes)
- CLIB_USER_CFLAGS += -nostdinc
- CLIB_USER_CFLAGS += -idirafter $(CC_PREFIX)/include
- CLIB_USER_CFLAGS += -idirafter $(KERNEL_PREFIX)/include
- CLIB_USER_CFLAGS += -idirafter $(LIBC_PREFIX)/include
- CLIB_COMMON_CFLAGS += -idirafter $(CLIB_PREFIX)/include
-endif
-
-STATIC_CFLAGS = $(CLIB_USER_CFLAGS)
-SHARED_CFLAGS = $(STATIC_CFLAGS) -fPIC
-
-%.$(SHARED_OBJ): %.c
- $(CC) -c $(SHARED_CFLAGS) -o $@ $<
-
-%.$(OBJ): %.c
- $(CC) -c $(STATIC_CFLAGS) -o $@ $<
-
-# Kernel version of clib
-
-CLIB_KERNEL_CFLAGS = $(CLIB_COMMON_CFLAGS)
-
-CLIB_KERNEL_CFLAGS += -nostdinc
-CLIB_KERNEL_CFLAGS += -idirafter $(CC_PREFIX)/include
-CLIB_KERNEL_CFLAGS += -idirafter $(KERNEL_PREFIX)/include
-
-# Kernel always uses mheap allocator (no malloc)
-CLIB_KERNEL_CFLAGS += -DCLIB_MEM_MHEAP
-
-CLIB_KERNEL_CFLAGS += -D__KERNEL__ -DMODULE -DEXPORT_SYMTAB
-
-CLIB_KERNEL_CFLAGS += -fno-common -fomit-frame-pointer -fno-strict-aliasing
-
-ifeq ($(findstring mips,$(CLIB_ARCH)),mips)
- CLIB_KERNEL_CFLAGS += -G0 \
- -mno-abicalls -fno-pic -mlong-calls \
- -mcpu=r8000 -mips2 -Wa,--trap
-endif
-
-%.$(KERNEL_OBJ): %.c
- $(CC) $(CLIB_KERNEL_CFLAGS) -c -o $@ $<
-
-# Dependencies
-%.$(DEP): %.c
- $(CC) $(CLIB_USER_CFLAGS) -c -M $< | sed -e s/.o:/.$(OBJ):/ > $@
-
-%.$(SHARED_DEP): %.c
- $(CC) $(CLIB_USER_CFLAGS) -c -M $< | sed -e s/.o:/.$(SHARED_OBJ):/ > $@
-
-%.$(KERNEL_DEP): %.c
- $(CC) $(CLIB_KERNEL_CFLAGS) -c -M $< | sed -e s/.o:/.$(KERNEL_OBJ):/ > $@
+++ /dev/null
-# Process this file with autoconf to produce a configure script.
-AC_INIT(libvppinfra,1.0,)
-AC_CONFIG_AUX_DIR(config)
-AC_CONFIG_HEADERS(config/config.h)
-AC_CANONICAL_BUILD
-AC_CANONICAL_HOST
-AM_INIT_AUTOMAKE([gnu no-dist-gzip dist-bzip2])
-AM_SILENT_RULES([yes])
-
-# Checks for programs.
-AC_PROG_CC
-AM_PROG_AS
-AM_PROG_LIBTOOL
-
-######################################################################
-
-dnl ------------
-dnl Check CFLAGS, CC
-dnl ------------
-AC_ARG_WITH(cc,
- AC_HELP_STRING([--with-cc],[Set CC for use as C compiler.]),
- [CC="$with_cc"])
-
-AC_ARG_WITH(cflags,
- AC_HELP_STRING([--with-cflags],[Set CFLAGS for use by C compiler.]),
- [CFLAGS="$with_cflags"])
-
-AC_ARG_WITH(ldflags,
- AC_HELP_STRING([--with-ldflags],[Set LDFLAGS for linking.]),
- [LDFLAGS="$with_ldflags"])
-
-######################################################################
-
-AC_ARG_ENABLE(tests,
- AC_HELP_STRING([--enable-tests],[Enable unit tests]),
- [enable_tests=1],
- [enable_tests=0])
-
-AM_CONDITIONAL(ENABLE_TESTS, test "$enable_tests" = "1")
-
-AC_ARG_WITH(unix,
- AC_HELP_STRING([--with-unix],[Compile unix version of clib]),
- [],
- [case $host_os in
- darwin* | linux*) with_unix=yes;;
- *) with_unix=no;;
- esac])
-
-AM_CONDITIONAL(WITH_UNIX, test "$with_unix" = "yes")
-
-AC_CONFIG_FILES([Makefile])
-AC_OUTPUT
+++ /dev/null
-/*
- * Copyright (c) 2016 Cisco and/or its affiliates.
- * Copyright (c) 2016 Comcast Cable Communications Management, LLC.
- *
- * 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.
- */
-/** @dir
- * @brief VPP infrastructure library and tools.
- */
+++ /dev/null
-#! /bin/sh
-# mkinstalldirs --- make directory hierarchy
-# Author: Noah Friedman <friedman@prep.ai.mit.edu>
-# Created: 1993-05-16
-# Public domain
-
-errstatus=0
-dirmode=""
-
-usage="\
-Usage: mkinstalldirs [-h] [--help] [-m mode] dir ..."
-
-# process command line arguments
-while test $# -gt 0 ; do
- case $1 in
- -h | --help | --h*) # -h for help
- echo "$usage" 1>&2
- exit 0
- ;;
- -m) # -m PERM arg
- shift
- test $# -eq 0 && { echo "$usage" 1>&2; exit 1; }
- dirmode=$1
- shift
- ;;
- --) # stop option processing
- shift
- break
- ;;
- -*) # unknown option
- echo "$usage" 1>&2
- exit 1
- ;;
- *) # first non-opt arg
- break
- ;;
- esac
-done
-
-for file
-do
- if test -d "$file"; then
- shift
- else
- break
- fi
-done
-
-case $# in
- 0) exit 0 ;;
-esac
-
-case $dirmode in
- '')
- if mkdir -p -- . 2>/dev/null; then
- echo "mkdir -p -- $*"
- exec mkdir -p -- "$@"
- fi
- ;;
- *)
- if mkdir -m "$dirmode" -p -- . 2>/dev/null; then
- echo "mkdir -m $dirmode -p -- $*"
- exec mkdir -m "$dirmode" -p -- "$@"
- fi
- ;;
-esac
-
-for file
-do
- set fnord `echo ":$file" | sed -ne 's/^:\//#/;s/^://;s/\// /g;s/^#/\//;p'`
- shift
-
- pathcomp=
- for d
- do
- pathcomp="$pathcomp$d"
- case $pathcomp in
- -*) pathcomp=./$pathcomp ;;
- esac
-
- if test ! -d "$pathcomp"; then
- echo "mkdir $pathcomp"
-
- mkdir "$pathcomp" || lasterr=$?
-
- if test ! -d "$pathcomp"; then
- errstatus=$lasterr
- else
- if test ! -z "$dirmode"; then
- echo "chmod $dirmode $pathcomp"
- lasterr=""
- chmod "$dirmode" "$pathcomp" || lasterr=$?
-
- if test ! -z "$lasterr"; then
- errstatus=$lasterr
- fi
- fi
- fi
- fi
-
- pathcomp="$pathcomp/"
- done
-done
-
-exit $errstatus
-
-# Local Variables:
-# mode: shell-script
-# sh-indentation: 2
-# End:
-# mkinstalldirs ends here