From 60abdbc7180432f187e6a9a017e6cc44456d384d Mon Sep 17 00:00:00 2001 From: Yves Arrouye Date: Mon, 16 Oct 2000 17:54:39 +0000 Subject: [PATCH] ICU-208 versioning on Solaris, all compilers X-SVN-Rev: 2693 --- icu4c/source/config/mh-solaris | 14 ++++++++++++++ icu4c/source/config/mh-solaris-sparcv9 | 14 ++++++++++++++ 2 files changed, 28 insertions(+) diff --git a/icu4c/source/config/mh-solaris b/icu4c/source/config/mh-solaris index 1947c879474..263b38eaf13 100644 --- a/icu4c/source/config/mh-solaris +++ b/icu4c/source/config/mh-solaris @@ -30,6 +30,13 @@ SHLIB.cc= $(CXX) $(DEFS) $(CPPFLAGS) $(CXXFLAGS) $(LDFLAGS) -G LD_RPATH= -R LD_RPATH_PRE= +## Compiler switch to embed a library name +LD_SONAME = -h $(MIDDLE_SO_TARGET) + +## Versioned target for a shared library. +FINAL_SO_TARGET = $(SO_TARGET).$(SO_TARGET_VERSION) +MIDDLE_SO_TARGET = $(SO_TARGET) + ## Environment variable to set a runtime search path LDLIBRARYPATH_ENVVAR = LD_LIBRARY_PATH @@ -82,4 +89,11 @@ LIBUSTDIO= -L$(top_builddir)/extra/ustdio -lustdio @echo "Generating dependency information for $<" @$(GEN_DEPS.cc) $< > $@ +## Versioned libraries rules + +%.$(SO).$(SO_TARGET_VERSION_MAJOR): %.$(SO).$(SO_TARGET_VERSION) + $(RM) $@ && ln -s $< $@ +%.$(SO): %.$(SO).$(SO_TARGET_VERSION_MAJOR) + $(RM) $@ && ln -s $*.$(SO).$(SO_TARGET_VERSION) $@ + ## End Solaris-specific setup diff --git a/icu4c/source/config/mh-solaris-sparcv9 b/icu4c/source/config/mh-solaris-sparcv9 index 9565f8da3bf..d197962a58d 100644 --- a/icu4c/source/config/mh-solaris-sparcv9 +++ b/icu4c/source/config/mh-solaris-sparcv9 @@ -24,6 +24,13 @@ SHLIB.cc= $(CXX) -xtarget=ultra -xarch=v9 $(DEFS) $(CPPFLAGS) $(CXXFLAGS) $(LDFL LD_RPATH= -R LD_RPATH_PRE= +## Compiler switch to embed a library name +LD_SONAME = -h $(MIDDLE_SO_TARGET) + +## Versioned target for a shared library. +FINAL_SO_TARGET = $(SO_TARGET).$(SO_TARGET_VERSION) +MIDDLE_SO_TARGET = $(SO_TARGET) + ## Environment variable to set a runtime search path LDLIBRARYPATH_ENVVAR = LD_LIBRARY_PATH @@ -76,4 +83,11 @@ LIBUSTDIO= -L$(top_builddir)/extra/ustdio -lustdio @echo "Generating dependency information for $<" @$(GEN_DEPS.cc) $< > $@ +## Versioned libraries rules + +%.$(SO).$(SO_TARGET_VERSION_MAJOR): %.$(SO).$(SO_TARGET_VERSION) + $(RM) $@ && ln -s $< $@ +%.$(SO): %.$(SO).$(SO_TARGET_VERSION_MAJOR) + $(RM) $@ && ln -s $*.$(SO).$(SO_TARGET_VERSION) $@ + ## End Solaris-specific setup