From 5687681d71cf041ea8f8ac424ad5581ff63a587b Mon Sep 17 00:00:00 2001 From: Olaf Bergmann Date: Mon, 10 Jul 2017 15:33:39 +0200 Subject: [PATCH] {tests/examples}/Makefile.am: add DTLS variables for static linkage Statically linked executables require DTLS_CFLAGS and DTLS_LIBS. --- examples/Makefile.am | 8 ++++---- tests/Makefile.am | 4 ++-- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/examples/Makefile.am b/examples/Makefile.am index e3218e7e..6ac37f74 100644 --- a/examples/Makefile.am +++ b/examples/Makefile.am @@ -9,19 +9,19 @@ if BUILD_EXAMPLES # picking up the default warning CFLAGS into AM_CFLAGS -AM_CFLAGS = -isystem$(top_builddir)/include -I$(top_srcdir)/include $(WARNING_CFLAGS) -std=c99 +AM_CFLAGS = -isystem$(top_builddir)/include -I$(top_srcdir)/include $(WARNING_CFLAGS) $(DTLS_CFLAGS) -std=c99 # etsi_iot_01 and tiny are missing bin_PROGRAMS = coap-client coap-server coap-rd coap_client_SOURCES = client.c coap_list.c -coap_client_LDADD = $(top_builddir)/.libs/libcoap-$(LIBCOAP_API_VERSION).la +coap_client_LDADD = $(DTLS_LIBS) $(top_builddir)/.libs/libcoap-$(LIBCOAP_API_VERSION).la coap_server_SOURCES = coap-server.c -coap_server_LDADD = $(top_builddir)/.libs/libcoap-$(LIBCOAP_API_VERSION).la +coap_server_LDADD = $(DTLS_LIBS) $(top_builddir)/.libs/libcoap-$(LIBCOAP_API_VERSION).la coap_rd_SOURCES = coap-rd.c -coap_rd_LDADD = $(top_builddir)/.libs/libcoap-$(LIBCOAP_API_VERSION).la +coap_rd_LDADD = $(DTLS_LIBS) $(top_builddir)/.libs/libcoap-$(LIBCOAP_API_VERSION).la # build manuals only if 'BUILD_DOCUMENTATION' is defined if BUILD_DOCUMENTATION diff --git a/tests/Makefile.am b/tests/Makefile.am index 140d0437..b24dd3ef 100644 --- a/tests/Makefile.am +++ b/tests/Makefile.am @@ -9,7 +9,7 @@ if HAVE_CUNIT # picking up the default warning CFLAGS -AM_CFLAGS = -I$(top_srcdir)/include/coap -I$(top_builddir)/include/coap $(WARNING_CFLAGS) $(CUNIT_CFLAGS) -std=c99 +AM_CFLAGS = -I$(top_srcdir)/include/coap -I$(top_builddir)/include/coap $(WARNING_CFLAGS) $(CUNIT_CFLAGS) $(DTLS_CFLAGS) -std=c99 noinst_PROGRAMS = \ testdriver @@ -23,7 +23,7 @@ testdriver_SOURCES = \ test_uri.c \ test_wellknown.c -testdriver_LDADD = $(CUNIT_LIBS) $(top_builddir)/.libs/libcoap-$(LIBCOAP_API_VERSION).la +testdriver_LDADD = $(CUNIT_LIBS) $(DTLS_LIBS) $(top_builddir)/.libs/libcoap-$(LIBCOAP_API_VERSION).la # If there is a API change to something $(LIBCOAP_API_VERSION) > 1 there is # nothing to adopt here. No needed to implement something here because the test