From 5cabc9f1341339f601d1bf8c40dac286292a85cc Mon Sep 17 00:00:00 2001 From: Yves Arrouye Date: Wed, 30 Jan 2002 02:10:28 +0000 Subject: [PATCH] ICU-1632 versioning of libraries for Darwin. do not set SO_MIDDLE_NAME in Makefile! X-SVN-Rev: 7528 --- icu4c/source/config/mh-darwin | 23 +++++++++++++++-------- icu4c/source/stubdata/Makefile.in | 10 ---------- 2 files changed, 15 insertions(+), 18 deletions(-) diff --git a/icu4c/source/config/mh-darwin b/icu4c/source/config/mh-darwin index 6b22c892de9..0512ce531dc 100644 --- a/icu4c/source/config/mh-darwin +++ b/icu4c/source/config/mh-darwin @@ -4,7 +4,7 @@ ## Copyright (c) 1999-2002, International Business Machines Corporation and ## others. All Rights Reserved. ## -## $Id: mh-darwin,v 1.20 2002/01/25 06:28:45 yves-oss Exp $ +## $Id: mh-darwin,v 1.21 2002/01/30 02:10:27 yves-oss Exp $ ## Flags for position independent code SHAREDLIBCFLAGS = -dynamic @@ -20,25 +20,25 @@ COMPILE.c= $(CC) $(DEFS) $(CPPFLAGS) $(CFLAGS) -fno-common -c COMPILE.cc= $(CXX) $(DEFS) $(CPPFLAGS) $(CXXFLAGS) -fno-common -c ## Commands to make a shared library -SHLIB.c= $(CC) -dynamiclib -dynamic $(DEFS) $(CPPFLAGS) $(CFLAGS) $(LDFLAGS) -install_name $(DESTDIR)$(libdir)/$(TARGET) -SHLIB.cc= $(CXX) -dynamiclib -dynamic $(DEFS) $(CPPFLAGS) $(CXXFLAGS) $(LDFLAGS) -install_name $(DESTDIR)$(libdir)/$(TARGET) +SHLIB.c= $(CC) -dynamiclib -dynamic $(DEFS) $(CPPFLAGS) $(CFLAGS) $(LDFLAGS) -install_name $(DESTDIR)$(libdir)/$(FINAL_SO_TARGET) +SHLIB.cc= $(CXX) -dynamiclib -dynamic $(DEFS) $(CPPFLAGS) $(CXXFLAGS) $(LDFLAGS) -install_name $(DESTDIR)$(libdir)/$(FINAL_SO_TARGET) ## Compiler switch to embed a runtime search path -LD_RPATH= -L +LD_RPATH= LD_RPATH_PRE= ## Environment variable to set a runtime search path LDLIBRARYPATH_ENVVAR = DYLD_LIBRARY_PATH -## Versioned target for a shared library. -FINAL_SO_TARGET = $(SO_TARGET) -MIDDLE_SO_TARGET = - ## Shared object suffix SO= dylib ## Non-shared intermediate object suffix STATIC_O = ao +## Versioned target for a shared library. +FINAL_SO_TARGET = $(basename $(SO_TARGET)).$(SO_TARGET_VERSION).$(SO) +MIDDLE_SO_TARGET = $(basename $(SO_TARGET)).$(SO) + ## Compilation rules %.$(STATIC_O): $(srcdir)/%.c $(COMPILE.c) $(STATICCPPFLAGS) $(STATICCFLAGS) -o $@ $< @@ -66,4 +66,11 @@ STATIC_O = ao | sed '\''s/\($*\)\.o[ :]*/\1.o $@ : /g'\'' > $@; \ [ -s $@ ] || rm -f $@' +## Versioned libraries rules + +%.$(SO_TARGET_VERSION_MAJOR).$(SO): %.$(SO_TARGET_VERSION).$(SO) + $(RM) $@ && ln -s ${ files, which -# ends up defining the actual name of the library to the linker. -# -# Also, data probably wants to have three alias names, in the same -# way that the code libraries do. Doing that would require changing -# the stub data and the real data at the same time. -# ifneq ($(ENABLE_SHARED),) SO_TARGET = libicudata.$(SO) -MIDDLE_SO_TARGET = libicudata$(BATCH_STUB_SUFFIX).$(SO).$(SO_TARGET_VERSION_MAJOR) ALL_SO_TARGETS = $(SO_TARGET) $(MIDDLE_SO_TARGET) $(FINAL_SO_TARGET) $(BATCH_STUB_TARGET) endif