diff --git a/README.md b/README.md index 6affb08..78bc9b1 100644 --- a/README.md +++ b/README.md @@ -93,6 +93,7 @@ Added Visual Studio support for wolfPKCS11. Fixes for cast warnings and portabil * Fixed portability issues with `WOLFPKCS11_USER_SETTINGS`. (PR #28) * Added Visual Studio support for wolfPKCS11. (PR #28) - This includes wolfTPM support with Windows TBS interface +* Reworked shared library versioning. (PR #29) ### wolfPKCS11 Release 1.2 (Dec 26, 2023) diff --git a/configure.ac b/configure.ac index 1777ec7..9dbe518 100644 --- a/configure.ac +++ b/configure.ac @@ -32,18 +32,25 @@ AC_ARG_PROGRAM AC_CONFIG_MACRO_DIR([m4]) AC_CONFIG_HEADERS([wolfpkcs11/config.h]) -WOLFPKCS11_LIBRARY_VERSION=3:1:0 -# | | | -# +------+ | +---+ -# | | | -# current:revision:age -# | | | -# | | +- increment if interfaces have been added -# | | set to zero if interfaces have been removed -# | | or changed -# | +- increment if source code has changed -# | set to zero if current is incremented -# +- increment if interfaces have been added, removed or changed +# shared library versioning +# The three numbers in the libpkcs11.so.*.*.* file name. Unfortunately + +# increment if interfaces have been removed or changed +WOLFPKCS11_LIBRARY_VERSION_FIRST=3 + +# increment if interfaces have been added +# set to zero if WOLFPKCS11_LIBRARY_VERSION_FIRST is incremented +WOLFPKCS11_LIBRARY_VERSION_SECOND=1 + +# increment if source code has changed +# set to zero if WOLFPKCS11_LIBRARY_VERSION_FIRST is incremented or +# WOLFPKCS11_LIBRARY_VERSION_SECOND is incremented +WOLFPKCS11_LIBRARY_VERSION_THIRD=0 + +WOLFPKCS11_LIBRARY_VERSION=${WOLFPKCS11_LIBRARY_VERSION_FIRST}:${WOLFPKCS11_LIBRARY_VERSION_SECOND}:${WOLFPKCS11_LIBRARY_VERSION_THIRD} +AC_SUBST([WOLFPKCS11_LIBRARY_VERSION_FIRST]) +AC_SUBST([WOLFPKCS11_LIBRARY_VERSION_SECOND]) +AC_SUBST([WOLFPKCS11_LIBRARY_VERSION_THIRD]) AC_SUBST([WOLFPKCS11_LIBRARY_VERSION]) diff --git a/src/include.am b/src/include.am index 6322eac..f54ea41 100644 --- a/src/include.am +++ b/src/include.am @@ -12,7 +12,7 @@ src_libwolfpkcs11_la_SOURCES = \ src_libwolfpkcs11_la_CFLAGS = -DBUILDING_WOLFPKCS11 $(AM_CFLAGS) src_libwolfpkcs11_la_CPPFLAGS = -DBUILDING_WOLFPKCS11 $(AM_CPPFLAGS) -src_libwolfpkcs11_la_LDFLAGS = ${AM_LDFLAGS} -no-undefined -version-info ${WOLFPKCS11_LIBRARY_VERSION} +src_libwolfpkcs11_la_LDFLAGS = ${AM_LDFLAGS} -no-undefined -version-number ${WOLFPKCS11_LIBRARY_VERSION} #src_libwolfpkcs11_la_DEPENDENCIES = #EXTRA_DIST +=