From 839bdc5418d8e4295d3275497c508e5047a5afcd Mon Sep 17 00:00:00 2001 From: Olaf Bergmann Date: Thu, 8 Nov 2018 11:24:04 +0100 Subject: [PATCH] Revert "examples/Makefile.am: remove $(DTLS_LIBS) variable" This reverts commit 91bfd5b103ec23c566cacd9711a4ff7bbb88f02f because it introduced a wrong variable substitution: The problem here is that top_srcdir is . in the top-level Makefile, so the link command ends up having this: [...] ../.libs/libcoap-2-tinydtls.a -L./ext/tinydtls -ltinydtls Whereas, in examples/Makefile.am, top_srcdir is .., so using DTLS_LIBS would be correctly replaced by ../.libs/libcoap-2-tinydtls.a -L../ext/tinydtls -ltinydtls The same holds for the Makefile in the subdirectory tests. --- examples/Makefile.am | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/examples/Makefile.am b/examples/Makefile.am index 64d66db0..3bceefcf 100644 --- a/examples/Makefile.am +++ b/examples/Makefile.am @@ -17,12 +17,12 @@ AM_CFLAGS = -I$(top_builddir)/include -I$(top_srcdir)/include \ bin_PROGRAMS = coap-client coap-server coap-rd coap_client_SOURCES = client.c -coap_client_LDADD = $(top_builddir)/.libs/libcoap-$(LIBCOAP_NAME_SUFFIX).la +coap_client_LDADD = $(DTLS_LIBS) $(top_builddir)/.libs/libcoap-$(LIBCOAP_NAME_SUFFIX).la coap_server_SOURCES = coap-server.c -coap_server_LDADD = $(top_builddir)/.libs/libcoap-$(LIBCOAP_NAME_SUFFIX).la +coap_server_LDADD = $(DTLS_LIBS) $(top_builddir)/.libs/libcoap-$(LIBCOAP_NAME_SUFFIX).la coap_rd_SOURCES = coap-rd.c -coap_rd_LDADD = $(top_builddir)/.libs/libcoap-$(LIBCOAP_NAME_SUFFIX).la +coap_rd_LDADD = $(DTLS_LIBS) $(top_builddir)/.libs/libcoap-$(LIBCOAP_NAME_SUFFIX).la endif # BUILD_EXAMPLES