Multiple changes in the plugin build infra
- configure.ac - some plugins are enabled by default - Plugin .so files are placed into corresponding subdirs - WITH_PLUGIN_TOOLKIT macro is retired - not needed anymore - plugins/build-data is removed - plugin makefiles are not building static libs anymore - plugin makefiles are not installing header files to /usr/include anymore Change-Id: I55681bd9ce34811f7eb1b2b24d9f0ca42df1cf04 Signed-off-by: Damjan Marion <damarion@cisco.com>
This commit is contained in:

committed by
Dave Barach

parent
370e9e38e8
commit
905a7f5520
6
Makefile
6
Makefile
@ -110,7 +110,7 @@ ifeq ($(OS_ID),ubuntu)
|
||||
fi ; \
|
||||
exit 0
|
||||
endif
|
||||
@echo "SOURCE_PATH = $(WS_ROOT) $(WS_ROOT)/plugins"> $(BR)/build-config.mk
|
||||
@echo "SOURCE_PATH = $(WS_ROOT)" > $(BR)/build-config.mk
|
||||
@echo "#!/bin/bash\n" > $(BR)/path_setup
|
||||
@echo 'export PATH=$(BR)/tools/ccache-bin:$$PATH' >> $(BR)/path_setup
|
||||
@echo 'export PATH=$(BR)/tools/bin:$$PATH' >> $(BR)/path_setup
|
||||
@ -178,12 +178,12 @@ define run
|
||||
@echo "WARNING: STARTUP_CONF not defined or file doesn't exist."
|
||||
@echo " Running with minimal startup config: $(MINIMAL_STARTUP_CONF)\n"
|
||||
@cd $(STARTUP_DIR) && \
|
||||
sudo $(2) $(1)/vpp/bin/vpp $(MINIMAL_STARTUP_CONF) plugin_path $(1)/plugins/lib64
|
||||
sudo $(2) $(1)/vpp/bin/vpp $(MINIMAL_STARTUP_CONF) plugin_path $(1)/plugins/lib64/vpp_plugins
|
||||
endef
|
||||
else
|
||||
define run
|
||||
@cd $(STARTUP_DIR) && \
|
||||
sudo $(2) $(1)/vpp/bin/vpp $(shell cat $(STARTUP_CONF) | sed -e 's/#.*//') plugin_path $(1)/plugins/lib64
|
||||
sudo $(2) $(1)/vpp/bin/vpp $(shell cat $(STARTUP_CONF) | sed -e 's/#.*//') plugin_path $(1)/plugins/lib64/vpp_plugins
|
||||
endef
|
||||
endif
|
||||
|
||||
|
@ -38,9 +38,7 @@ 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
|
||||
|
||||
# Enable plugins here, and no place else, via multiple --enable-XXX-plugin
|
||||
# stanzas.
|
||||
plugins_configure_args_vpp = --with-dpdk --enable-sixrd-plugin
|
||||
plugins_configure_args_vpp = --with-dpdk
|
||||
|
||||
# DPDK configuration parameters
|
||||
# vpp_uses_external_dpdk = yes
|
||||
|
@ -12,7 +12,7 @@ ADD_TO_PATH="$build_root/tools/ccache-bin:$build_root/tools/bin"
|
||||
|
||||
# Construct build-config.mk
|
||||
cd $build_root
|
||||
echo SOURCE_PATH = $wsroot $wsroot/plugins/ > build-config.mk
|
||||
echo SOURCE_PATH = $wsroot > build-config.mk
|
||||
echo
|
||||
echo Saving PATH settings in `pwd`/path_setup
|
||||
echo Source this file later, as needed
|
||||
|
@ -1,47 +0,0 @@
|
||||
ioam-plugin_configure_depend = \
|
||||
vppinfra-install \
|
||||
svm-install \
|
||||
vlib-api-install \
|
||||
vlib-install \
|
||||
vnet-install \
|
||||
vpp-install \
|
||||
vpp-api-test-install
|
||||
|
||||
ioam-plugin_CPPFLAGS = $(call installed_includes_fn, \
|
||||
vppinfra \
|
||||
openssl \
|
||||
svm \
|
||||
vlib \
|
||||
vlib-api \
|
||||
vnet \
|
||||
vpp \
|
||||
vpp-api-test)
|
||||
|
||||
ioam-plugin_LDFLAGS = $(call installed_libs_fn, \
|
||||
vppinfra \
|
||||
openssl \
|
||||
svm \
|
||||
vlib \
|
||||
vlib-api \
|
||||
vnet \
|
||||
vpp \
|
||||
vpp-api-test)
|
||||
|
||||
ioam-plugin_post_install = \
|
||||
mkdir -p $(PACKAGE_INSTALL_DIR)/$(arch_lib_dir)/vlib_plugins ; \
|
||||
cp $(PACKAGE_INSTALL_DIR)/$(arch_lib_dir)/*.so \
|
||||
$(PACKAGE_INSTALL_DIR)/$(arch_lib_dir)/vlib_plugins
|
||||
|
||||
ioam-plugin_image_include = echo $(arch_lib_dir)/vlib_plugins
|
||||
|
||||
ifneq ($($(PLATFORM)_uses_dpdk),no)
|
||||
ioam-plugin_configure_args = --with-dpdk
|
||||
ifeq ($($(PLATFORM)_uses_external_dpdk),yes)
|
||||
ioam-plugin_CPPFLAGS += -I$($(PLATFORM)_dpdk_inc_dir)
|
||||
ioam-plugin_LDFLAGS += -L$($(PLATFORM)_dpdk_lib_dir)
|
||||
else
|
||||
ioam-plugin_configure_depend += dpdk-install
|
||||
ioam-plugin_CPPFLAGS += $(call installed_includes_fn, dpdk)
|
||||
ioam-plugin_LDFLAGS += $(call installed_libs_fn, dpdk)
|
||||
endif
|
||||
endif
|
@ -1,47 +0,0 @@
|
||||
sample-plugin_configure_depend = \
|
||||
vppinfra-install \
|
||||
svm-install \
|
||||
vlib-api-install \
|
||||
vlib-install \
|
||||
vnet-install \
|
||||
vpp-install \
|
||||
vpp-api-test-install
|
||||
|
||||
sample-plugin_CPPFLAGS = $(call installed_includes_fn, \
|
||||
vppinfra \
|
||||
openssl \
|
||||
svm \
|
||||
vlib \
|
||||
vlib-api \
|
||||
vnet \
|
||||
vpp \
|
||||
vpp-api-test)
|
||||
|
||||
sample-plugin_LDFLAGS = $(call installed_libs_fn, \
|
||||
vppinfra \
|
||||
openssl \
|
||||
svm \
|
||||
vlib \
|
||||
vlib-api \
|
||||
vnet \
|
||||
vpp \
|
||||
vpp-api-test)
|
||||
|
||||
sample-plugin_post_install = \
|
||||
mkdir -p $(PACKAGE_INSTALL_DIR)/$(arch_lib_dir)/vlib_plugins ; \
|
||||
cp $(PACKAGE_INSTALL_DIR)/$(arch_lib_dir)/*.so \
|
||||
$(PACKAGE_INSTALL_DIR)/$(arch_lib_dir)/vlib_plugins
|
||||
|
||||
sample-plugin_image_include = echo $(arch_lib_dir)/vlib_plugins
|
||||
|
||||
ifneq ($($(PLATFORM)_uses_dpdk),no)
|
||||
sample-plugin_configure_args = --with-dpdk
|
||||
ifeq ($($(PLATFORM)_uses_external_dpdk),yes)
|
||||
sample-plugin_CPPFLAGS += -I$($(PLATFORM)_dpdk_inc_dir)
|
||||
sample-plugin_LDFLAGS += -L$($(PLATFORM)_dpdk_lib_dir)
|
||||
else
|
||||
sample-plugin_configure_depend += dpdk-install
|
||||
sample-plugin_CPPFLAGS += $(call installed_includes_fn, dpdk)
|
||||
sample-plugin_LDFLAGS += $(call installed_libs_fn, dpdk)
|
||||
endif
|
||||
endif
|
@ -1,47 +0,0 @@
|
||||
sixrd-plugin_configure_depend = \
|
||||
vppinfra-install \
|
||||
svm-install \
|
||||
vlib-api-install \
|
||||
vlib-install \
|
||||
vnet-install \
|
||||
vpp-install \
|
||||
vpp-api-test-install
|
||||
|
||||
sixrd-plugin_CPPFLAGS = $(call installed_includes_fn, \
|
||||
vppinfra \
|
||||
openssl \
|
||||
svm \
|
||||
vlib \
|
||||
vlib-api \
|
||||
vnet \
|
||||
vpp \
|
||||
vpp-api-test)
|
||||
|
||||
sixrd-plugin_LDFLAGS = $(call installed_libs_fn, \
|
||||
vppinfra \
|
||||
openssl \
|
||||
svm \
|
||||
vlib \
|
||||
vlib-api \
|
||||
vnet \
|
||||
vpp \
|
||||
vpp-api-test)
|
||||
|
||||
sixrd-plugin_post_install = \
|
||||
mkdir -p $(PACKAGE_INSTALL_DIR)/$(arch_lib_dir)/vlib_plugins ; \
|
||||
cp $(PACKAGE_INSTALL_DIR)/$(arch_lib_dir)/*.so \
|
||||
$(PACKAGE_INSTALL_DIR)/$(arch_lib_dir)/vlib_plugins
|
||||
|
||||
sixrd-plugin_image_include = echo $(arch_lib_dir)/vlib_plugins
|
||||
|
||||
ifneq ($($(PLATFORM)_uses_dpdk),no)
|
||||
sixrd-plugin_configure_args = --with-dpdk
|
||||
ifeq ($($(PLATFORM)_uses_external_dpdk),yes)
|
||||
sixrd-plugin_CPPFLAGS += -I$($(PLATFORM)_dpdk_inc_dir)
|
||||
sixrd-plugin_LDFLAGS += -L$($(PLATFORM)_dpdk_lib_dir)
|
||||
else
|
||||
sixrd-plugin_configure_depend += dpdk-install
|
||||
sixrd-plugin_CPPFLAGS += $(call installed_includes_fn, dpdk)
|
||||
sixrd-plugin_LDFLAGS += $(call installed_libs_fn, dpdk)
|
||||
endif
|
||||
endif
|
@ -1,47 +0,0 @@
|
||||
vcgn-plugin_configure_depend = \
|
||||
vppinfra-install \
|
||||
svm-install \
|
||||
vlib-api-install \
|
||||
vlib-install \
|
||||
vnet-install \
|
||||
vpp-install \
|
||||
vpp-api-test-install
|
||||
|
||||
vcgn-plugin_CPPFLAGS = $(call installed_includes_fn, \
|
||||
vppinfra \
|
||||
openssl \
|
||||
svm \
|
||||
vlib \
|
||||
vlib-api \
|
||||
vnet \
|
||||
vpp \
|
||||
vpp-api-test)
|
||||
|
||||
vcgn-plugin_LDFLAGS = $(call installed_libs_fn, \
|
||||
vppinfra \
|
||||
openssl \
|
||||
svm \
|
||||
vlib \
|
||||
vlib-api \
|
||||
vnet \
|
||||
vpp \
|
||||
vpp-api-test)
|
||||
|
||||
vcgn-plugin_post_install = \
|
||||
mkdir -p $(PACKAGE_INSTALL_DIR)/$(arch_lib_dir)/vlib_plugins ; \
|
||||
cp $(PACKAGE_INSTALL_DIR)/$(arch_lib_dir)/*.so \
|
||||
$(PACKAGE_INSTALL_DIR)/$(arch_lib_dir)/vlib_plugins
|
||||
|
||||
vcgn-plugin_image_include = echo $(arch_lib_dir)/vlib_plugins
|
||||
|
||||
ifneq ($($(PLATFORM)_uses_dpdk),no)
|
||||
vcgn-plugin_configure_args = --with-dpdk
|
||||
ifeq ($($(PLATFORM)_uses_external_dpdk),yes)
|
||||
vcgn-plugin_CPPFLAGS += -I$($(PLATFORM)_dpdk_inc_dir)
|
||||
vcgn-plugin_LDFLAGS += -L$($(PLATFORM)_dpdk_lib_dir)
|
||||
else
|
||||
vcgn-plugin_configure_depend += dpdk-install
|
||||
vcgn-plugin_CPPFLAGS += $(call installed_includes_fn, dpdk)
|
||||
vcgn-plugin_LDFLAGS += $(call installed_libs_fn, dpdk)
|
||||
endif
|
||||
endif
|
@ -11,25 +11,29 @@ AC_ARG_ENABLE(tests,
|
||||
[enable_tests=1],
|
||||
[enable_tests=0])
|
||||
|
||||
AC_ARG_WITH(plugin-toolkit,
|
||||
AC_HELP_STRING([--with-plugin-toolkit],
|
||||
[build using the vpp toolkit]),
|
||||
[with_plugin_toolkit=${prefix}/include],
|
||||
[with_plugin_toolkit=.])
|
||||
|
||||
AC_ARG_WITH(dpdk,
|
||||
AC_HELP_STRING([--with-dpdk],[Use the Intel dpdk]),
|
||||
[with_dpdk=1],
|
||||
[with_dpdk=0])
|
||||
|
||||
AC_SUBST(TOOLKIT_INCLUDE,[${with_plugin_toolkit}])
|
||||
AM_CONDITIONAL(WITH_PLUGIN_TOOLKIT, test "$with_plugin_toolkit" != ".")
|
||||
AM_CONDITIONAL(ENABLE_TESTS, test "$enable_tests" = "1")
|
||||
|
||||
AM_CONDITIONAL(WITH_DPDK, test "$with_dpdk" = "1")
|
||||
AC_SUBST(DPDK,["-DDPDK=${with_dpdk}"])
|
||||
|
||||
AC_DEFUN([PLUGIN],
|
||||
AC_DEFUN([PLUGIN_ENABLED],
|
||||
[
|
||||
AC_ARG_ENABLE($1_plugin,
|
||||
AC_HELP_STRING([--disable-$1-plugin], [Do not build $1 plugin]),
|
||||
[enable_the_plugin=0],
|
||||
[enable_the_plugin=1])
|
||||
if test "x$enable_the_plugin" = x1; then
|
||||
AC_CONFIG_SUBDIRS($1-plugin)
|
||||
fi
|
||||
AM_CONDITIONAL(ENABLE_$1_PLUGIN, test "$enable_the_plugin" = "1")
|
||||
])
|
||||
|
||||
AC_DEFUN([PLUGIN_DISABLED],
|
||||
[
|
||||
AC_ARG_ENABLE($1_plugin,
|
||||
AC_HELP_STRING([--enable-$1-plugin], [Build $1 plugin]),
|
||||
@ -42,7 +46,7 @@ AM_CONDITIONAL(ENABLE_$1_PLUGIN, test "$enable_the_plugin" = "1")
|
||||
])
|
||||
|
||||
# To add a new plugin subdirectory:
|
||||
#
|
||||
#
|
||||
# add PLUGIN(new) below, and
|
||||
# add the following to Makefile.am:
|
||||
#
|
||||
@ -50,10 +54,12 @@ AM_CONDITIONAL(ENABLE_$1_PLUGIN, test "$enable_the_plugin" = "1")
|
||||
# SUBDIRS += new-plugin
|
||||
# endif
|
||||
|
||||
PLUGIN(sample)
|
||||
PLUGIN(sixrd)
|
||||
PLUGIN(ioam)
|
||||
PLUGIN(vcgn)
|
||||
PLUGIN(snat)
|
||||
PLUGIN_ENABLED(sixrd)
|
||||
PLUGIN_ENABLED(ioam)
|
||||
PLUGIN_ENABLED(snat)
|
||||
|
||||
# Disabled plugins, require --enable-XXX-plugin
|
||||
PLUGIN_DISABLED(vcgn)
|
||||
PLUGIN_DISABLED(sample)
|
||||
|
||||
AC_OUTPUT([Makefile])
|
||||
|
@ -13,7 +13,8 @@
|
||||
|
||||
AUTOMAKE_OPTIONS = foreign subdir-objects
|
||||
|
||||
AM_CFLAGS = -Wall -I@TOOLKIT_INCLUDE@
|
||||
AM_CFLAGS = -Wall
|
||||
AM_LDFLAGS = -module -shared -avoid-version
|
||||
|
||||
########################################
|
||||
# iOAM Proof of Transit
|
||||
@ -26,8 +27,6 @@ ioam_pot_plugin_la_SOURCES = \
|
||||
ioam/lib-pot/math64.h \
|
||||
ioam/lib-pot/pot_api.c
|
||||
|
||||
ioam_pot_plugin_la_LDFLAGS = -module
|
||||
|
||||
BUILT_SOURCES = \
|
||||
ioam/lib-pot/pot.api.h
|
||||
|
||||
@ -38,7 +37,7 @@ SUFFIXES = .api.h .api
|
||||
$(CC) $(CPPFLAGS) -E -P -C -x c $^ \
|
||||
| vppapigen --input - --output $@ --show-name $@
|
||||
|
||||
nobase_include_HEADERS = \
|
||||
noinst_HEADERS = \
|
||||
ioam/lib-pot/pot_all_api_h.h \
|
||||
ioam/lib-pot/pot_msg_enum.h \
|
||||
ioam/lib-pot/pot.api.h \
|
||||
@ -49,14 +48,14 @@ ioam_pot_test_plugin_la_SOURCES = \
|
||||
ioam/lib-pot/pot_test.c \
|
||||
ioam/lib-pot/pot_plugin.api.h
|
||||
|
||||
ioam_pot_test_plugin_la_LDFLAGS = -module
|
||||
vppapitestpluginsdir = ${libdir}/vpp_api_test_plugins
|
||||
vpppluginsdir = ${libdir}/vpp_plugins
|
||||
|
||||
lib_LTLIBRARIES = ioam_pot_plugin.la ioam_pot_test_plugin.la
|
||||
vppapitestplugins_LTLIBRARIES = ioam_pot_test_plugin.la
|
||||
vppplugins_LTLIBRARIES = ioam_pot_plugin.la
|
||||
|
||||
if WITH_PLUGIN_TOOLKIT
|
||||
|
||||
# Remove *.la files
|
||||
install-data-hook:
|
||||
mkdir /usr/lib/vpp_plugins || true
|
||||
mkdir /usr/lib/vpp_api_test_plugins || true
|
||||
cp -L $(prefix)/lib/ioam_pot_plugin.so /usr/lib/vpp_plugins
|
||||
cp -L $(prefix)/lib/ioam_pot_test_plugin.so /usr/lib/vpp_api_test_plugins
|
||||
endif
|
||||
@(cd $(vpppluginsdir) && $(RM) $(vppplugins_LTLIBRARIES))
|
||||
@(cd $(vppapitestpluginsdir) && $(RM) $(vppapitestplugins_LTLIBRARIES))
|
||||
|
@ -1,17 +1,8 @@
|
||||
AC_INIT(ioam_plugin, 1.0)
|
||||
LT_INIT
|
||||
AM_INIT_AUTOMAKE
|
||||
AC_PREFIX_DEFAULT([/usr])
|
||||
|
||||
AM_PROG_AS
|
||||
AC_PROG_CC
|
||||
AM_PROG_CC_C_O
|
||||
|
||||
AC_ARG_WITH(plugin-toolkit,
|
||||
AC_HELP_STRING([--with-plugin-toolkit],
|
||||
[build using the vpp toolkit]),
|
||||
[with_plugin_toolkit=${prefix}/include],
|
||||
[with_plugin_toolkit=.])
|
||||
|
||||
AC_SUBST(TOOLKIT_INCLUDE,[${with_plugin_toolkit}])
|
||||
AM_CONDITIONAL(WITH_PLUGIN_TOOLKIT, test "$with_plugin_toolkit" != ".")
|
||||
AC_OUTPUT([Makefile])
|
||||
|
@ -13,12 +13,17 @@
|
||||
|
||||
AUTOMAKE_OPTIONS = foreign subdir-objects
|
||||
|
||||
AM_CFLAGS = -Wall -I@TOOLKIT_INCLUDE@
|
||||
AM_CFLAGS = -Wall
|
||||
AM_LDFLAGS = -module -shared -avoid-version
|
||||
|
||||
vppapitestpluginsdir = ${libdir}/vpp_api_test_plugins
|
||||
vpppluginsdir = ${libdir}/vpp_plugins
|
||||
|
||||
vppapitestplugins_LTLIBRARIES = sample_test_plugin.la
|
||||
vppplugins_LTLIBRARIES = sample_plugin.la
|
||||
|
||||
lib_LTLIBRARIES = sample_plugin.la sample_test_plugin.la
|
||||
sample_plugin_la_SOURCES = sample/sample.c sample/node.c \
|
||||
sample/sample_plugin.api.h
|
||||
sample_plugin_la_LDFLAGS = -module
|
||||
sample/sample_plugin.api.h
|
||||
|
||||
BUILT_SOURCES = sample/sample.api.h
|
||||
|
||||
@ -29,18 +34,14 @@ SUFFIXES = .api.h .api
|
||||
$(CC) $(CPPFLAGS) -E -P -C -x c $^ \
|
||||
| vppapigen --input - --output $@ --show-name $@
|
||||
|
||||
nobase_include_HEADERS = \
|
||||
noinst_HEADERS = \
|
||||
sample/sample_all_api_h.h \
|
||||
sample/sample_msg_enum.h \
|
||||
sample/sample.api.h
|
||||
|
||||
sample_test_plugin_la_SOURCES = sample/sample_test.c sample/sample_plugin.api.h
|
||||
sample_test_plugin_la_LDFLAGS = -module
|
||||
|
||||
if WITH_PLUGIN_TOOLKIT
|
||||
# Remove *.la files
|
||||
install-data-hook:
|
||||
mkdir /usr/lib/vpp_plugins || true
|
||||
mkdir /usr/lib/vpp_api_test_plugins || true
|
||||
cp -L $(prefix)/lib/sample_plugin.so /usr/lib/vpp_plugins
|
||||
cp -L $(prefix)/lib/sample_test_plugin.so /usr/lib/vpp_api_test_plugins
|
||||
endif
|
||||
@(cd $(vpppluginsdir) && $(RM) $(vppplugins_LTLIBRARIES))
|
||||
@(cd $(vppapitestpluginsdir) && $(RM) $(vppapitestplugins_LTLIBRARIES))
|
||||
|
@ -2,17 +2,8 @@ AC_INIT(sample_plugin, 1.0)
|
||||
LT_INIT
|
||||
AM_INIT_AUTOMAKE
|
||||
AM_SILENT_RULES([yes])
|
||||
AC_PREFIX_DEFAULT([/usr])
|
||||
|
||||
AM_PROG_AS
|
||||
AC_PROG_CC
|
||||
AM_PROG_CC_C_O
|
||||
|
||||
AC_ARG_WITH(plugin-toolkit,
|
||||
AC_HELP_STRING([--with-plugin-toolkit],
|
||||
[build using the vpp toolkit]),
|
||||
[with_plugin_toolkit=${prefix}/include],
|
||||
[with_plugin_toolkit=.])
|
||||
|
||||
AC_SUBST(TOOLKIT_INCLUDE,[${with_plugin_toolkit}])
|
||||
AM_CONDITIONAL(WITH_PLUGIN_TOOLKIT, test "$with_plugin_toolkit" != ".")
|
||||
AC_OUTPUT([Makefile])
|
||||
|
@ -13,25 +13,24 @@
|
||||
|
||||
AUTOMAKE_OPTIONS = foreign subdir-objects
|
||||
|
||||
AM_CFLAGS = -Wall -I@TOOLKIT_INCLUDE@
|
||||
AM_CFLAGS = -Wall
|
||||
AM_LDFLAGS = -module -shared -avoid-version
|
||||
|
||||
libsixrd_plugin_la_SOURCES = \
|
||||
sixrd/sixrd.c \
|
||||
sixrd/ip4_sixrd.c \
|
||||
sixrd/ip6_sixrd.c
|
||||
|
||||
nobase_include_HEADERS = \
|
||||
noinst_HEADERS = \
|
||||
sixrd/sixrd.h
|
||||
|
||||
libsixrd_plugin_la_LDFLAGS = -module
|
||||
|
||||
BUILT_SOURCES =
|
||||
|
||||
lib_LTLIBRARIES = libsixrd_plugin.la
|
||||
vpppluginsdir = ${libdir}/vpp_plugins
|
||||
|
||||
if WITH_PLUGIN_TOOLKIT
|
||||
vppplugins_LTLIBRARIES = libsixrd_plugin.la
|
||||
|
||||
|
||||
# Remove *.la files
|
||||
install-data-hook:
|
||||
mkdir /usr/lib/vpp_plugins || true
|
||||
mkdir /usr/lib/vpp_api_test_plugins || true
|
||||
cp -L $(prefix)/lib/libsixrd_plugin.so /usr/lib/vpp_plugins
|
||||
endif
|
||||
@(cd $(vpppluginsdir) && $(RM) $(vppplugins_LTLIBRARIES))
|
||||
|
@ -2,17 +2,8 @@ AC_INIT(sixrd_plugin, 1.0)
|
||||
LT_INIT
|
||||
AM_INIT_AUTOMAKE
|
||||
AM_SILENT_RULES([yes])
|
||||
AC_PREFIX_DEFAULT([/usr])
|
||||
|
||||
AM_PROG_AS
|
||||
AC_PROG_CC
|
||||
AM_PROG_CC_C_O
|
||||
|
||||
AC_ARG_WITH(plugin-toolkit,
|
||||
AC_HELP_STRING([--with-plugin-toolkit],
|
||||
[build using the vpp toolkit]),
|
||||
[with_plugin_toolkit=${prefix}/include],
|
||||
[with_plugin_toolkit=.])
|
||||
|
||||
AC_SUBST(TOOLKIT_INCLUDE,[${with_plugin_toolkit}])
|
||||
AM_CONDITIONAL(WITH_PLUGIN_TOOLKIT, test "$with_plugin_toolkit" != ".")
|
||||
AC_OUTPUT([Makefile])
|
||||
|
@ -3,9 +3,9 @@
|
||||
# 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.
|
||||
@ -14,16 +14,19 @@
|
||||
|
||||
AUTOMAKE_OPTIONS = foreign subdir-objects
|
||||
|
||||
AM_CFLAGS = -Wall -I@TOOLKIT_INCLUDE@ @DPDK@
|
||||
AM_CFLAGS = -Wall @DPDK@
|
||||
AM_LDFLAGS = -module -shared -avoid-version
|
||||
|
||||
lib_LTLIBRARIES = snat_plugin.la snat_test_plugin.la
|
||||
vppapitestpluginsdir = ${libdir}/vpp_api_test_plugins
|
||||
vpppluginsdir = ${libdir}/vpp_plugins
|
||||
|
||||
vppapitestplugins_LTLIBRARIES = snat_test_plugin.la
|
||||
vppplugins_LTLIBRARIES = snat_plugin.la
|
||||
|
||||
snat_plugin_la_SOURCES = snat/snat.c \
|
||||
snat/in2out.c \
|
||||
snat/out2in.c \
|
||||
snat/snat_plugin.api.h
|
||||
|
||||
snat_plugin_la_LDFLAGS = -module
|
||||
snat/snat_plugin.api.h
|
||||
|
||||
BUILT_SOURCES = snat/snat.api.h
|
||||
|
||||
@ -34,22 +37,15 @@ SUFFIXES = .api.h .api
|
||||
$(CC) $(CPPFLAGS) -E -P -C -x c $^ \
|
||||
| vppapigen --input - --output $@ --show-name $@
|
||||
|
||||
nobase_include_HEADERS = \
|
||||
noinst_HEADERS = \
|
||||
snat/snat_all_api_h.h \
|
||||
snat/snat_msg_enum.h \
|
||||
snat/snat.api.h
|
||||
|
||||
snat_test_plugin_la_SOURCES = \
|
||||
snat/snat_test.c snat/snat_plugin.api.h
|
||||
snat_test_plugin_la_LDFLAGS = -module
|
||||
|
||||
if WITH_PLUGIN_TOOLKIT
|
||||
# Remove *.la files
|
||||
install-data-hook:
|
||||
mkdir /usr/lib/vpp_plugins || true
|
||||
mkdir /usr/lib/vpp_api_test_plugins || true
|
||||
cp -L $(prefix)/lib/snat_plugin.so /usr/lib/vpp_plugins
|
||||
cp -L $(prefix)/lib/snat_test_plugin.so \
|
||||
/usr/lib/vpp_api_test_plugins
|
||||
rm -f $(prefix)/lib/snat_plugin.*
|
||||
rm -f $(prefix)/lib/snat_test_plugin.*
|
||||
endif
|
||||
@(cd $(vpppluginsdir) && $(RM) $(vppplugins_LTLIBRARIES))
|
||||
@(cd $(vppapitestpluginsdir) && $(RM) $(vppapitestplugins_LTLIBRARIES))
|
||||
|
@ -1,11 +1,10 @@
|
||||
AC_INIT(snat_plugin, 1.0)
|
||||
AM_INIT_AUTOMAKE
|
||||
AM_SILENT_RULES([yes])
|
||||
AC_PREFIX_DEFAULT([/usr])
|
||||
|
||||
AC_PROG_LIBTOOL
|
||||
AM_PROG_AS
|
||||
AC_PROG_CC
|
||||
AM_PROG_CC_C_O
|
||||
|
||||
AC_ARG_WITH(dpdk,
|
||||
AC_HELP_STRING([--with-dpdk],[Use the Intel dpdk]),
|
||||
@ -15,13 +14,4 @@ AC_ARG_WITH(dpdk,
|
||||
AM_CONDITIONAL(WITH_DPDK, test "$with_dpdk" = "1")
|
||||
AC_SUBST(DPDK,["-DDPDK=${with_dpdk}"])
|
||||
|
||||
AC_ARG_WITH(plugin-toolkit,
|
||||
AC_HELP_STRING([--with-plugin-toolkit],
|
||||
[build using the vpp toolkit]),
|
||||
[with_plugin_toolkit=${prefix}/include],
|
||||
[with_plugin_toolkit=.])
|
||||
|
||||
AC_SUBST(TOOLKIT_INCLUDE,[${with_plugin_toolkit}])
|
||||
AM_CONDITIONAL(WITH_PLUGIN_TOOLKIT, test "$with_plugin_toolkit" != ".")
|
||||
|
||||
AC_OUTPUT([Makefile])
|
||||
|
@ -13,7 +13,8 @@
|
||||
|
||||
AUTOMAKE_OPTIONS = foreign subdir-objects
|
||||
|
||||
AM_CFLAGS = -Wall -I@TOOLKIT_INCLUDE@
|
||||
AM_CFLAGS = -Wall
|
||||
AM_LDFLAGS = -module -shared -avoid-version
|
||||
|
||||
########################################
|
||||
# Virtual Carrier Grade NAT
|
||||
@ -87,13 +88,10 @@ nobase_include_HEADERS = \
|
||||
vcgn/tcp_header_definitions.h \
|
||||
vcgn/vcgn_db.h
|
||||
|
||||
libvcgn_plugin_la_LDFLAGS = -module
|
||||
vpppluginsdir = ${libdir}/vpp_plugins
|
||||
|
||||
lib_LTLIBRARIES = libvcgn_plugin.la
|
||||
vppplugins_LTLIBRARIES = libvcgn_plugin.la
|
||||
|
||||
if WITH_PLUGIN_TOOLKIT
|
||||
# Remove *.la files
|
||||
install-data-hook:
|
||||
mkdir /usr/lib/vpp_plugins || true
|
||||
mkdir /usr/lib/vpp_api_test_plugins || true
|
||||
cp -L $(prefix)/lib/libvcgn_plugin.so /usr/lib/vpp_plugins
|
||||
endif
|
||||
@(cd $(vpppluginsdir) && $(RM) $(vppplugins_LTLIBRARIES))
|
||||
|
@ -2,17 +2,8 @@ AC_INIT(vcgn_plugin, 1.0)
|
||||
LT_INIT
|
||||
AM_INIT_AUTOMAKE
|
||||
AM_SILENT_RULES([yes])
|
||||
AC_PREFIX_DEFAULT([/usr])
|
||||
|
||||
AM_PROG_AS
|
||||
AC_PROG_CC
|
||||
AM_PROG_CC_C_O
|
||||
|
||||
AC_ARG_WITH(plugin-toolkit,
|
||||
AC_HELP_STRING([--with-plugin-toolkit],
|
||||
[build using the vpp toolkit]),
|
||||
[with_plugin_toolkit=${prefix}/include],
|
||||
[with_plugin_toolkit=.])
|
||||
|
||||
AC_SUBST(TOOLKIT_INCLUDE,[${with_plugin_toolkit}])
|
||||
AM_CONDITIONAL(WITH_PLUGIN_TOOLKIT, test "$with_plugin_toolkit" != ".")
|
||||
AC_OUTPUT([Makefile])
|
||||
|
Reference in New Issue
Block a user