aboutsummaryrefslogtreecommitdiffstats
path: root/plugins/snat-plugin/Makefile.am
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/snat-plugin/Makefile.am
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/snat-plugin/Makefile.am')
-rw-r--r--plugins/snat-plugin/Makefile.am32
1 files changed, 14 insertions, 18 deletions
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))