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