summaryrefslogtreecommitdiffstats
path: root/plugins
diff options
context:
space:
mode:
authorDamjan Marion <damarion@cisco.com>2016-07-07 20:27:49 +0200
committerDave Barach <openvpp@barachs.net>2016-07-08 10:43:38 +0000
commit905a7f5520a64aad545c8dd02796b56f88ed2d38 (patch)
treefb2da8de6ac2bbf1a35bcf2b87251c9a94a23fc8 /plugins
parent370e9e38e8e0b35810734125e2b6eeac65fefa5d (diff)
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>
Diffstat (limited to 'plugins')
-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
15 files changed, 79 insertions, 314 deletions
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])