automake >= 1.14 does not like building binaries from source in other
directories. To avoid a warning, `subdir-objects` option has to be
passed to `AM_INIT_AUTOMAKE`. Unfortunately, this breaks what worked
before. Fixed point tests are using `fixedpoint.c` from
`src/lib`. This seems to confuse dependency tracking. See:
http://debbugs.gnu.org/cgi/bugreport.cgi?bug=13928
http://mytestbed.net/issues/1327
As a workaround, we use a convenience library instead.
lib_LTLIBRARIES = liblldpctl.la
include_HEADERS = lldpctl.h
-liblldpctl_la_SOURCES = lldpctl.h private.h errors.c connection.c atom.c atom-private.c \
- fixedpoint.h fixedpoint.c
-liblldpctl_la_LIBADD = $(top_builddir)/src/libcommon-daemon-lib.la
+noinst_LTLIBRARIES = libfixedpoint.la
+libfixedpoint_la_SOURCES = fixedpoint.h fixedpoint.c
+
+liblldpctl_la_SOURCES = lldpctl.h private.h errors.c connection.c atom.c atom-private.c
+liblldpctl_la_LIBADD = $(top_builddir)/src/libcommon-daemon-lib.la libfixedpoint.la
liblldpctl_la_LDFLAGS = -export-symbols-regex '^lldpctl_' -version-info 6:0:2
# -version-info format is `current`:`revision`:`age`. For more details, see:
if HAVE_CHECK
+AM_CFLAGS += @CHECK_CFLAGS@
+LDADD = $(top_builddir)/src/daemon/liblldpd.la @CHECK_LIBS@ @LIBEVENT_LDFLAGS@
+
check_marshal_SOURCES = check_marshal.c \
$(top_srcdir)/src/marshal.h
$(top_srcdir)/src/daemon/lldpd.h \
common.h common.c
-check_fixedpoint_SOURCES = check_fixedpoint.c \
- $(top_srcdir)/src/lib/fixedpoint.h \
- $(top_srcdir)/src/lib/fixedpoint.c
-
-AM_CFLAGS += @CHECK_CFLAGS@
-LDADD = $(top_builddir)/src/daemon/liblldpd.la @CHECK_LIBS@ @LIBEVENT_LDFLAGS@
+check_fixedpoint_SOURCES = check_fixedpoint.c
+check_fixedpoint_LDADD = $(top_builddir)/src/lib/libfixedpoint.la $(LDADD)
if USE_SNMP
TESTS += check_snmp