a98eab1bce0a90d11f01941bf37919581fe99bbe
1 SUBDIRS = libconfig
2 if BUILD_MODULE_PING
3 SUBDIRS += libping
4 endif
6 sbin_PROGRAMS = collectd
8 collectd_SOURCES = collectd.c collectd.h \
9 utils_debug.c utils_debug.h \
10 utils_mount.c utils_mount.h \
11 common.c common.h \
12 multicast.c multicast.h \
13 plugin.c plugin.h \
14 configfile.c configfile.h
15 #collectd_CFLAGS = -DPLUGINDIR='"$(pkglibdir)"'
16 collectd_CPPFLAGS = $(LTDLINCL)
17 collectd_CPPFLAGS += -DCONFIGFILE='"${sysconfdir}/${PACKAGE_NAME}.conf"'
18 collectd_CPPFLAGS += -DPKGLOCALSTATEDIR='"${localstatedir}/lib/${PACKAGE_NAME}"'
19 if BUILD_FEATURE_DAEMON
20 collectd_CPPFLAGS += -DPIDFILE='"${localstatedir}/run/${PACKAGE_NAME}.pid"'
21 endif
22 collectd_CPPFLAGS += -DPLUGINDIR='"${pkglibdir}"'
23 if BUILD_FEATURE_DEBUG
24 collectd_CPPFLAGS += -DLOGFILE='"${localstatedir}/log/${PACKAGE_NAME}/collectd.log"'
25 endif
26 collectd_LDFLAGS = -export-dynamic
27 collectd_CFLAGS = -Wall -Werror
28 collectd_LDADD = $(LIBLTDL) libconfig/libconfig.la "-dlopen" self
29 collectd_DEPENDENCIES = $(LIBLTDL) libconfig/libconfig.la
31 pkglib_LTLIBRARIES =
33 if BUILD_MODULE_BATTERY
34 pkglib_LTLIBRARIES += battery.la
35 battery_la_SOURCES = battery.c
36 battery_la_LDFLAGS = -module -avoid-version
37 battery_la_CFLAGS = -Wall -Werror
38 collectd_LDADD += "-dlopen" battery.la
39 collectd_DEPENDENCIES += battery.la
40 endif
42 if BUILD_MODULE_CPU
43 pkglib_LTLIBRARIES += cpu.la
44 cpu_la_SOURCES = cpu.c cpu.h
45 cpu_la_LDFLAGS = -module -avoid-version
46 cpu_la_CFLAGS = -Wall -Werror
47 collectd_LDADD += "-dlopen" cpu.la
48 collectd_DEPENDENCIES += cpu.la
49 endif
51 if BUILD_MODULE_CPUFREQ
52 pkglib_LTLIBRARIES += cpufreq.la
53 cpufreq_la_SOURCES = cpufreq.c cpufreq.h
54 cpufreq_la_LDFLAGS = -module -avoid-version
55 cpufreq_la_CFLAGS = -Wall -Werror
56 collectd_LDADD += "-dlopen" cpufreq.la
57 collectd_DEPENDENCIES += cpufreq.la
58 endif
60 if BUILD_MODULE_DF
61 pkglib_LTLIBRARIES += df.la
62 df_la_SOURCES = df.c
63 df_la_LDFLAGS = -module -avoid-version
64 df_la_CFLAGS = -Wall -Werror
65 collectd_LDADD += "-dlopen" df.la
66 collectd_DEPENDENCIES += df.la
67 endif
69 if BUILD_MODULE_DISK
70 pkglib_LTLIBRARIES += disk.la
71 disk_la_SOURCES = disk.c disk.h
72 disk_la_LDFLAGS = -module -avoid-version
73 disk_la_CFLAGS = -Wall -Werror
74 collectd_LDADD += "-dlopen" disk.la
75 collectd_DEPENDENCIES += disk.la
76 endif
78 #if BUILD_MODULE_QUOTA
79 #pkglib_LTLIBRARIES += quota.la
80 #quota_la_SOURCES = quota_plugin.c quota_plugin.h
81 #quota_la_SOURCES += quota_fs.c quota_fs.h
82 #quota_la_SOURCES += quota_mnt.c quota_mnt.h
83 #quota_la_LDFLAGS = -module -avoid-version
84 #quota_la_CFLAGS = -Werror
85 #collectd_LDADD += "-dlopen" quota.la
86 #collectd_DEPENDENCIES += quota.la
87 #endif
89 if BUILD_MODULE_HDDTEMP
90 pkglib_LTLIBRARIES += hddtemp.la
91 hddtemp_la_SOURCES = hddtemp.c hddtemp.h
92 hddtemp_la_LDFLAGS = -module -avoid-version
93 hddtemp_la_CFLAGS = -Wall -Werror
94 collectd_LDADD += "-dlopen" hddtemp.la
95 collectd_DEPENDENCIES += hddtemp.la
96 endif
98 if BUILD_MODULE_LOAD
99 pkglib_LTLIBRARIES += load.la
100 load_la_SOURCES = load.c load.h
101 load_la_LDFLAGS = -module -avoid-version
102 load_la_CFLAGS = -Wall -Werror
103 collectd_LDADD += "-dlopen" load.la
104 collectd_DEPENDENCIES += load.la
105 endif
107 if BUILD_MODULE_MEMORY
108 pkglib_LTLIBRARIES += memory.la
109 memory_la_SOURCES = memory.c memory.h
110 memory_la_LDFLAGS = -module -avoid-version
111 memory_la_CFLAGS = -Wall -Werror
112 collectd_LDADD += "-dlopen" memory.la
113 collectd_DEPENDENCIES += memory.la
114 endif
116 if BUILD_MODULE_MYSQL
117 pkglib_LTLIBRARIES += mysql.la
118 mysql_la_SOURCES = mysql.c
119 mysql_la_LDFLAGS = -module -avoid-version
120 if BUILD_WITH_LIBMYSQL
121 mysql_la_LDFLAGS += -lmysqlclient
122 endif
123 #mysql_la_LIBADD = -lmysqlclient
124 mysql_la_CFLAGS = -Wall -Werror
125 collectd_LDADD += "-dlopen" mysql.la
126 collectd_DEPENDENCIES += mysql.la
127 endif
129 if BUILD_MODULE_NFS
130 pkglib_LTLIBRARIES += nfs.la
131 nfs_la_SOURCES = nfs.c nfs.h
132 nfs_la_LDFLAGS = -module -avoid-version
133 nfs_la_CFLAGS = -Wall -Werror
134 collectd_LDADD += "-dlopen" nfs.la
135 collectd_DEPENDENCIES += nfs.la
136 endif
138 if BUILD_MODULE_PING
139 pkglib_LTLIBRARIES += ping.la
140 ping_la_SOURCES = ping.c ping.h
141 ping_la_LDFLAGS = -module -avoid-version
142 ping_la_LIBADD = libping/libping.la
143 ping_la_DEPENDENCIES = libping/libping.la
144 ping_la_CFLAGS = -Wall -Werror
145 collectd_LDADD += "-dlopen" ping.la
146 collectd_DEPENDENCIES += ping.la
147 endif
149 if BUILD_MODULE_PROCESSES
150 pkglib_LTLIBRARIES += processes.la
151 processes_la_SOURCES = processes.c processes.h
152 processes_la_LDFLAGS = -module -avoid-version
153 processes_la_CFLAGS = -Wall -Werror
154 collectd_LDADD += "-dlopen" processes.la
155 collectd_DEPENDENCIES += processes.la
156 endif
158 if BUILD_MODULE_SENSORS
159 pkglib_LTLIBRARIES += sensors.la
160 sensors_la_SOURCES = sensors.c sensors.h
161 sensors_la_LDFLAGS = -module -avoid-version
162 if BUILD_WITH_LM_SENSORS
163 sensors_la_LDFLAGS += -lsensors
164 endif
165 sensors_la_LIBADD = -lsensors
166 sensors_la_CFLAGS = -Wall -Werror
167 collectd_LDADD += "-dlopen" sensors.la
168 collectd_DEPENDENCIES += sensors.la
169 endif
171 if BUILD_MODULE_SERIAL
172 pkglib_LTLIBRARIES += serial.la
173 serial_la_SOURCES = serial.c serial.h
174 serial_la_LDFLAGS = -module -avoid-version
175 serial_la_CFLAGS = -Wall -Werror
176 collectd_LDADD += "-dlopen" serial.la
177 collectd_DEPENDENCIES += serial.la
178 endif
180 if BUILD_MODULE_SWAP
181 pkglib_LTLIBRARIES += swap.la
182 swap_la_SOURCES = swap.c swap.h
183 swap_la_LDFLAGS = -module -avoid-version
184 swap_la_CFLAGS = -Wall -Werror
185 collectd_LDADD += "-dlopen" swap.la
186 collectd_DEPENDENCIES += swap.la
187 endif
189 if BUILD_MODULE_TAPE
190 pkglib_LTLIBRARIES += tape.la
191 tape_la_SOURCES = tape.c tape.h
192 tape_la_LDFLAGS = -module -avoid-version
193 tape_la_CFLAGS = -Wall -Werror
194 collectd_LDADD += "-dlopen" tape.la
195 collectd_DEPENDENCIES += tape.la
196 endif
198 if BUILD_MODULE_TRAFFIC
199 pkglib_LTLIBRARIES += traffic.la
200 traffic_la_SOURCES = traffic.c traffic.h
201 traffic_la_LDFLAGS = -module -avoid-version
202 traffic_la_CFLAGS = -Wall -Werror
203 collectd_LDADD += "-dlopen" traffic.la
204 collectd_DEPENDENCIES += traffic.la
205 endif
207 if BUILD_MODULE_USERS
208 pkglib_LTLIBRARIES += users.la
209 users_la_SOURCES = users.c users.h
210 users_la_LDFLAGS = -module -avoid-version
211 users_la_CFLAGS = -Wall -Werror
212 collectd_LDADD += "-dlopen" users.la
213 collectd_DEPENDENCIES += users.la
214 endif
216 man_MANS = collectd.1 collectd.conf.5
217 #collectd_1_SOURCES = collectd.pod
219 EXTRA_DIST = $(man_MANS)
221 .pod.1:
222 pod2man --release=$(VERSION) --center=$(PACKAGE) $< >$@
224 .pod.5:
225 pod2man --section=5 --release=$(VERSION) --center=$(PACKAGE) $< >$@