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 ++++++++++++++------------------ 1 file changed, 14 insertions(+), 18 deletions(-) (limited to 'plugins/snat-plugin/Makefile.am') 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)) -- cgit 1.2.3-korg