From 905a7f5520a64aad545c8dd02796b56f88ed2d38 Mon Sep 17 00:00:00 2001 From: Damjan Marion Date: Thu, 7 Jul 2016 20:27:49 +0200 Subject: 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 --- plugins/snat-plugin/Makefile.am | 32 ++++++++++++++------------------ plugins/snat-plugin/configure.ac | 12 +----------- 2 files changed, 15 insertions(+), 29 deletions(-) (limited to 'plugins/snat-plugin') 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]) -- cgit 1.2.3-korg