As we don't install the libraries by default, provide a make target,
"install-library" to install the libsuricata library files.
If shared library support exists, both the static and shared
libraries will be installed, otherwise only the static libraries
will be installed.
@echo "For more information please see:"
@echo " https://suricata.readthedocs.io/en/latest/rule-management/index.html"
@echo ""
+
+install-library:
+ cd src && $(MAKE) $@
+ cd rust && $(MAKE) $@
AC_SUBST(PACKAGE_VERSION)
AC_SUBST(RUST_FEATURES)
AC_SUBST(RUST_SURICATA_LIBDIR)
+AC_SUBST(RUST_SURICATA_LIBNAME)
AM_CONDITIONAL([BUILD_SHARED_LIBRARY], [test "x$enable_shared" = "xyes"] && [test "x$can_build_shared_library" = "xyes"])
fi
$(MAKE) gen/rust-bindings.h
+install-library:
+ $(MKDIR_P) "$(DESTDIR)$(libdir)"
+ $(INSTALL_DATA) $(RUST_SURICATA_LIB) "$(DESTDIR)$(libdir)"
+
+uninstall-local:
+ rm -f "$(DESTDIR)$(libdir)/$(RUST_SURICATA_LIBNAME)"
+
clean-local:
rm -rf target
if HAVE_CBINDGEN
@exit 1
endif
+if BUILD_SHARED_LIBRARY
+install-library: libsuricata.so.$(VERSION)
+else
+install-library:
+endif
+ $(MKDIR_P) "$(DESTDIR)$(libdir)"
+ $(INSTALL_DATA) libsuricata_c.a "$(DESTDIR)$(libdir)"
+if BUILD_SHARED_LIBRARY
+ $(INSTALL) libsuricata.so.$(VERSION) "$(DESTDIR)$(libdir)"
+ ln -sf libsuricata.so.$(VERSION) "$(DESTDIR)$(libdir)/libsuricata.so"
+endif
+
+uninstall-local:
+ rm -f "$(DESTDIR)$(libdir)/libsuricata_c.a"
+ rm -f "$(DESTDIR)$(libdir)/libsuricata.so"
+ rm -f "$(DESTDIR)$(libdir)/libsuricata.$(VERSION)"
+
if BUILD_FUZZTARGETS
LDFLAGS_FUZZ = $(all_libraries) $(SECLDFLAGS)