Debian Codegraph @

madrisan-nagios-plugins-linux/nagios-plugins-linux/plugins/Makefile.am

raw
1 ## Process this file with automake to produce Makefile.in
2
3 ## Copyright (c) 2014-2024 Davide Madrisan <[email protected]>
4 ##
5 ## This program is free software: you can redistribute it and/or modify
6 ## it under the terms of the GNU General Public License as published by
7 ## the Free Software Foundation, either version 3 of the License, or
8 ## (at your option) any later version.
9 ##
10 ## This program is distributed in the hope that it will be useful,
11 ## but WITHOUT ANY WARRANTY; without even the implied warranty of
12 ## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 ## GNU General Public License for more details.
14 ##
15 ## You should have received a copy of the GNU General Public License
16 ## along with this program. If not, see <http://www.gnu.org/licenses/>.
17
18 AM_CPPFLAGS = \
19 -include $(top_builddir)/config.h \
20 -I$(top_srcdir)/include \
21 -DMULTIPATHD_SOCKET=\"$(MULTIPATHD_SOCKET)\" \
22 -DDOCKER_SOCKET=\"$(DOCKER_SOCKET)\" \
23 -DPODMAN_SOCKET=\"$(PODMAN_SOCKET)\"
24
25 AM_CFLAGS = $(LIBPROCPS_CFLAGS)
26 AM_LDFLAGS = $(LIBPROCPS_LIBS)
27
28 LN_S=@LN_S@
29
30 check_cpu_programs = check_iowait
31 check_network_programs = \
32 check_network_collisions \
33 check_network_dropped \
34 check_network_errors \
35 check_network_multicast
36
37 libexec_PROGRAMS = \
38 check_clock \
39 check_cpu \
40 check_cpufreq \
41 check_cswch \
42 check_fc \
43 check_filecount \
44 check_ifmountfs \
45 check_intr \
46 check_multipath \
47 check_nbprocs \
48 check_network \
49 check_paging \
50 check_pressure \
51 check_readonlyfs \
52 check_selinux \
53 check_temperature \
54 check_tcpcount \
55 check_uptime \
56 check_users
57
58 if HAVE_GETLOADAVG
59 libexec_PROGRAMS += \
60 check_load
61 endif
62 if HAVE_LIBCURL
63 libexec_PROGRAMS += \
64 check_container
65 endif
66 if HAVE_PROC_MEMINFO
67 libexec_PROGRAMS += \
68 check_memory \
69 check_swap
70 endif
71
72 check_clock_SOURCES = check_clock.c
73 check_cpu_SOURCES = check_cpu.c
74 check_cpufreq_SOURCES = check_cpufreq.c
75 check_cswch_SOURCES = check_cswch.c
76 check_fc_SOURCES = check_fc.c
77 check_filecount_SOURCES = check_filecount.c
78 check_ifmountfs_SOURCES = check_ifmountfs.c
79 check_intr_SOURCES = check_intr.c
80 if HAVE_GETLOADAVG
81 check_load_SOURCES = check_load.c
82 endif
83 if HAVE_LIBCURL
84 check_container_SOURCES = check_container.c
85 endif
86 if HAVE_PROC_MEMINFO
87 check_memory_SOURCES = check_memory.c
88 endif
89 check_multipath_SOURCES = check_multipath.c
90 check_nbprocs_SOURCES = check_nbprocs.c
91 check_network_SOURCES = check_network.c
92 check_paging_SOURCES = check_paging.c
93 check_pressure_SOURCES = check_pressure.c
94 check_readonlyfs_SOURCES = check_readonlyfs.c
95 check_selinux_SOURCES = check_selinux.c
96 if HAVE_PROC_MEMINFO
97 check_swap_SOURCES = check_swap.c
98 endif
99 check_tcpcount_SOURCES = check_tcpcount.c
100 check_temperature_SOURCES = check_temperature.c
101 check_uptime_SOURCES = check_uptime.c
102 check_users_SOURCES = check_users.c
103
104 LDADD = $(top_builddir)/lib/libutils.a
105
106 check_clock_LDADD = $(LDADD)
107 check_cpu_LDADD = $(LDADD)
108 check_cpufreq_LDADD = $(LDADD)
109 check_cswch_LDADD = $(LDADD)
110 check_fc_LDADD = $(LDADD)
111 check_filecount_LDADD = $(LDADD)
112 check_ifmountfs_LDADD = $(LDADD)
113 check_intr_LDADD = $(LDADD)
114 if HAVE_GETLOADAVG
115 check_load_LDADD = $(LDADD)
116 endif
117 if HAVE_LIBCURL
118 check_container_LDADD = $(LDADD) $(LIBCURL) -lm
119 endif
120 if HAVE_PROC_MEMINFO
121 check_memory_LDADD = $(LDADD) $(LIBPROCPS_LIBS)
122 endif
123 check_nbprocs_LDADD = $(LDADD)
124 check_network_LDADD = $(LDADD) $(CEIL_LIBS)
125 check_multipath_LDADD = $(LDADD)
126 check_paging_LDADD = $(LDADD) $(LIBPROCPS_LIBS)
127 check_readonlyfs_LDADD = $(LDADD)
128 check_selinux_LDADD = $(LDADD)
129 if HAVE_PROC_MEMINFO
130 check_swap_LDADD = $(LDADD)
131 endif
132 check_tcpcount_LDADD = $(LDADD)
133 check_temperature_LDADD = $(LDADD)
134 check_uptime_LDADD = $(LDADD) $(CLOCK_LIBS)
135 check_users_LDADD = $(LDADD)
136
137 all-local: $(check_cpu_programs) $(check_network_programs)
138
139 $(check_cpu_programs): check_cpu
140 rm -f $@
141 $(LN_S) check_cpu $@
142
143 $(check_network_programs): check_network
144 rm -f $@
145 $(LN_S) check_network $@
146
147 install-exec-hook:
148 cd $(DESTDIR)$(libexecdir) && \
149 for i in $(check_cpu_programs) ; do rm -f $$i; ln -s check_cpu $$i ; done && \
150 for i in $(check_network_programs) ; do rm -f $$i; ln -s check_network $$i ; done
151
152 clean-local:
153 rm -f $(check_cpu_programs)
154
155 uninstall-local:
156 cd $(DESTDIR)$(libexecdir) && rm -f $(check_cpu_programs)