mirror of
https://github.com/obgm/libcoap.git
synced 2026-11-21 14:59:06 +03:00
configure.ac: Add in --enable-add-default-names option
If --enable-add-default-names is set (the default), then the installed default libraries and installed default example executables will point to the appropriate object that has the (D)TLS library type in the name. E.g. libcoap-3.so -> libcoap-3-openssl.so coap-client -> coap-client-openssl If --enable-add-default-names is not set, then this will not happen. As well as the libraries, the example binaries are now created with the (D)TLS library extension in all cases.
This commit is contained in:
1 parent
425704599b
commit
7cd5bfa638
10 files changed
+108
-18
No files matched your search
+38
-7
@@ -12,27 +12,58 @@ if BUILD_EXAMPLES
|
||||
|
||||
# picking up the default warning CFLAGS into AM_CFLAGS
|
||||
AM_CFLAGS = -I$(top_builddir)/include -I$(top_srcdir)/include \
|
||||
-I$(top_srcdir)/include/coap$(LIBCOAP_API_VERSION) \
|
||||
$(WARNING_CFLAGS) $(DTLS_CFLAGS) -std=c99
|
||||
|
||||
#
|
||||
bin_PROGRAMS = coap-client coap-server coap-rd
|
||||
|
||||
if BUILD_ADD_DEFAULT_NAMES
|
||||
bin_PROGRAMS = coap-client \
|
||||
coap-server \
|
||||
coap-rd \
|
||||
coap-client@LIBCOAP_DTLS_LIB_EXTENSION_NAME@ \
|
||||
coap-server@LIBCOAP_DTLS_LIB_EXTENSION_NAME@ \
|
||||
coap-rd@LIBCOAP_DTLS_LIB_EXTENSION_NAME@
|
||||
else # BUILD_ADD_DEFAULT_NAMES
|
||||
bin_PROGRAMS = coap-client@LIBCOAP_DTLS_LIB_EXTENSION_NAME@ \
|
||||
coap-server@LIBCOAP_DTLS_LIB_EXTENSION_NAME@ \
|
||||
coap-rd@LIBCOAP_DTLS_LIB_EXTENSION_NAME@
|
||||
endif # BUILD_ADD_DEFAULT_NAMES
|
||||
|
||||
check_PROGRAMS = coap-etsi_iot_01 coap-tiny
|
||||
|
||||
if BUILD_ADD_DEFAULT_NAMES
|
||||
coap_client_SOURCES = coap-client.c
|
||||
coap_client_LDADD = $(DTLS_LIBS) $(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 = $(DTLS_LIBS) $(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 = $(DTLS_LIBS) $(top_builddir)/.libs/libcoap-$(LIBCOAP_NAME_SUFFIX).la
|
||||
coap_rd_LDADD = $(DTLS_LIBS) \
|
||||
$(top_builddir)/.libs/libcoap-$(LIBCOAP_NAME_SUFFIX).la
|
||||
endif # BUILD_ADD_DEFAULT_NAMES
|
||||
|
||||
coap_client@LIBCOAP_DTLS_LIB_EXTENSION_NAME@_SOURCES = coap-client.c
|
||||
coap_client@LIBCOAP_DTLS_LIB_EXTENSION_NAME@_LDADD = $(DTLS_LIBS) \
|
||||
$(top_builddir)/.libs/libcoap-$(LIBCOAP_NAME_SUFFIX).la
|
||||
|
||||
coap_server@LIBCOAP_DTLS_LIB_EXTENSION_NAME@_SOURCES = coap-server.c
|
||||
coap_server@LIBCOAP_DTLS_LIB_EXTENSION_NAME@_LDADD = $(DTLS_LIBS) \
|
||||
$(top_builddir)/.libs/libcoap-$(LIBCOAP_NAME_SUFFIX).la
|
||||
|
||||
coap_rd@LIBCOAP_DTLS_LIB_EXTENSION_NAME@_SOURCES = coap-rd.c
|
||||
coap_rd@LIBCOAP_DTLS_LIB_EXTENSION_NAME@_LDADD = $(DTLS_LIBS) \
|
||||
$(top_builddir)/.libs/libcoap-$(LIBCOAP_NAME_SUFFIX).la
|
||||
|
||||
coap_etsi_iot_01_SOURCES = etsi_iot_01.c
|
||||
coap_etsi_iot_01_LDADD = $(DTLS_LIBS) $(top_builddir)/.libs/libcoap-$(LIBCOAP_NAME_SUFFIX).la
|
||||
coap_etsi_iot_01_LDADD = $(DTLS_LIBS) \
|
||||
$(top_builddir)/.libs/libcoap-$(LIBCOAP_NAME_SUFFIX).la
|
||||
|
||||
coap_tiny_SOURCES = tiny.c
|
||||
coap_tiny_LDADD = $(DTLS_LIBS) $(top_builddir)/.libs/libcoap-$(LIBCOAP_NAME_SUFFIX).la
|
||||
coap_tiny_LDADD = $(DTLS_LIBS) \
|
||||
$(top_builddir)/.libs/libcoap-$(LIBCOAP_NAME_SUFFIX).la
|
||||
|
||||
endif # BUILD_EXAMPLES
|
||||
|
||||
|
||||
Reference in new issue
Block a user