X-Git-Url: https://git.verplant.org/?a=blobdiff_plain;f=src%2Fdaemon%2FMakefile.am;h=7f826e345a579888f9a4b9015a4a867b126189b8;hb=3f9f6b9bc37cfd8ee3eb7a21cb895ff524c533c8;hp=c40107791438712a093662e972d1c8e32b269b43;hpb=216c6246b73645ac093de15b87aedc9abc6ebc80;p=collectd.git diff --git a/src/daemon/Makefile.am b/src/daemon/Makefile.am index c4010779..7f826e34 100644 --- a/src/daemon/Makefile.am +++ b/src/daemon/Makefile.am @@ -2,7 +2,8 @@ if COMPILER_IS_GCC AM_CFLAGS = -Wall -Werror endif -AM_CPPFLAGS = -DPREFIX='"${prefix}"' +AM_CPPFLAGS = -I$(top_srcdir)/src +AM_CPPFLAGS += -DPREFIX='"${prefix}"' AM_CPPFLAGS += -DCONFIGFILE='"${sysconfdir}/${PACKAGE_NAME}.conf"' AM_CPPFLAGS += -DLOCALSTATEDIR='"${localstatedir}"' AM_CPPFLAGS += -DPKGLOCALSTATEDIR='"${localstatedir}/lib/${PACKAGE_NAME}"' @@ -16,18 +17,24 @@ AUTOMAKE_OPTIONS = subdir-objects sbin_PROGRAMS = collectd +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 + +libheap_la_SOURCES = utils_heap.c utils_heap.h + +libplugin_mock_la_SOURCES = plugin_mock.c utils_cache_mock.c utils_time_mock.c + collectd_SOURCES = collectd.c collectd.h \ - common.c common.h \ configfile.c configfile.h \ filter_chain.c filter_chain.h \ meta_data.c meta_data.h \ plugin.c plugin.h \ - utils_avltree.c utils_avltree.h \ utils_cache.c utils_cache.h \ utils_complain.c utils_complain.h \ - utils_heap.c utils_heap.h \ utils_llist.c utils_llist.h \ - utils_parse_option.c utils_parse_option.h \ utils_random.c utils_random.h \ utils_tail_match.c utils_tail_match.h \ utils_match.c utils_match.h \ @@ -41,7 +48,7 @@ collectd_SOURCES = collectd.c collectd.h \ collectd_CPPFLAGS = $(AM_CPPFLAGS) $(LTDLINCL) collectd_CFLAGS = $(AM_CFLAGS) collectd_LDFLAGS = -export-dynamic -collectd_LDADD = -lm +collectd_LDADD = libavltree.la libcommon.la libheap.la -lm collectd_DEPENDENCIES = # Link to these libraries.. @@ -83,3 +90,15 @@ collectd_DEPENDENCIES += $(top_builddir)/src/liboconfig/liboconfig.la else collectd_LDADD += -loconfig endif + +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_utils_avltree_SOURCES = utils_avltree_test.c ../testing.h +test_utils_avltree_LDADD = libavltree.la + +test_utils_heap_SOURCES = utils_heap_test.c ../testing.h +test_utils_heap_LDADD = libheap.la