Skip to content

Commit

Permalink
Reworked shared library versioning
Browse files Browse the repository at this point in the history
  • Loading branch information
dgarske committed Mar 22, 2024
1 parent 4552356 commit 61f3b58
Show file tree
Hide file tree
Showing 3 changed files with 21 additions and 13 deletions.
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
31 changes: 19 additions & 12 deletions configure.ac
Original file line number Diff line number Diff line change
Expand Up @@ -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])


Expand Down
2 changes: 1 addition & 1 deletion src/include.am
Original file line number Diff line number Diff line change
Expand Up @@ -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 +=

0 comments on commit 61f3b58

Please sign in to comment.