wiki:LibraryVersioningImpl

Rules about the shared library versioning. Note we use libel versioning (cf. LibraryVersioning) and tools/mk_version.sh from the git repository can make 60-80% of the work for a new shared library.

Each directory for a shared library has:

  • an api (shell) file with the define name (FOO gives LIBKEA_FOO_XXX declarations/definitions), INTERFACE/REVISION/AGE value.
  • an api.h include file with declarations
  • an version.cc.in source file with definitions
  • modifications in Makefile.am to:
    • declare INTERFACE/REVISION/AGE variable
    • distribute api and version.cc.in files (api.h is in sources so is automatically included by make dist)
    • make api.h a source and version.cc a not distributable source
    • add in library linker flags no undefined (*) and version info

top directory configure (made from configure.ac by autoconf) expands version.cc and Makefile with values found in the api file.

Special note about -no-undefined: this is more a flag for the cygwin environment but here it s used to check there is no missing direct dependency.

Last modified 2 years ago Last modified on Jul 2, 2015, 12:24:40 PM