X-Git-Url: https://git.verplant.org/?a=blobdiff_plain;f=src%2Fdaemon%2FMakefile.am;h=88fc7129598071150554b150d9a177b28265a242;hb=a7b0cdea4f6a0f8d29ade21ae058182f720dd432;hp=7f826e345a579888f9a4b9015a4a867b126189b8;hpb=cedb6f147e94d0e952449f731313412ef4d67904;p=collectd.git diff --git a/src/daemon/Makefile.am b/src/daemon/Makefile.am index 7f826e34..88fc7129 100644 --- a/src/daemon/Makefile.am +++ b/src/daemon/Makefile.am @@ -13,6 +13,30 @@ endif AM_CPPFLAGS += -DPLUGINDIR='"${pkglibdir}"' AM_CPPFLAGS += -DPKGDATADIR='"${pkgdatadir}"' +# Link to these libraries.. +COMMON_LIBS = +if BUILD_WITH_LIBRT +COMMON_LIBS += -lrt +endif +if BUILD_WITH_LIBPOSIX4 +COMMON_LIBS += -lposix4 +endif +if BUILD_WITH_LIBSOCKET +COMMON_LIBS += -lsocket +endif +if BUILD_WITH_LIBRESOLV +COMMON_LIBS += -lresolv +endif +if BUILD_WITH_LIBPTHREAD +COMMON_LIBS += -lpthread +endif +if BUILD_WITH_LIBKSTAT +COMMON_LIBS += -lkstat +endif +if BUILD_WITH_LIBDEVINFO +COMMON_LIBS += -ldevinfo +endif + AUTOMAKE_OPTIONS = subdir-objects sbin_PROGRAMS = collectd @@ -22,10 +46,12 @@ noinst_LTLIBRARIES = libavltree.la libcommon.la libheap.la libplugin_mock.la libavltree_la_SOURCES = utils_avltree.c utils_avltree.h libcommon_la_SOURCES = common.c common.h +libcommon_la_LIBADD = $(COMMON_LIBS) libheap_la_SOURCES = utils_heap.c utils_heap.h libplugin_mock_la_SOURCES = plugin_mock.c utils_cache_mock.c utils_time_mock.c +libplugin_mock_la_LIBADD = $(COMMON_LIBS) collectd_SOURCES = collectd.c collectd.h \ configfile.c configfile.h \ @@ -34,6 +60,7 @@ collectd_SOURCES = collectd.c collectd.h \ plugin.c plugin.h \ utils_cache.c utils_cache.h \ utils_complain.c utils_complain.h \ + utils_ignorelist.c utils_ignorelist.h \ utils_llist.c utils_llist.h \ utils_random.c utils_random.h \ utils_tail_match.c utils_tail_match.h \ @@ -48,34 +75,8 @@ collectd_SOURCES = collectd.c collectd.h \ collectd_CPPFLAGS = $(AM_CPPFLAGS) $(LTDLINCL) collectd_CFLAGS = $(AM_CFLAGS) collectd_LDFLAGS = -export-dynamic -collectd_LDADD = libavltree.la libcommon.la libheap.la -lm -collectd_DEPENDENCIES = - -# Link to these libraries.. -if BUILD_WITH_LIBRT -collectd_LDADD += -lrt -endif -if BUILD_WITH_LIBPOSIX4 -collectd_LDADD += -lposix4 -endif -if BUILD_WITH_LIBSOCKET -collectd_LDADD += -lsocket -endif -if BUILD_WITH_LIBRESOLV -collectd_LDADD += -lresolv -endif -if BUILD_WITH_LIBPTHREAD -collectd_LDADD += -lpthread -endif -if BUILD_WITH_LIBKSTAT -collectd_LDADD += -lkstat -endif -if BUILD_WITH_LIBDEVINFO -collectd_LDADD += -ldevinfo -endif -if BUILD_AIX -collectd_LDFLAGS += -Wl,-bexpall,-brtllib -endif +collectd_LDADD = libavltree.la libcommon.la libheap.la -lm $(COMMON_LIBS) +collectd_DEPENDENCIES = libavltree.la libcommon.la libheap.la # The daemon needs to call sg_init, so we need to link it against libstatgrab, # too. -octo @@ -95,10 +96,10 @@ check_PROGRAMS = test_common test_utils_avltree test_utils_heap TESTS = test_common test_utils_avltree test_utils_heap test_common_SOURCES = common_test.c ../testing.h -test_common_LDADD = libcommon.la libplugin_mock.la +test_common_LDADD = libcommon.la libplugin_mock.la $(COMMON_LIBS) test_utils_avltree_SOURCES = utils_avltree_test.c ../testing.h -test_utils_avltree_LDADD = libavltree.la +test_utils_avltree_LDADD = libavltree.la $(COMMON_LIBS) test_utils_heap_SOURCES = utils_heap_test.c ../testing.h -test_utils_heap_LDADD = libheap.la +test_utils_heap_LDADD = libheap.la $(COMMON_LIBS)