4f271bf2664a9ebe5d37a0522f7509986f737c9b
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 = -DLOCALSTATEDIR='"$(localstatedir)"' -DPLUGINDIR='"$(pkglibdir)"'
15 collectd_LDFLAGS = -export-dynamic
16 collectd_CFLAGS = -Werror
17 collectd_LDADD = $(LIBLTDL) "-dlopen" self
18 collectd_DEPENDENCIES = $(LIBLTDL)
19 if BUILD_WITH_RRDTOOL
20 collectd_LDADD += -lrrd
21 endif
23 pkglib_LTLIBRARIES =
25 if BUILD_MODULE_CPU
26 pkglib_LTLIBRARIES += cpu.la
27 cpu_la_SOURCES = cpu.c cpu.h
28 cpu_la_LDFLAGS = -module -avoid-version
29 collectd_LDADD += "-dlopen" cpu.la
30 collectd_DEPENDENCIES += cpu.la
31 endif
33 if BUILD_MODULE_CPUFREQ
34 pkglib_LTLIBRARIES += cpufreq.la
35 cpufreq_la_SOURCES = cpufreq.c cpufreq.h
36 cpufreq_la_LDFLAGS = -module -avoid-version
37 collectd_LDADD += "-dlopen" cpufreq.la
38 collectd_DEPENDENCIES += cpufreq.la
39 endif
41 if BUILD_MODULE_DISK
42 pkglib_LTLIBRARIES += disk.la
43 disk_la_SOURCES = disk.c disk.h
44 disk_la_LDFLAGS = -module -avoid-version
45 collectd_LDADD += "-dlopen" disk.la
46 collectd_DEPENDENCIES += disk.la
47 endif
49 #if BUILD_MODULE_QUOTA
50 #pkglib_LTLIBRARIES += quota.la
51 #quota_la_SOURCES = quota_plugin.c quota_plugin.h
52 #quota_la_SOURCES += quota_fs.c quota_fs.h
53 #quota_la_SOURCES += quota_mnt.c quota_mnt.h
54 #quota_la_LDFLAGS = -module -avoid-version
55 #quota_la_CFLAGS = -Werror
56 #collectd_LDADD += "-dlopen" quota.la
57 #collectd_DEPENDENCIES += quota.la
58 #endif
60 if BUILD_MODULE_HDDTEMP
61 pkglib_LTLIBRARIES += hddtemp.la
62 hddtemp_la_SOURCES = hddtemp.c hddtemp.h
63 hddtemp_la_LDFLAGS = -module -avoid-version
64 collectd_LDADD += "-dlopen" hddtemp.la
65 collectd_DEPENDENCIES += hddtemp.la
66 endif
68 if BUILD_MODULE_LOAD
69 pkglib_LTLIBRARIES += load.la
70 load_la_SOURCES = load.c load.h
71 load_la_LDFLAGS = -module -avoid-version
72 collectd_LDADD += "-dlopen" load.la
73 collectd_DEPENDENCIES += load.la
74 endif
76 if BUILD_MODULE_MEMORY
77 pkglib_LTLIBRARIES += memory.la
78 memory_la_SOURCES = memory.c memory.h
79 memory_la_LDFLAGS = -module -avoid-version
80 collectd_LDADD += "-dlopen" memory.la
81 collectd_DEPENDENCIES += memory.la
82 endif
84 if BUILD_MODULE_NFS
85 pkglib_LTLIBRARIES += nfs.la
86 nfs_la_SOURCES = nfs.c nfs.h
87 nfs_la_LDFLAGS = -module -avoid-version
88 collectd_LDADD += "-dlopen" nfs.la
89 collectd_DEPENDENCIES += nfs.la
90 endif
92 if BUILD_MODULE_PING
93 pkglib_LTLIBRARIES += ping.la
94 ping_la_SOURCES = ping.c ping.h
95 ping_la_LDFLAGS = -module -avoid-version
96 ping_la_LIBADD = libping/libping.la
97 ping_la_DEPENDENCIES = libping/libping.la
98 collectd_LDADD += "-dlopen" ping.la
99 collectd_DEPENDENCIES += ping.la
100 endif
102 if BUILD_MODULE_PROCESSES
103 pkglib_LTLIBRARIES += processes.la
104 processes_la_SOURCES = processes.c processes.h
105 processes_la_LDFLAGS = -module -avoid-version
106 collectd_LDADD += "-dlopen" processes.la
107 collectd_DEPENDENCIES += processes.la
108 endif
110 if BUILD_MODULE_SENSORS
111 pkglib_LTLIBRARIES += sensors.la
112 sensors_la_SOURCES = sensors.c sensors.h
113 sensors_la_LDFLAGS = -module -avoid-version -lsensors
114 sensors_la_LIBADD = -lsensors
115 collectd_LDADD += "-dlopen" sensors.la
116 collectd_DEPENDENCIES += sensors.la
117 endif
119 if BUILD_MODULE_SERIAL
120 pkglib_LTLIBRARIES += serial.la
121 serial_la_SOURCES = serial.c serial.h
122 serial_la_LDFLAGS = -module -avoid-version
123 collectd_LDADD += "-dlopen" serial.la
124 collectd_DEPENDENCIES += serial.la
125 endif
127 if BUILD_MODULE_SWAP
128 pkglib_LTLIBRARIES += swap.la
129 swap_la_SOURCES = swap.c swap.h
130 swap_la_LDFLAGS = -module -avoid-version
131 collectd_LDADD += "-dlopen" swap.la
132 collectd_DEPENDENCIES += swap.la
133 endif
135 if BUILD_MODULE_TAPE
136 pkglib_LTLIBRARIES += tape.la
137 tape_la_SOURCES = tape.c tape.h
138 tape_la_LDFLAGS = -module -avoid-version
139 collectd_LDADD += "-dlopen" tape.la
140 collectd_DEPENDENCIES += tape.la
141 endif
143 if BUILD_MODULE_TRAFFIC
144 pkglib_LTLIBRARIES += traffic.la
145 traffic_la_SOURCES = traffic.c traffic.h
146 traffic_la_LDFLAGS = -module -avoid-version
147 collectd_LDADD += "-dlopen" traffic.la
148 collectd_DEPENDENCIES += traffic.la
149 endif
151 if BUILD_MODULE_USERS
152 pkglib_LTLIBRARIES += users.la
153 users_la_SOURCES = users.c users.h
154 users_la_LDFLAGS = -module -avoid-version
155 collectd_LDADD += "-dlopen" users.la
156 collectd_DEPENDENCIES += users.la
157 endif
159 man_MANS = collectd.1
160 #collectd_1_SOURCES = collectd.pod
162 EXTRA_DIST = $(man_MANS)
164 .pod.1:
165 pod2man --release=$(VERSION) --center=$(PACKAGE) $< >$@