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