aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--Makefile6
-rw-r--r--build-data/platforms/vpp.mk4
-rwxr-xr-xbuild-root/bootstrap.sh2
-rw-r--r--plugins/build-data/packages/ioam-plugin.mk47
-rw-r--r--plugins/build-data/packages/sample-plugin.mk47
-rw-r--r--plugins/build-data/packages/sixrd-plugin.mk47
-rw-r--r--plugins/build-data/packages/vcgn-plugin.mk47
-rw-r--r--plugins/configure.ac36
-rw-r--r--plugins/ioam-plugin/Makefile.am23
-rw-r--r--plugins/ioam-plugin/configure.ac11
-rw-r--r--plugins/sample-plugin/Makefile.am25
-rw-r--r--plugins/sample-plugin/configure.ac11
-rw-r--r--plugins/sixrd-plugin/Makefile.am19
-rw-r--r--plugins/sixrd-plugin/configure.ac11
-rw-r--r--plugins/snat-plugin/Makefile.am32
-rw-r--r--plugins/snat-plugin/configure.ac12
-rw-r--r--plugins/vcgn-plugin/Makefile.am14
-rw-r--r--plugins/vcgn-plugin/configure.ac11
18 files changed, 84 insertions, 321 deletions
diff --git a/Makefile b/Makefile
index 49a73861975..a1c6307827f 100644
--- a/Makefile
+++ b/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
diff --git a/build-data/platforms/vpp.mk b/build-data/platforms/vpp.mk
index 45f74d3374a..fb1867c750f 100644
--- a/build-data/platforms/vpp.mk
+++ b/build-data/platforms/vpp.mk
@@ -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
diff --git a/build-root/bootstrap.sh b/build-root/bootstrap.sh
index 2419b6ae254..f83734fd4af 100755
--- a/build-root/bootstrap.sh
+++ b/build-root/bootstrap.sh
@@ -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
diff --git a/plugins/build-data/packages/ioam-plugin.mk b/plugins/build-data/packages/ioam-plugin.mk
deleted file mode 100644
index 1ebe81849ee..00000000000
--- a/plugins/build-data/packages/ioam-plugin.mk
+++ /dev/null
@@ -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
diff --git a/plugins/build-data/packages/sample-plugin.mk b/plugins/build-data/packages/sample-plugin.mk
deleted file mode 100644
index 047a26f551c..00000000000
--- a/plugins/build-data/packages/sample-plugin.mk
+++ /dev/null
@@ -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
diff --git a/plugins/build-data/packages/sixrd-plugin.mk b/plugins/build-data/packages/sixrd-plugin.mk
deleted file mode 100644
index 186d9b8fe3b..00000000000
--- a/plugins/build-data/packages/sixrd-plugin.mk
+++ /dev/null
@@ -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
diff --git a/plugins/build-data/packages/vcgn-plugin.mk b/plugins/build-data/packages/vcgn-plugin.mk
deleted file mode 100644
index cd865c15014..00000000000
--- a/plugins/build-data/packages/vcgn-plugin.mk
+++ /dev/null
@@ -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
diff --git a/plugins/configure.ac b/plugins/configure.ac
index 7aff9875edf..f10d180324d 100644
--- a/plugins/configure.ac
+++ b/plugins/configure.ac
@@ -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])
diff --git a/plugins/ioam-plugin/Makefile.am b/plugins/ioam-plugin/Makefile.am
index e62525f155a..47ff11671f9 100644
--- a/plugins/ioam-plugin/Makefile.am
+++ b/plugins/ioam-plugin/Makefile.am
@@ -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
+
+vppapitestplugins_LTLIBRARIES = ioam_pot_test_plugin.la
+vppplugins_LTLIBRARIES = ioam_pot_plugin.la
-lib_LTLIBRARIES = ioam_pot_plugin.la ioam_pot_test_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))
diff --git a/plugins/ioam-plugin/configure.ac b/plugins/ioam-plugin/configure.ac
index 8c828575565..27fda7346b4 100644
--- a/plugins/ioam-plugin/configure.ac
+++ b/plugins/ioam-plugin/configure.ac
@@ -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])
diff --git a/plugins/sample-plugin/Makefile.am b/plugins/sample-plugin/Makefile.am
index 30b17194aed..0b213791c1a 100644
--- a/plugins/sample-plugin/Makefile.am
+++ b/plugins/sample-plugin/Makefile.am
@@ -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))
diff --git a/plugins/sample-plugin/configure.ac b/plugins/sample-plugin/configure.ac
index a825730574f..43642732950 100644
--- a/plugins/sample-plugin/configure.ac
+++ b/plugins/sample-plugin/configure.ac
@@ -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])
diff --git a/plugins/sixrd-plugin/Makefile.am b/plugins/sixrd-plugin/Makefile.am
index c2fae798c78..71c8da48420 100644
--- a/plugins/sixrd-plugin/Makefile.am
+++ b/plugins/sixrd-plugin/Makefile.am
@@ -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
+
+vppplugins_LTLIBRARIES = libsixrd_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/libsixrd_plugin.so /usr/lib/vpp_plugins
-endif
+ @(cd $(vpppluginsdir) && $(RM) $(vppplugins_LTLIBRARIES))
diff --git a/plugins/sixrd-plugin/configure.ac b/plugins/sixrd-plugin/configure.ac
index 1652c87f644..3aa4c425158 100644
--- a/plugins/sixrd-plugin/configure.ac
+++ b/plugins/sixrd-plugin/configure.ac
@@ -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])
diff --git a/plugins/snat-plugin/Makefile.am b/plugins/snat-plugin/Makefile.am
index 11b0839a6c9..0fe694cf7bd 100644
--- a/plugins/snat-plugin/Makefile.am
+++ b/plugins/snat-plugin/Makefile.am
@@ -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))
diff --git a/plugins/snat-plugin/configure.ac b/plugins/snat-plugin/configure.ac
index e10b18ac2ee..9af139e4073 100644
--- a/plugins/snat-plugin/configure.ac
+++ b/plugins/snat-plugin/configure.ac
@@ -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])
diff --git a/plugins/vcgn-plugin/Makefile.am b/plugins/vcgn-plugin/Makefile.am
index f9705d05d1c..927f35b6001 100644
--- a/plugins/vcgn-plugin/Makefile.am
+++ b/plugins/vcgn-plugin/Makefile.am
@@ -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))
diff --git a/plugins/vcgn-plugin/configure.ac b/plugins/vcgn-plugin/configure.ac
index 5bc8bd9d876..f9c365affae 100644
--- a/plugins/vcgn-plugin/configure.ac
+++ b/plugins/vcgn-plugin/configure.ac
@@ -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])