summaryrefslogtreecommitdiffstats
path: root/plugins/sample-plugin
diff options
context:
space:
mode:
Diffstat (limited to 'plugins/sample-plugin')
-rw-r--r--plugins/sample-plugin/Makefile.am25
-rw-r--r--plugins/sample-plugin/configure.ac11
2 files changed, 14 insertions, 22 deletions
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])