summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorJames Laird <jlaird@hdfgroup.org>2005-04-18 15:48:32 (GMT)
committerJames Laird <jlaird@hdfgroup.org>2005-04-18 15:48:32 (GMT)
commitd8b08dbc85dfe28d926caf3c03e9d60c63d80794 (patch)
treea4d490edda359e15621183e2f484258dca31cf3d /src
parent28a3ec72092c34489522d72363adbd9a56a0cee5 (diff)
downloadhdf5-d8b08dbc85dfe28d926caf3c03e9d60c63d80794.zip
hdf5-d8b08dbc85dfe28d926caf3c03e9d60c63d80794.tar.gz
hdf5-d8b08dbc85dfe28d926caf3c03e9d60c63d80794.tar.bz2
[svn-r10627] Purpose:
Feature - libtool shared library versioning Description: Libtool provides a mechanism for different versions of the same shared library to be distinguished. Now this is applied to HDF5 when it is built as a shared library. Solution: The version number is stored in config/lt_vers.am, and included in src/Makefile.am. This number will be automatically updated by bin/h5vers; developers only need to update it when they change the API. *** IMPORTANT *** Any time the API changes, the version number in config/lt_vers.am must be updated! Platforms tested: mir, eirene, verbena, modi4 Misc. update:
Diffstat (limited to 'src')
-rwxr-xr-xsrc/Makefile.am4
-rw-r--r--src/Makefile.in14
2 files changed, 16 insertions, 2 deletions
diff --git a/src/Makefile.am b/src/Makefile.am
index b861b36..50128e2 100755
--- a/src/Makefile.am
+++ b/src/Makefile.am
@@ -18,6 +18,7 @@
#
include $(top_srcdir)/config/commence.am
+include $(top_srcdir)/config/lt_vers.am
# How to build H5detect for number format detection.
# Use -g to force no optimization since many compilers (e.g., Intel) takes
@@ -29,6 +30,9 @@ H5detect_CFLAGS = -g
# Our main target, the HDF5 library
lib_LTLIBRARIES=libhdf5.la
+# Add libtool numbers to the HDF5 library (from config/lt_vers.am)
+libhdf5_la_LDFLAGS= -version-info $(LT_VERS_INTERFACE):$(LT_VERS_REVISION):$(LT_VERS_AGE)
+
# Temporary files
MOSTLYCLEANFILES=H5detect.o H5detect.lo H5detect H5Tinit.o H5Tinit.lo H5Tinit.c
diff --git a/src/Makefile.in b/src/Makefile.in
index a48278c..5c5c05f 100644
--- a/src/Makefile.in
+++ b/src/Makefile.in
@@ -60,7 +60,8 @@ host_triplet = @host@
DIST_COMMON = $(include_HEADERS) $(srcdir)/H5config.h.in \
$(srcdir)/Makefile.am $(srcdir)/Makefile.in \
$(srcdir)/libhdf5.settings.in $(top_srcdir)/config/commence.am \
- $(top_srcdir)/config/conclude.am
+ $(top_srcdir)/config/conclude.am \
+ $(top_srcdir)/config/lt_vers.am
noinst_PROGRAMS = H5detect$(EXEEXT)
subdir = src
ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
@@ -336,11 +337,20 @@ H5CC = $(bindir)/h5cc
H5CC_PP = $(bindir)/h5pcc
H5FC = $(bindir)/h5fc
H5FC_PP = $(bindir)/h5pfc
+
+# Add libtool shared library version numbers to the HDF5 library
+# See libtool versioning documentation online.
+LT_VERS_INTERFACE = 0
+LT_VERS_REVISION = 0
+LT_VERS_AGE = 0
H5detect_CFLAGS = -g
# Our main target, the HDF5 library
lib_LTLIBRARIES = libhdf5.la
+# Add libtool numbers to the HDF5 library (from config/lt_vers.am)
+libhdf5_la_LDFLAGS = -version-info $(LT_VERS_INTERFACE):$(LT_VERS_REVISION):$(LT_VERS_AGE)
+
# Temporary files
MOSTLYCLEANFILES = H5detect.o H5detect.lo H5detect H5Tinit.o H5Tinit.lo H5Tinit.c
@@ -420,7 +430,7 @@ all: H5config.h
.SUFFIXES:
.SUFFIXES: .c .lo .o .obj
-$(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(top_srcdir)/config/commence.am $(top_srcdir)/config/conclude.am $(am__configure_deps)
+$(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(top_srcdir)/config/commence.am $(top_srcdir)/config/lt_vers.am $(top_srcdir)/config/conclude.am $(am__configure_deps)
@for dep in $?; do \
case '$(am__configure_deps)' in \
*$$dep*) \