186c19b2c0eee9088b63e85a8ca4ed9882f62a04
1 SUBDIRS = libconfig
2 if BUILD_MODULE_PING
3 SUBDIRS += libping
4 endif
5 #SUBDIRS += .
7 sbin_PROGRAMS = collectd
9 collectd_SOURCES = collectd.c collectd.h \
10 utils_debug.c utils_debug.h \
11 utils_mount.c utils_mount.h \
12 common.c common.h \
13 multicast.c multicast.h \
14 plugin.c plugin.h \
15 configfile.c configfile.h
16 #collectd_CFLAGS = -DPLUGINDIR='"$(pkglibdir)"'
17 collectd_CPPFLAGS =
18 collectd_CPPFLAGS += -DSYSCONFDIR='"${sysconfdir}"'
19 collectd_CPPFLAGS += -DPKGLOCALSTATEDIR='"${localstatedir}/${PACKAGE_NAME}"'
20 collectd_CPPFLAGS += -DPIDFILE='"${localstatedir}/run/${PACKAGE_NAME}.pid"'
21 collectd_CPPFLAGS += -DPLUGINDIR='"${pkglibdir}"'
22 collectd_LDFLAGS = -export-dynamic
23 collectd_CFLAGS = -Werror
24 collectd_LDADD = $(LIBLTDL) libconfig/libconfig.la "-dlopen" self
25 collectd_DEPENDENCIES = $(LIBLTDL) libconfig/libconfig.la
26 if BUILD_WITH_RRDTOOL
27 collectd_LDADD += -lrrd
28 endif
30 pkglib_LTLIBRARIES =
32 if BUILD_MODULE_CPU
33 pkglib_LTLIBRARIES += cpu.la
34 cpu_la_SOURCES = cpu.c cpu.h
35 cpu_la_LDFLAGS = -module -avoid-version
36 collectd_LDADD += "-dlopen" cpu.la
37 collectd_DEPENDENCIES += cpu.la
38 endif
40 if BUILD_MODULE_CPUFREQ
41 pkglib_LTLIBRARIES += cpufreq.la
42 cpufreq_la_SOURCES = cpufreq.c cpufreq.h
43 cpufreq_la_LDFLAGS = -module -avoid-version
44 collectd_LDADD += "-dlopen" cpufreq.la
45 collectd_DEPENDENCIES += cpufreq.la
46 endif
48 if BUILD_MODULE_DISK
49 pkglib_LTLIBRARIES += disk.la
50 disk_la_SOURCES = disk.c disk.h
51 disk_la_LDFLAGS = -module -avoid-version
52 collectd_LDADD += "-dlopen" disk.la
53 collectd_DEPENDENCIES += disk.la
54 endif
56 #if BUILD_MODULE_QUOTA
57 #pkglib_LTLIBRARIES += quota.la
58 #quota_la_SOURCES = quota_plugin.c quota_plugin.h
59 #quota_la_SOURCES += quota_fs.c quota_fs.h
60 #quota_la_SOURCES += quota_mnt.c quota_mnt.h
61 #quota_la_LDFLAGS = -module -avoid-version
62 #quota_la_CFLAGS = -Werror
63 #collectd_LDADD += "-dlopen" quota.la
64 #collectd_DEPENDENCIES += quota.la
65 #endif
67 if BUILD_MODULE_HDDTEMP
68 pkglib_LTLIBRARIES += hddtemp.la
69 hddtemp_la_SOURCES = hddtemp.c hddtemp.h
70 hddtemp_la_LDFLAGS = -module -avoid-version
71 collectd_LDADD += "-dlopen" hddtemp.la
72 collectd_DEPENDENCIES += hddtemp.la
73 endif
75 if BUILD_MODULE_LOAD
76 pkglib_LTLIBRARIES += load.la
77 load_la_SOURCES = load.c load.h
78 load_la_LDFLAGS = -module -avoid-version
79 collectd_LDADD += "-dlopen" load.la
80 collectd_DEPENDENCIES += load.la
81 endif
83 if BUILD_MODULE_MEMORY
84 pkglib_LTLIBRARIES += memory.la
85 memory_la_SOURCES = memory.c memory.h
86 memory_la_LDFLAGS = -module -avoid-version
87 collectd_LDADD += "-dlopen" memory.la
88 collectd_DEPENDENCIES += memory.la
89 endif
91 if BUILD_MODULE_NFS
92 pkglib_LTLIBRARIES += nfs.la
93 nfs_la_SOURCES = nfs.c nfs.h
94 nfs_la_LDFLAGS = -module -avoid-version
95 collectd_LDADD += "-dlopen" nfs.la
96 collectd_DEPENDENCIES += nfs.la
97 endif
99 if BUILD_MODULE_PING
100 pkglib_LTLIBRARIES += ping.la
101 ping_la_SOURCES = ping.c ping.h
102 ping_la_LDFLAGS = -module -avoid-version
103 ping_la_LIBADD = libping/libping.la
104 ping_la_DEPENDENCIES = libping/libping.la
105 collectd_LDADD += "-dlopen" ping.la
106 collectd_DEPENDENCIES += ping.la
107 endif
109 if BUILD_MODULE_PROCESSES
110 pkglib_LTLIBRARIES += processes.la
111 processes_la_SOURCES = processes.c processes.h
112 processes_la_LDFLAGS = -module -avoid-version
113 collectd_LDADD += "-dlopen" processes.la
114 collectd_DEPENDENCIES += processes.la
115 endif
117 if BUILD_MODULE_SENSORS
118 pkglib_LTLIBRARIES += sensors.la
119 sensors_la_SOURCES = sensors.c sensors.h
120 sensors_la_LDFLAGS = -module -avoid-version -lsensors
121 sensors_la_LIBADD = -lsensors
122 collectd_LDADD += "-dlopen" sensors.la
123 collectd_DEPENDENCIES += sensors.la
124 endif
126 if BUILD_MODULE_SERIAL
127 pkglib_LTLIBRARIES += serial.la
128 serial_la_SOURCES = serial.c serial.h
129 serial_la_LDFLAGS = -module -avoid-version
130 collectd_LDADD += "-dlopen" serial.la
131 collectd_DEPENDENCIES += serial.la
132 endif
134 if BUILD_MODULE_SWAP
135 pkglib_LTLIBRARIES += swap.la
136 swap_la_SOURCES = swap.c swap.h
137 swap_la_LDFLAGS = -module -avoid-version
138 collectd_LDADD += "-dlopen" swap.la
139 collectd_DEPENDENCIES += swap.la
140 endif
142 if BUILD_MODULE_TAPE
143 pkglib_LTLIBRARIES += tape.la
144 tape_la_SOURCES = tape.c tape.h
145 tape_la_LDFLAGS = -module -avoid-version
146 collectd_LDADD += "-dlopen" tape.la
147 collectd_DEPENDENCIES += tape.la
148 endif
150 if BUILD_MODULE_TRAFFIC
151 pkglib_LTLIBRARIES += traffic.la
152 traffic_la_SOURCES = traffic.c traffic.h
153 traffic_la_LDFLAGS = -module -avoid-version
154 collectd_LDADD += "-dlopen" traffic.la
155 collectd_DEPENDENCIES += traffic.la
156 endif
158 if BUILD_MODULE_USERS
159 pkglib_LTLIBRARIES += users.la
160 users_la_SOURCES = users.c users.h
161 users_la_LDFLAGS = -module -avoid-version
162 users_la_CFLAGS = -Werror
163 collectd_LDADD += "-dlopen" users.la
164 collectd_DEPENDENCIES += users.la
165 endif
167 man_MANS = collectd.1
168 #collectd_1_SOURCES = collectd.pod
170 EXTRA_DIST = $(man_MANS)
172 .pod.1:
173 pod2man --release=$(VERSION) --center=$(PACKAGE) $< >$@