Makefile.am 2.7 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667
  1. # not a GNU package. You can remove this line, if
  2. # have all needed files, that a GNU package needs
  3. AUTOMAKE_OPTIONS = foreign 1.4
  4. ACLOCAL_AMFLAGS = -I m4
  5. EXTRA_DIST = ChangeLog COPYING LICENSE suricata.yaml.in \
  6. threshold.config \
  7. $(SURICATA_UPDATE_DIR) \
  8. lua \
  9. acsite.m4 \
  10. scripts/generate-images.sh
  11. SUBDIRS = $(HTP_DIR) rust src qa rules doc contrib etc python ebpf \
  12. $(SURICATA_UPDATE_DIR)
  13. CLEANFILES = stamp-h[0-9]*
  14. install-data-am:
  15. @echo "Run 'make install-conf' if you want to install initial configuration files. Or 'make install-full' to install configuration and rules";
  16. install-full:
  17. $(MAKE) install
  18. $(MAKE) install-conf
  19. $(MAKE) install-rules
  20. install-conf:
  21. install -d "$(DESTDIR)$(e_sysconfdir)"
  22. @test -e "$(DESTDIR)$(e_sysconfdir)/suricata.yaml" || install -m 600 "$(top_srcdir)/suricata.yaml" "$(DESTDIR)$(e_sysconfdir)"
  23. @test -e "$(DESTDIR)$(e_sysconfdir)/classification.config" || install -m 600 "$(top_srcdir)/etc/classification.config" "$(DESTDIR)$(e_sysconfdir)"
  24. @test -e "$(DESTDIR)$(e_sysconfdir)/reference.config" || install -m 600 "$(top_srcdir)/etc/reference.config" "$(DESTDIR)$(e_sysconfdir)"
  25. @test -e "$(DESTDIR)$(e_sysconfdir)/threshold.config" || install -m 600 "$(top_srcdir)/threshold.config" "$(DESTDIR)$(e_sysconfdir)"
  26. install -d "$(DESTDIR)$(e_logfilesdir)"
  27. install -d "$(DESTDIR)$(e_logcertsdir)"
  28. install -d "$(DESTDIR)$(e_rundir)"
  29. install -m 770 -d "$(DESTDIR)$(e_localstatedir)"
  30. install-rules:
  31. if INSTALL_SURICATA_UPDATE
  32. LD_LIBRARY_PATH=$(libdir) $(DESTDIR)$(bindir)/suricata-update \
  33. --suricata $(DESTDIR)$(bindir)/suricata \
  34. --suricata-conf $(DESTDIR)$(sysconfdir)/suricata/suricata.yaml \
  35. --no-test --no-reload
  36. else
  37. @echo ""
  38. @echo "Warning: No rules will be downloaded as suricata-update"
  39. @echo " is not available: ${install_suricata_update_reason}"
  40. endif
  41. @echo ""
  42. @echo "You can now start suricata by running as root something like:"
  43. @echo " $(DESTDIR)$(bindir)/suricata -c $(DESTDIR)$(e_sysconfdir)suricata.yaml -i eth0"
  44. @echo ""
  45. @echo "If a library like libhtp.so is not found, you can run suricata with:"
  46. @echo " LD_LIBRARY_PATH="$(DESTDIR)$(prefix)/lib" "$(DESTDIR)$(bindir)/suricata" -c "$(DESTDIR)$(e_sysconfdir)suricata.yaml" -i eth0"
  47. @echo ""
  48. @echo "The Emerging Threats Open rules are now installed. Rules can be"
  49. @echo "updated and managed with the suricata-update tool."
  50. @echo ""
  51. @echo "For more information please see:"
  52. @echo " https://suricata.readthedocs.io/en/latest/rule-management/index.html"
  53. @echo ""
  54. install-library:
  55. cd src && $(MAKE) $@
  56. cd rust && $(MAKE) $@
  57. $(INSTALL) libsuricata-config "$(DESTDIR)$(bindir)/libsuricata-config"
  58. install-headers:
  59. cd src && $(MAKE) $@