1 ## Process this file with automake to produce Makefile.in
3 VPATH = $(top_srcdir) $(top_srcdir)/lib $(top_srcdir)/plugins $(top_srcdir)/plugins/t
5 INCLUDES = -I.. -I$(top_srcdir)/lib -I$(top_srcdir)/intl \
6 @LDAPINCLUDE@ @PGINCLUDE@
8 datadir = @datadir@
9 localedir = $(datadir)/locale
10 DEFS = -DLOCALEDIR=\"$(localedir)\" @DEFS@
11 LIBS = @LIBINTL@ @LIBS@ @SSLINCLUDE@
13 libexec_PROGRAMS = check_dhcp check_disk check_dummy check_http check_load \
14 check_mrtg check_mrtgtraf check_nwstat check_overcr check_ping \
15 check_real check_smtp check_ssh check_tcp check_time \
16 check_udp check_ups check_users negate urlize check_icmp \
17 @EXTRAS@
19 check_tcp_programs = check_ftp check_imap check_nntp check_pop check_udp2 \
20 @check_tcp_ssl@
22 EXTRA_PROGRAMS = check_mysql check_radius check_pgsql check_snmp check_hpjd \
23 check_swap check_fping check_ldap check_game check_dig \
24 check_nagios check_by_ssh check_dns check_nt check_ide_smart check_procs
26 EXTRA_DIST = t utils.c netutils.c popen.c utils.h netutils.h popen.h common.h \
27 getaddrinfo.c getaddrinfo.h gethostbyname.c gethostbyname.h
29 PLUGINHDRS = common.h
31 BASEOBJS = utils.o ../lib/libnagiosplug.a ../lib/libcoreutils.a
32 NETOBJS = netutils.o $(BASEOBJS) $(EXTRA_NETOBJS)
33 NETLIBS = $(NETOBJS) $(SOCKETLIBS)
35 TESTS_ENVIRONMENT = perl -I $(top_builddir) -I $(top_srcdir)
37 TESTS = @PLUGIN_TEST@
39 test:
40 perl -I $(top_builddir) -I $(top_srcdir) ../test.pl
42 AM_INSTALL_PROGRAM_FLAGS = @INSTALL_OPTS@
44 ##############################################################################
45 # the actual targets
47 check_dhcp_LDADD = $(NETLIBS)
48 check_dig_LDADD = $(NETLIBS) popen.o
49 check_disk_LDADD = $(BASEOBJS) popen.o
50 check_dns_LDADD = $(NETLIBS) popen.o
51 check_dummy_LDADD = $(BASEOBJS)
52 check_fping_LDADD = $(NETLIBS) popen.o
53 check_game_LDADD = $(BASEOBJS) popen.o
54 check_http_LDADD = $(NETLIBS) $(SSLLIBS)
55 check_hpjd_LDADD = $(NETLIBS) popen.o
56 check_icmp_LDADD = $(NETLIBS)
57 check_ldap_LDADD = $(NETLIBS) $(LDAPLIBS)
58 check_load_LDADD = $(BASEOBJS) popen.o
59 check_mrtg_LDADD = $(BASEOBJS)
60 check_mrtgtraf_LDADD = $(BASEOBJS)
61 check_mysql_LDADD = $(NETLIBS) $(MYSQLLIBS)
62 check_nagios_LDADD = $(BASEOBJS) popen.o
63 check_nt_LDADD = $(NETLIBS)
64 check_nwstat_LDADD = $(NETLIBS)
65 check_overcr_LDADD = $(NETLIBS)
66 check_pgsql_LDADD = $(NETLIBS) $(PGLIBS)
67 check_ping_LDADD = $(NETLIBS) popen.o
68 check_procs_LDADD = $(BASEOBJS) popen.o
69 check_radius_LDADD = $(NETLIBS) $(RADIUSLIBS)
70 check_real_LDADD = $(NETLIBS)
71 check_snmp_LDADD = $(BASEOBJS) popen.o
72 check_smtp_LDADD = $(NETLIBS)
73 check_ssh_LDADD = $(NETLIBS)
74 check_swap_LDADD = $(BASEOBJS) popen.o
75 check_tcp_LDADD = $(NETLIBS) $(SSLLIBS)
76 check_time_LDADD = $(NETLIBS)
77 check_udp_LDADD = $(NETLIBS)
78 check_ups_LDADD = $(NETLIBS)
79 check_users_LDADD = $(BASEOBJS) popen.o
80 check_by_ssh_LDADD = $(NETLIBS) popen.o
81 check_ide_smart_LDADD = $(BASEOBJS)
82 negate_LDADD = $(BASEOBJS) popen.o
83 urlize_LDADD = $(BASEOBJS) popen.o
85 check_dhcp_DEPENDENCIES = check_dhcp.c $(NETOBJS) $(DEPLIBS)
86 check_dig_DEPENDENCIES = check_dig.c $(NETOBJS) popen.o $(DEPLIBS)
87 check_disk_DEPENDENCIES = check_disk.c $(BASEOBJS) popen.o $(DEPLIBS)
88 check_dns_DEPENDENCIES = check_dns.c $(NETOBJS) popen.o $(DEPLIBS)
89 check_dummy_DEPENDENCIES = check_dummy.c $(DEPLIBS)
90 check_fping_DEPENDENCIES = check_fping.c $(NETOBJS) popen.o $(DEPLIBS)
91 check_game_DEPENDENCIES = check_game.c $(DEPLIBS)
92 check_http_DEPENDENCIES = check_http.c $(NETOBJS) $(DEPLIBS)
93 check_hpjd_DEPENDENCIES = check_hpjd.c $(NETOBJS) popen.o $(DEPLIBS)
94 check_icmp_DEPENDENCIES = check_icmp.c $(DEPLIBS) $(NETOBJS)
95 check_ide_smart_DEPENDENCIES = check_ide_smart.c $(BASEOBJS) $(DEPLIBS)
96 check_ldap_DEPENDENCIES = check_ldap.c $(NETOBJS) $(DEPLIBS)
97 check_load_DEPENDENCIES = check_load.c $(BASEOBJS) popen.o $(DEPLIBS)
98 check_mrtg_DEPENDENCIES = check_mrtg.c $(DEPLIBS)
99 check_mrtgtraf_DEPENDENCIES = check_mrtgtraf.c $(DEPLIBS)
100 check_mysql_DEPENDENCIES = check_mysql.c $(NETOBJS) $(DEPLIBS)
101 check_nagios_DEPENDENCIES = check_nagios.c $(BASEOBJS) popen.o $(DEPLIBS)
102 check_nt_DEPENDENCIES = check_nt.c $(NETOBJS) $(DEPLIBS)
103 check_nwstat_DEPENDENCIES = check_nwstat.c $(NETOBJS) $(DEPLIBS)
104 check_overcr_DEPENDENCIES = check_overcr.c $(NETOBJS) $(DEPLIBS)
105 check_pgsql_DEPENDENCIES = check_pgsql.c $(NETOBJS) $(DEPLIBS)
106 check_ping_DEPENDENCIES = check_ping.c $(NETOBJS) popen.o $(DEPLIBS)
107 check_procs_DEPENDENCIES = check_procs.c $(BASEOBJS) popen.o $(DEPLIBS)
108 check_radius_DEPENDENCIES = check_radius.c $(NETOBJS) $(DEPLIBS)
109 check_real_DEPENDENCIES = check_real.c $(NETOBJS) $(DEPLIBS)
110 check_snmp_DEPENDENCIES = check_snmp.c $(BASEOBJS) popen.o $(DEPLIBS)
111 check_smtp_DEPENDENCIES = check_smtp.c $(NETOBJS) $(DEPLIBS)
112 check_ssh_DEPENDENCIES = check_ssh.c $(NETOBJS) $(DEPLIBS)
113 check_swap_DEPENDENCIES = check_swap.c $(BASEOBJS) popen.o $(DEPLIBS)
114 check_tcp_DEPENDENCIES = check_tcp.c $(NETOBJS) $(DEPLIBS)
115 check_time_DEPENDENCIES = check_time.c $(NETOBJS) $(DEPLIBS)
116 check_udp_DEPENDENCIES = check_udp.c $(NETOBJS) $(DEPLIBS)
117 check_ups_DEPENDENCIES = check_ups.c $(NETOBJS) $(DEPLIBS)
118 check_users_DEPENDENCIES = check_users.c $(BASEOBJS) popen.o $(DEPLIBS)
119 check_by_ssh_DEPENDENCIES = check_by_ssh.c $(NETOBJS) popen.o $(DEPLIBS)
120 negate_DEPENDENCIES = negate.c $(BASEOBJS) popen.o $(DEPLIBS)
121 urlize_DEPENDENCIES = urlize.c $(BASEOBJS) popen.o $(DEPLIBS)
123 ##############################################################################
124 # secondary dependencies
126 popen.o: popen.c popen.h $(PLUGINHDRS)
128 utils.o: utils.c utils.h $(PLUGINHDRS)
130 netutils.o: netutils.c netutils.h $(PLUGINHDRS)
132 getaddrinfo.o: getaddrinfo.h $(PLUGINHDRS)
134 gethostbyname.o: gethostbyname.h $(PLUGINHDRS)
136 all-local: $(check_tcp_programs)
138 $(check_tcp_programs): check_tcp
139 rm -f $@
140 ln -s check_tcp $@
142 install-exec-hook:
143 cd $(DESTDIR)$(libexecdir) && \
144 for i in $(check_tcp_programs) ; do rm -f $$i; ln -s check_tcp $$i ; done ;\
145 rm -f check_ldaps ; ln -s -f check_ldap check_ldaps
147 clean-local:
148 rm -f $(check_tcp_programs)
150 uninstall-local:
151 cd $(DESTDIR)$(libexecdir) && rm -f $(check_tcp_programs)