Makefile.in 2.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115
  1. ###############################
  2. # Makefile for NRPE
  3. #
  4. # Last Modified: 03-14-2007
  5. ###############################
  6. # Source code directories
  7. SRC_BASE=./src/
  8. SRC_INCLUDE=./include/
  9. CC=@CC@
  10. CFLAGS=@CFLAGS@ @DEFS@
  11. LDFLAGS=@LDFLAGS@ @LIBS@
  12. prefix=@prefix@
  13. exec_prefix=@exec_prefix@
  14. CFGDIR=@pkgsysconfdir@
  15. BINDIR=@bindir@
  16. SBINDIR=@sbindir@
  17. LIBEXECDIR=@libexecdir@
  18. INSTALL=@INSTALL@
  19. NAGIOS_INSTALL_OPTS=@NAGIOS_INSTALL_OPTS@
  20. NRPE_INSTALL_OPTS=@NRPE_INSTALL_OPTS@
  21. INIT_TYPE=@init_type@
  22. INIT_DIR=@initdir@
  23. INIT_OPTS=-o root -g root
  24. INIT_FILE=@initname@
  25. INETD_TYPE=@inetd_type@
  26. INETD_DIR=@inetddir@
  27. INETD_FILE=@inetdname@
  28. SRC_INETD=@src_inetd@
  29. SRC_INIT=@src_init@
  30. all:
  31. cd $(SRC_BASE); $(MAKE)
  32. @echo ""
  33. @echo "*** Compile finished ***"
  34. @echo ""
  35. @echo "If the NRPE daemon and client compiled without any errors, you"
  36. @echo "can continue with the installation or upgrade process."
  37. @echo ""
  38. @echo "Read the PDF documentation (NRPE.pdf) for information on the next"
  39. @echo "steps you should take to complete the installation or upgrade."
  40. @echo ""
  41. nrpe:
  42. cd $(SRC_BASE); $(MAKE)
  43. check_nrpe:
  44. cd $(SRC_BASE); $(MAKE)
  45. install-plugin:
  46. cd $(SRC_BASE); $(MAKE) $@
  47. install-daemon:
  48. cd $(SRC_BASE); $(MAKE) $@
  49. install:
  50. cd $(SRC_BASE); $(MAKE) $@
  51. install-inetd:
  52. @if test $(SRC_INETD) = unknown; then \
  53. echo No inetd file to install; \
  54. exit 1; \
  55. fi
  56. @if test $(INETD_TYPE) = inetd; then \
  57. grep -E -q "^\W*nrpe\s+" $(INETD_DIR)/$(INETD_FILE) || \
  58. cat startup/$(SRC_INETD) >> $(INETD_DIR)/$(INETD_FILE); \
  59. else \
  60. echo $(INSTALL) -m 644 startup/$(SRC_INETD) $(INETD_DIR)/$(INETD_FILE); \
  61. $(INSTALL) -m 644 startup/$(SRC_INETD) $(INETD_DIR)/$(INETD_FILE); \
  62. fi
  63. @grep -E -q "^nrpe[\t ]+5666/tcp" /etc/services || \
  64. echo "***** MAKE SURE 'nrpe 5666/tcp' IS IN YOUR /etc/services FILE"
  65. install-init:
  66. @if test $(SRC_INIT) = unknown; then \
  67. echo No init file to install; \
  68. exit 1; \
  69. fi
  70. $(INSTALL) -m 644 startup/$(SRC_INIT) $(INIT_DIR)/$(INIT_FILE)
  71. install-config:
  72. $(INSTALL) -m 775 $(NAGIOS_INSTALL_OPTS) -d $(CFGDIR)
  73. $(INSTALL) -m 644 $(NRPE_INSTALL_OPTS) sample-config/nrpe.cfg $(CFGDIR)
  74. solaris-package:
  75. @if [ `uname -s` != "SunOS" ] ; then \
  76. echo "It is recommended you be running on Solaris to build a Solaris package"; \
  77. else \
  78. cd package/solaris; $(MAKE) build ; $(MAKE) pkg ; cd ../..; \
  79. fi
  80. clean:
  81. cd $(SRC_BASE); $(MAKE) $@; cd ..
  82. cd package/solaris; $(MAKE) $@; cd ../..
  83. rm -f core
  84. rm -f *~ */*~
  85. distclean: clean
  86. cd $(SRC_BASE); $(MAKE) $@; cd ..
  87. cd package/solaris; $(MAKE) $@; cd ../..
  88. rm -rf autom4te.cache
  89. rm -f config.log config.status config.cache sample-config/nrpe.cfg $(SRC_INCLUDE)/config.h
  90. rm -f startup/bsd-init startup/debian-init startup/default-init startup/default-inetd
  91. rm -f startup/default-service startup/default-xinetd startup/mac-org.nagios.PKG_NAME.plist
  92. rm -f startup/openrc-conf startup/openrc-init startup/solaris-PKG_NAME.xml
  93. rm -f Makefile
  94. devclean: distclean