X-Git-Url: https://git.octo.it/?a=blobdiff_plain;f=src%2FMakefile.am;h=142882a286457733993a536108149249f8d01984;hb=09147a2c9dde2e04e660409e7a5ac0eb09604b07;hp=08b8d52564322b1dfdcbfe79e4949495dfbaf44d;hpb=0c88d3b2d330c152be0bc6af8faecef0211a705e;p=collectd.git diff --git a/src/Makefile.am b/src/Makefile.am index 08b8d525..142882a2 100644 --- a/src/Makefile.am +++ b/src/Makefile.am @@ -23,6 +23,14 @@ AM_CPPFLAGS += -DPKGDATADIR='"${pkgdatadir}"' AUTOMAKE_OPTIONS = subdir-objects +noinst_LTLIBRARIES = libmount.la liblookup.la + +libmount_la_SOURCES = utils_mount.c utils_mount.h +libmount_la_LIBADD = daemon/libcommon.la + +liblookup_la_SOURCES = utils_vl_lookup.c utils_vl_lookup.h +liblookup_la_LIBADD = daemon/libavltree.la daemon/libcommon.la + sbin_PROGRAMS = collectdmon bin_PROGRAMS = collectd-nagios collectdctl collectd-tg @@ -55,10 +63,9 @@ endif collectdctl_LDADD += libcollectdclient/libcollectdclient.la collectdctl_DEPENDENCIES = libcollectdclient/libcollectdclient.la -collectd_tg_SOURCES = collectd-tg.c \ - daemon/utils_heap.c daemon/utils_heap.h +collectd_tg_SOURCES = collectd-tg.c collectd_tg_CPPFLAGS = $(AM_CPPFLAGS) -I$(top_srcdir)/src/libcollectdclient/collectd -I$(top_builddir)/src/libcollectdclient/collectd -collectd_tg_LDADD = +collectd_tg_LDADD = daemon/libheap.la if BUILD_WITH_LIBSOCKET collectd_tg_LDADD += -lsocket endif @@ -183,9 +190,9 @@ endif if BUILD_PLUGIN_CGROUPS pkglib_LTLIBRARIES += cgroups.la cgroups_la_SOURCES = cgroups.c \ - utils_ignorelist.c utils_ignorelist.h \ - utils_mount.c utils_mount.h + utils_ignorelist.c utils_ignorelist.h cgroups_la_LDFLAGS = $(PLUGIN_LDFLAGS) +cgroups_la_LIBADD = libmount.la endif if BUILD_PLUGIN_CONNTRACK @@ -283,9 +290,9 @@ endif if BUILD_PLUGIN_DF pkglib_LTLIBRARIES += df.la df_la_SOURCES = df.c \ - utils_ignorelist.c utils_ignorelist.h \ - utils_mount.c utils_mount.h + utils_ignorelist.c utils_ignorelist.h df_la_LDFLAGS = $(PLUGIN_LDFLAGS) +df_la_LIBADD = libmount.la endif if BUILD_PLUGIN_DISK @@ -642,6 +649,22 @@ netapp_la_LDFLAGS = $(PLUGIN_LDFLAGS) $(LIBNETAPP_LDFLAGS) netapp_la_LIBADD = $(LIBNETAPP_LIBS) endif +if BUILD_PLUGIN_NETCMD +pkglib_LTLIBRARIES += netcmd.la +netcmd_la_SOURCES = netcmd.c \ + utils_cmd_flush.h utils_cmd_flush.c \ + utils_cmd_getval.h utils_cmd_getval.c \ + utils_cmd_listval.h utils_cmd_listval.c \ + utils_cmd_putval.h utils_cmd_putval.c \ + utils_cmd_putnotif.h utils_cmd_putnotif.c +netcmd_la_LDFLAGS = -module -avoid-version -lpthread +netcmd_la_CFLAGS = $(AM_CFLAGS) $(BUILD_WITH_LIBGNUTLS_CFLAGS) +netcmd_la_LIBADD = $(BUILD_WITH_LIBGNUTLS_LIBS) +if BUILD_WITH_LIBSOCKET +netcmd_la_LIBADD += -lsocket +endif +endif + if BUILD_PLUGIN_NETLINK pkglib_LTLIBRARIES += netlink.la netlink_la_SOURCES = netlink.c @@ -1281,6 +1304,13 @@ endif BUILT_SOURCES += $(dist_man_MANS) +if BUILD_PLUGIN_ZONE +pkglib_LTLIBRARIES += zone.la +zone_la_SOURCES = zone.c +zone_la_CFLAGS = $(AM_CFLAGS) +zone_la_LDFLAGS = $(PLUGIN_LDFLAGS) +endif + dist_man_MANS = collectd.1 \ collectd.conf.5 \ collectd-email.5 \ @@ -1373,49 +1403,12 @@ uninstall-hook: rm -f $(DESTDIR)$(sysconfdir)/collectd.conf rm -f $(DESTDIR)$(pkgdatadir)/postgresql_default.conf; -check_PROGRAMS = test_common test_utils_avltree test_utils_heap test_utils_mount test_utils_vl_lookup - -test_common_SOURCES = tests/test_common.c \ - daemon/common.h daemon/common.c \ - tests/macros.h \ - tests/mock/plugin.c \ - tests/mock/utils_cache.c \ - tests/mock/utils_time.c -test_common_CPPFLAGS = $(AM_CPPFLAGS) $(LTDLINCL) -test_common_LDFLAGS = -export-dynamic -test_common_LDADD = - -test_utils_avltree_SOURCES = tests/test_utils_avltree.c \ - daemon/utils_avltree.c daemon/utils_avltree.h -test_utils_avltree_CPPFLAGS = $(AM_CPPFLAGS) $(LTDLINCL) -test_utils_avltree_LDFLAGS = -export-dynamic -test_utils_avltree_LDADD = - -test_utils_heap_SOURCES = tests/test_utils_heap.c \ - daemon/utils_heap.c daemon/utils_heap.h -test_utils_heap_CPPFLAGS = $(AM_CPPFLAGS) $(LTDLINCL) -test_utils_heap_LDFLAGS = -export-dynamic -test_utils_heap_LDADD = - -test_utils_mount_SOURCES = tests/test_utils_mount.c \ - utils_mount.c utils_mount.h \ - daemon/common.c daemon/common.h \ - tests/mock/plugin.c \ - tests/mock/utils_cache.c \ - tests/mock/utils_time.c -test_utils_mount_CPPFLAGS = $(AM_CPPFLAGS) $(LTDLINCL) -test_utils_mount_LDFLAGS = -export-dynamic -test_utils_mount_LDADD = - -test_utils_vl_lookup_SOURCES = tests/test_utils_vl_lookup.c \ - utils_vl_lookup.h utils_vl_lookup.c \ - daemon/utils_avltree.c daemon/utils_avltree.h \ - daemon/common.c daemon/common.h \ - tests/mock/plugin.c \ - tests/mock/utils_cache.c \ - tests/mock/utils_time.c -test_utils_vl_lookup_CPPFLAGS = $(AM_CPPFLAGS) $(LTDLINCL) -test_utils_vl_lookup_LDFLAGS = -export-dynamic -test_utils_vl_lookup_LDADD = - -TESTS = test_common test_utils_avltree test_utils_heap test_utils_mount test_utils_vl_lookup +check_PROGRAMS = test_utils_mount test_utils_vl_lookup + +test_utils_mount_SOURCES = utils_mount_test.c testing.h +test_utils_mount_LDADD = libmount.la daemon/libplugin_mock.la + +test_utils_vl_lookup_SOURCES = utils_vl_lookup_test.c testing.h +test_utils_vl_lookup_LDADD = liblookup.la daemon/libplugin_mock.la + +TESTS = test_utils_mount test_utils_vl_lookup