Makefile.am: Update to support new liboap library naming

Replace LIBCOAP_API_VERSON with LIBCOAP_NAME_SUFFIX when refering to building
the library files.  configure.ac defines LIBCOAP_NAME_SUFFIX.

libcoap-$LIBCOAP_API_VERSION.{sym,map} remain.

Make distclean clean up temporary src/*.o and src/*.lo files which may be
left lying around from a previous './configure xxx ; make' that was using
a different TLS library.

Add in coap_dtls_*, coap_tls_*, coap_socket_* functions that do not need to
be publically exposed in the libraries
This commit is contained in:
Jon Shallow committed 2018-04-13 08:43:37 +01:00
1 parent 0ac9bb53f6
commit dc89f8c203
1 file changed
+46 -8
+46 -8
View File
@@ -45,15 +45,15 @@ AM_CFLAGS = -I$(top_builddir)/include/coap -I$(top_srcdir)/include/coap $(WARNIN
SUBDIRS = $(subdirs) . $(DOC_DIR) $(MAN_DIR) tests examples
## Define a libtool archive target "libcoap-@LIBCOAP_API_VERSION@.la", with
## @LIBCOAP_API_VERSION@ substituted into the generated Makefile at configure
## Define a libtool archive target "libcoap-@LIBCOAP_NAME_SUFFIX@.la", with
## @LIBCOAP_NAME_SUFFIX@ substituted into the generated Makefile at configure
## time.
## The libtool archive file (.la) will be installed into the directory named
## by the predefined variable $(bindir), along with the actual shared library
## file (.so).
lib_LTLIBRARIES = libcoap-@LIBCOAP_API_VERSION@.la
lib_LTLIBRARIES = libcoap-@LIBCOAP_NAME_SUFFIX@.la
libcoap_@LIBCOAP_API_VERSION@_la_CFLAGS = \
libcoap_@LIBCOAP_NAME_SUFFIX@_la_CFLAGS = \
-fPIC \
-fPIE \
$(AM_CFLAGS)
@@ -61,7 +61,7 @@ libcoap_@LIBCOAP_API_VERSION@_la_CFLAGS = \
## Define the source file list for the "libcoap.la" target.
## Note that it is not necessary to list header files which are already listed
## elsewhere in a _HEADERS variable assignment.
libcoap_@LIBCOAP_API_VERSION@_la_SOURCES = \
libcoap_@LIBCOAP_NAME_SUFFIX@_la_SOURCES = \
src/address.c \
src/async.c \
src/block.c \
@@ -124,7 +124,7 @@ libcoap_include_HEADERS = \
## Instruct libtool to include API version information in the generated shared
## library file (.so). The library ABI version will later defined in configure.ac,
## so that all version information is kept in one place.
libcoap_@LIBCOAP_API_VERSION@_la_LDFLAGS = \
libcoap_@LIBCOAP_NAME_SUFFIX@_la_LDFLAGS = \
-version-info $(LT_LIBCOAP_CURRENT):$(LT_LIBCOAP_REVISION):$(LT_LIBCOAP_AGE) \
@libcoap_SYMBOLS@ \
$(DTLS_LIBS) \
@@ -132,7 +132,44 @@ libcoap_@LIBCOAP_API_VERSION@_la_LDFLAGS = \
## Collect symbols here we want to ignore while building the helper files
## libcoap-$(LIBCOAP_API_VERSION).{map,sym} for the linker.
CTAGS_IGNORE=-I "coap_packet_extract_pbuf coap_pdu_from_pbuf coap_socket_send_pdu"
CTAGS_IGNORE=-I " \
coap_dtls_context_check_keys_enabled \
coap_dtls_context_set_pki \
coap_dtls_context_set_psk \
coap_dtls_free_context \
coap_dtls_free_session \
coap_dtls_get_context_timeout \
coap_dtls_get_overhead \
coap_dtls_get_timeout \
coap_dtls_handle_timeout \
coap_dtls_hello \
coap_dtls_is_context_timeout \
coap_dtls_new_client_session \
coap_dtls_new_context \
coap_dtls_new_server_session \
coap_dtls_receive \
coap_dtls_send \
coap_dtls_session_update_mtu \
coap_dtls_startup \
coap_packet_extract_pbuf \
coap_pdu_from_pbuf \
coap_socket_accept_tcp \
coap_socket_bind_tcp \
coap_socket_bind_udp \
coap_socket_close \
coap_socket_connect_tcp1 \
coap_socket_connect_tcp2 \
coap_socket_connect_udp \
coap_socket_read \
coap_socket_send \
coap_socket_send_pdu \
coap_socket_write \
coap_tls_free_session \
coap_tls_new_client_session \
coap_tls_new_server_session \
coap_tls_read \
coap_tls_write \
"
# This helper is called by libcoap-$(LIBCOAP_API_VERSION).{map,sym} to see if
# configure has detected a usable version of the ctags program and aborts if not.
@@ -169,7 +206,7 @@ libcoap-$(LIBCOAP_API_VERSION).sym: check_ctags $(libcoap_include_HEADERS)
## pkg-config files are also used for architecture-independent data packages,
## in which case the correct install location would be $(datadir)/pkgconfig.
pkgconfigdir = $(libdir)/pkgconfig
pkgconfig_DATA = libcoap-$(LIBCOAP_API_VERSION).pc
pkgconfig_DATA = libcoap-$(LIBCOAP_NAME_SUFFIX).pc
## Define an independent executable script for inclusion in the distribution
## archive. However, it will not be installed on an end user's system due to
@@ -182,6 +219,7 @@ dist_noinst_SCRIPTS = autogen.sh
## need to call the target update-map-file after the configure script was
## running!
distclean-local:
@rm -f src/*.o src/*.lo
rm -f libcoap-$(LIBCOAP_API_VERSION).map
rm -f libcoap-$(LIBCOAP_API_VERSION).sym
rm -f libcoap-$(LIBCOAP_API_VERSION).pc