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)/gl -I$(top_srcdir)/intl @LDAPINCLUDE@ @PGINCLUDE@ @SSLINCLUDE@
8 localedir = $(datadir)/locale
9 DEFS = -DLOCALEDIR=\"$(localedir)\" @DEFS@
10 LIBS = @LIBINTL@ @LIBS@
13 # This is not portable. Run ". tools/devmode" to get development compile flags
16 libexec_PROGRAMS = check_apt check_cluster check_disk check_dummy check_http check_load \
17 check_mrtg check_mrtgtraf check_ntp check_ntp_peer check_nwstat check_overcr check_ping \
18 check_real check_smtp check_ssh check_tcp check_time check_ntp_time \
19 check_ups check_users negate \
22 check_tcp_programs = check_ftp check_imap check_nntp check_pop \
23 check_udp check_clamd @check_tcp_ssl@
25 EXTRA_PROGRAMS = check_mysql check_radius check_pgsql check_snmp check_hpjd \
26 check_swap check_fping check_ldap check_game check_dig \
27 check_nagios check_by_ssh check_dns check_nt check_ide_smart \
28 check_procs check_mysql_query check_apt
30 EXTRA_DIST = t utils.c netutils.c sslutils.c popen.c utils.h netutils.h \
31 popen.h common.h runcmd.c runcmd.h
35 BASEOBJS = utils.o ../lib/libnagiosplug.a ../gl/libgnu.a
36 NETOBJS = netutils.o $(BASEOBJS) $(EXTRA_NETOBJS)
38 NETLIBS = $(NETOBJS) $(SOCKETLIBS)
40 TESTS_ENVIRONMENT = perl -I $(top_builddir) -I $(top_srcdir)
45 perl -I $(top_builddir) -I $(top_srcdir) ../test.pl
48 NPTEST_DEBUG=1 HARNESS_VERBOSE=1 perl -I $(top_builddir) -I $(top_srcdir) ../test.pl
50 ##############################################################################
53 check_apt_LDADD = $(BASEOBJS) runcmd.o
54 check_cluster_LDADD = $(BASEOBJS)
55 check_dig_LDADD = $(NETLIBS) runcmd.o
56 check_disk_LDADD = $(BASEOBJS) popen.o
57 check_dns_LDADD = $(NETLIBS) runcmd.o
58 check_dummy_LDADD = $(BASEOBJS)
59 check_fping_LDADD = $(NETLIBS) popen.o
60 check_game_LDADD = $(BASEOBJS) runcmd.o
61 check_http_LDADD = $(SSLOBJS) $(NETLIBS) $(SSLLIBS)
62 check_hpjd_LDADD = $(NETLIBS) popen.o
63 check_ldap_LDADD = $(NETLIBS) $(LDAPLIBS)
64 check_load_LDADD = $(BASEOBJS) popen.o
65 check_mrtg_LDADD = $(BASEOBJS)
66 check_mrtgtraf_LDADD = $(BASEOBJS)
67 check_mysql_CFLAGS = $(MYSQLCFLAGS)
68 check_mysql_CPPFLAGS = $(MYSQLINCLUDE)
69 check_mysql_LDADD = $(NETLIBS) $(MYSQLLIBS)
70 check_mysql_query_CFLAGS = $(MYSQLCFLAGS)
71 check_mysql_query_CPPFLAGS = $(MYSQLINCLUDE)
72 check_mysql_query_LDADD = $(NETLIBS) $(MYSQLLIBS)
73 check_nagios_LDADD = $(BASEOBJS) runcmd.o
74 check_nt_LDADD = $(NETLIBS)
75 check_ntp_LDADD = $(NETLIBS) $(MATHLIBS)
76 check_ntp_peer_LDADD = $(NETLIBS) $(MATHLIBS)
77 check_nwstat_LDADD = $(NETLIBS)
78 check_overcr_LDADD = $(NETLIBS)
79 check_pgsql_LDADD = $(NETLIBS) $(PGLIBS)
80 check_ping_LDADD = $(NETLIBS) popen.o
81 check_procs_LDADD = $(BASEOBJS) popen.o
82 check_radius_LDADD = $(NETLIBS) $(RADIUSLIBS)
83 check_real_LDADD = $(NETLIBS)
84 check_snmp_LDADD = $(BASEOBJS) popen.o
85 check_smtp_LDADD = $(SSLOBJS) $(NETLIBS) $(SSLLIBS)
86 check_ssh_LDADD = $(NETLIBS)
87 check_swap_LDADD = $(MATHLIBS) $(BASEOBJS) popen.o
88 check_tcp_LDADD = $(SSLOBJS) $(NETLIBS) $(SSLLIBS)
89 check_time_LDADD = $(NETLIBS)
90 check_ntp_time_LDADD = $(NETLIBS) $(MATHLIBS)
91 check_ups_LDADD = $(NETLIBS)
92 check_users_LDADD = $(BASEOBJS) popen.o
93 check_by_ssh_LDADD = $(NETLIBS) runcmd.o
94 check_ide_smart_LDADD = $(BASEOBJS)
95 negate_LDADD = $(BASEOBJS)
96 urlize_LDADD = $(BASEOBJS) popen.o
98 check_apt_DEPENDENCIES = check_apt.c $(BASEOBJS) runcmd.o $(DEPLIBS)
99 check_cluster_DEPENDENCIES = check_cluster.c $(BASEOBJS) $(DEPLIBS)
100 check_dig_DEPENDENCIES = check_dig.c $(NETOBJS) runcmd.o $(DEPLIBS)
101 check_disk_DEPENDENCIES = check_disk.c $(BASEOBJS) popen.o $(DEPLIBS)
102 check_dns_DEPENDENCIES = check_dns.c $(NETOBJS) runcmd.o $(DEPLIBS)
103 check_dummy_DEPENDENCIES = check_dummy.c $(DEPLIBS)
104 check_fping_DEPENDENCIES = check_fping.c $(NETOBJS) popen.o $(DEPLIBS)
105 check_game_DEPENDENCIES = check_game.c $(DEPLIBS) runcmd.o
106 check_http_DEPENDENCIES = check_http.c $(SSLOBJS) $(NETOBJS) $(DEPLIBS)
107 check_hpjd_DEPENDENCIES = check_hpjd.c $(NETOBJS) popen.o $(DEPLIBS)
108 check_ide_smart_DEPENDENCIES = check_ide_smart.c $(BASEOBJS) $(DEPLIBS)
109 check_ldap_DEPENDENCIES = check_ldap.c $(NETOBJS) $(DEPLIBS)
110 check_load_DEPENDENCIES = check_load.c $(BASEOBJS) popen.o $(DEPLIBS)
111 check_mrtg_DEPENDENCIES = check_mrtg.c $(DEPLIBS)
112 check_mrtgtraf_DEPENDENCIES = check_mrtgtraf.c $(DEPLIBS)
113 check_mysql_DEPENDENCIES = check_mysql.c $(NETOBJS) $(DEPLIBS)
114 check_mysql_query_DEPENDENCIES = check_mysql_query.c $(NETOBJS) $(DEPLIBS)
115 check_nagios_DEPENDENCIES = check_nagios.c $(BASEOBJS) runcmd.o $(DEPLIBS)
116 check_nt_DEPENDENCIES = check_nt.c $(NETOBJS) $(DEPLIBS)
117 check_ntp_DEPENDENCIES = check_ntp.c $(NETOBJS) $(DEPLIBS)
118 check_ntp_peer_DEPENDENCIES = check_ntp_peer.c $(NETOBJS) $(DEPLIBS)
119 check_nwstat_DEPENDENCIES = check_nwstat.c $(NETOBJS) $(DEPLIBS)
120 check_overcr_DEPENDENCIES = check_overcr.c $(NETOBJS) $(DEPLIBS)
121 check_pgsql_DEPENDENCIES = check_pgsql.c $(NETOBJS) $(DEPLIBS)
122 check_ping_DEPENDENCIES = check_ping.c $(NETOBJS) popen.o $(DEPLIBS)
123 check_procs_DEPENDENCIES = check_procs.c $(BASEOBJS) popen.o $(DEPLIBS)
124 check_radius_DEPENDENCIES = check_radius.c $(NETOBJS) $(DEPLIBS)
125 check_real_DEPENDENCIES = check_real.c $(NETOBJS) $(DEPLIBS)
126 check_snmp_DEPENDENCIES = check_snmp.c $(BASEOBJS) popen.o $(DEPLIBS)
127 check_smtp_DEPENDENCIES = check_smtp.c $(SSLOBJS) $(NETOBJS) $(DEPLIBS)
128 check_ssh_DEPENDENCIES = check_ssh.c $(NETOBJS) $(DEPLIBS)
129 check_swap_DEPENDENCIES = check_swap.c $(BASEOBJS) popen.o $(DEPLIBS)
130 check_tcp_DEPENDENCIES = check_tcp.c $(SSLOBJS) $(NETOBJS) $(DEPLIBS)
131 check_time_DEPENDENCIES = check_time.c $(NETOBJS) $(DEPLIBS)
132 check_ntp_time_DEPENDENCIES = check_ntp_time.c $(NETOBJS) $(DEPLIBS)
133 check_ups_DEPENDENCIES = check_ups.c $(NETOBJS) $(DEPLIBS)
134 check_users_DEPENDENCIES = check_users.c $(BASEOBJS) popen.o $(DEPLIBS)
135 check_by_ssh_DEPENDENCIES = check_by_ssh.c $(NETOBJS) runcmd.o $(DEPLIBS)
136 negate_DEPENDENCIES = negate.c $(BASEOBJS) $(DEPLIBS)
137 urlize_DEPENDENCIES = urlize.c $(BASEOBJS) popen.o $(DEPLIBS)
139 ##############################################################################
140 # secondary dependencies
142 popen.o: popen.c popen.h $(PLUGINHDRS)
144 runcmd.o: runcmd.c runcmd.h $(PLUGINHDRS)
146 utils.o: utils.c utils.h $(PLUGINHDRS)
148 netutils.o: netutils.c netutils.h $(PLUGINHDRS)
149 sslutils.o: sslutils.c netutils.h $(PLUGINHDRS)
151 getaddrinfo.o: getaddrinfo.h $(PLUGINHDRS)
153 gethostbyname.o: gethostbyname.h $(PLUGINHDRS)
155 all-local: $(check_tcp_programs)
157 $(check_tcp_programs): check_tcp
162 cd $(DESTDIR)$(libexecdir) && \
163 for i in $(check_tcp_programs) ; do rm -f $$i; ln -s check_tcp $$i ; done ;\
164 if [ -x check_ldap ] ; then rm -f check_ldaps ; ln -s check_ldap check_ldaps ; fi
167 rm -f $(check_tcp_programs)
170 cd $(DESTDIR)$(libexecdir) && rm -f $(check_tcp_programs)