@@ -37,6 +37,13 @@ AC_TYPE_UINT32_T
AC_TYPE_UINT64_T
##########################################################################
+# Set correct platform library version
+##########################################################################
+ODP_LIBSO_AGE=0
+ODP_LIBSO_VERSION=$(./scripts/odp_version.sh ${ODP_LIBSO_AGE})
+AC_SUBST(ODP_LIBSO_VERSION)
+
+##########################################################################
# Determine which platform to build for
##########################################################################
AC_ARG_WITH([platform],
@@ -232,6 +239,8 @@ AC_MSG_RESULT([
$PACKAGE $VERSION
========
+ Library version: ${ODP_LIBSO_VERSION}
+
with_platform: ${with_platform}
prefix: ${prefix}
sysconfdir: ${sysconfdir}
@@ -9,3 +9,5 @@ pkgconfig_DATA = $(top_builddir)/pkgconfig/libodp.pc
VPATH = $(srcdir) $(builddir)
lib_LTLIBRARIES = $(LIB)/libodp.la
+
+AM_LDFLAGS += -version-number '$(ODP_LIBSO_VERSION)'
@@ -6,4 +6,12 @@ GEN=`grep "define ODP_VERSION_API_GENERATION" ${VFILE} | cut -d ' ' -f 3`
MAJ=`grep "define ODP_VERSION_API_MAJOR" ${VFILE} | cut -d ' ' -f 3`
MIN=`grep "define ODP_VERSION_API_MINOR" ${VFILE} | cut -d ' ' -f 3`
-echo -n $GEN.$MAJ.$MIN
+if [[ -n $1 ]]; then
+ # Set library version
+ CURRENT=$((${GEN}*100 + ${MAJ}))
+ REVISION=$MIN
+ AGE=$1
+ echo -n "${CURRENT}:${REVISION}:${AGE}"
+else
+ echo -n $GEN.$MAJ.$MIN
+fi
Signed-off-by: Anders Roxell <anders.roxell@linaro.org> --- configure.ac | 9 +++++++++ platform/Makefile.inc | 2 ++ scripts/odp_version.sh | 10 +++++++++- 3 files changed, 20 insertions(+), 1 deletion(-)