1 ## Process this file with automake to produce Makefile.in
3 VPATH = $(top_srcdir) $(top_srcdir)/lib $(top_srcdir)/plugins $(top_srcdir)/plugins/t $(srcdir)
5 INCLUDES = -I.. -I$(top_srcdir)/lib -I$(top_srcdir)/gl -I$(top_srcdir)/intl -I$(top_srcdir)/plugins @SSLINCLUDE@
8 localedir = $(datadir)/locale
9 DEFS = -DLOCALEDIR=\"$(localedir)\" @DEFS@
10 LIBS = @LIBINTL@ @LIBS@ @SSLLIBS@
12 noinst_PROGRAMS = check_dhcp check_icmp @EXTRAS_ROOT@
18 BASEOBJS = ../plugins/utils.o ../lib/libnagiosplug.a ../gl/libgnu.a
19 NETOBJS = ../plugins/netutils.o $(BASEOBJS) $(EXTRA_NETOBJS)
20 NETLIBS = $(NETOBJS) $(SOCKETLIBS)
22 TESTS_ENVIRONMENT = perl -I $(top_builddir) -I $(top_srcdir)
27 perl -I $(top_builddir) -I $(top_srcdir) ../test.pl
29 setuid_root_mode = ug=rx,u+s
31 # /* Author Coreutils team - see ACKNOWLEDGEMENTS */
34 for f in $(noinst_PROGRAMS) ; do \
36 echo " $(INSTALL_PROGRAM) $$p $(DESTDIR)$(libexecdir)/$$p"; \
37 $(INSTALL_PROGRAM) $$p $(DESTDIR)$(libexecdir)/$$p; \
38 echo " chown root $(DESTDIR)$(libexecdir)/$$p"; \
39 chown root $(DESTDIR)$(libexecdir)/$$p; \
40 echo " chmod $(setuid_root_mode) $(DESTDIR)$(libexecdir)/$$p"; \
41 chmod $(setuid_root_mode) $(DESTDIR)$(libexecdir)/$$p; \
44 install-root: $(noinst_PROGRAMS)
47 install-exec-local: $(noinst_PROGRAMS)
48 @TMPFILE=$(DESTDIR)$(libexecdir)/.setuid-$$$$; \
51 ## See if we can create a setuid root executable in $(libexecdir).
52 ## If not, then don't even try to install setuid plugins.
53 can_create_suid_root_executable=no; \
54 chown root $$TMPFILE > /dev/null 2>&1 \
55 && chmod $(setuid_root_mode) $$TMPFILE > /dev/null 2>&1 \
56 && can_create_suid_root_executable=yes; \
58 if test $$can_create_suid_root_executable = yes; then \
61 echo "WARNING: insufficient access; not installing setuid plugins"; \
62 echo "NOTE: to install setuid plugins, run 'make install-root' as root"; \
65 # /* Author Coreutils team sub-citation */
67 ##############################################################################
69 check_dhcp_LDADD = $(NETLIBS)
70 check_icmp_LDADD = $(NETLIBS) $(SOCKETLIBS)
73 check_dhcp_DEPENDENCIES = check_dhcp.c $(NETOBJS) $(DEPLIBS)
74 check_icmp_DEPENDENCIES = check_icmp.c $(NETOBJS)