Makefile.in 2.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104
  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_DIR=@initdir@
  22. INIT_OPTS=-o root -g root
  23. INIT_FILE=@initname@
  24. INETD_DIR=@inetddir@
  25. INETD_FILE=@inetdname@
  26. SRC_INETD=@src_inetd@
  27. SRC_INIT=@src_init@
  28. all:
  29. cd $(SRC_BASE); $(MAKE); cd ..
  30. @echo ""
  31. @echo "*** Compile finished ***"
  32. @echo ""
  33. @echo "If the NRPE daemon and client compiled without any errors, you"
  34. @echo "can continue with the installation or upgrade process."
  35. @echo ""
  36. @echo "Read the PDF documentation (NRPE.pdf) for information on the next"
  37. @echo "steps you should take to complete the installation or upgrade."
  38. @echo ""
  39. nrpe:
  40. cd $(SRC_BASE); $(MAKE); cd ..
  41. check_nrpe:
  42. cd $(SRC_BASE); $(MAKE); cd ..
  43. install-plugin:
  44. cd $(SRC_BASE); $(MAKE) $@; cd ..
  45. install-daemon:
  46. cd $(SRC_BASE); $(MAKE) $@; cd ..
  47. install:
  48. install-inetd:
  49. @if test $(SRC_INETD) = unknown; then \
  50. echo No inetd file to install; \
  51. exit 1; \
  52. fi
  53. $(INSTALL) -m 644 startup/$(SRC_INETD) $(INETD_DIR)/$(INETD_FILE)
  54. install-init:
  55. @if test $(SRC_INIT) = unknown; then \
  56. echo No init file to install; \
  57. exit 1; \
  58. fi
  59. $(INSTALL) -m 644 startup/$(SRC_INIT) $(INIT_DIR)/$(INIT_FILE)
  60. install-config:
  61. $(INSTALL) -m 775 $(NAGIOS_INSTALL_OPTS) -d $(CFGDIR)
  62. $(INSTALL) -m 644 $(NRPE_INSTALL_OPTS) sample-config/nrpe.cfg $(CFGDIR)
  63. solaris-package:
  64. @if [ `uname -s` != "SunOS" ] ; then \
  65. echo "It is recommended you be running on Solaris to build a Solaris package"; \
  66. else \
  67. cd package/solaris; $(MAKE) build ; $(MAKE) pkg ; cd ../..; \
  68. fi
  69. clean:
  70. cd $(SRC_BASE); $(MAKE) $@; cd ..
  71. cd package/solaris; $(MAKE) $@; cd ../..
  72. rm -f core
  73. rm -f *~ */*~
  74. distclean: clean
  75. cd $(SRC_BASE); $(MAKE) $@; cd ..
  76. cd package/solaris; $(MAKE) $@; cd ../..
  77. rm -rf autom4te.cache
  78. rm -f config.log config.status config.cache sample-config/nrpe.cfg $(SRC_INCLUDE)/config.h
  79. rm -f startup/bsd-init startup/debian-init startup/default-init startup/default-inetd
  80. rm -f startup/default-service startup/default-xinetd startup/mac-org.nagios.PKG_NAME.plist
  81. rm -f startup/openrc-conf startup/openrc-init startup/solaris-PKG_NAME.xml
  82. rm -f Makefile
  83. devclean: distclean