summaryrefslogtreecommitdiffstats
path: root/plugins/snat-plugin/Makefile.am
diff options
context:
space:
mode:
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))