--- speech_tools/config/rules/defaults.mak.orig 2007-03-16 12:39:12.000000000 -0400 +++ speech_tools/config/rules/defaults.mak 2007-03-16 12:39:19.000000000 -0400 @@ -69,15 +69,21 @@ MADE_FROM_ABOVE:=$(N) endif +ifneq ($(SHARED),0) + LIBTYPE=so +else + LIBTYPE=a +endif + ifndef PROJECT_LIBDEPS - PROJECT_LIBDEPS = $(foreach l,$(PROJECT_LIBRARIES),$(PROJECT_LIBRARY_DIR_$(l))/lib$(l).a) + PROJECT_LIBDEPS = $(foreach l,$(PROJECT_LIBRARIES),$(PROJECT_LIBRARY_DIR_$(l))/lib$(l).$(LIBTYPE)) endif ifndef PROJECT_LIBS PROJECT_LIBS = $(foreach l,$(PROJECT_LIBRARIES),-L$(PROJECT_LIBRARY_DIR_$(l)) -l$(l)) endif ifndef REQUIRED_LIBDEPS - REQUIRED_LIBDEPS = $(foreach l,$(REQUIRED_LIBRARIES),$(REQUIRED_LIBRARY_DIR_$(l))/lib$(l).a) + REQUIRED_LIBDEPS = $(foreach l,$(REQUIRED_LIBRARIES),$(REQUIRED_LIBRARY_DIR_$(l))/lib$(l).$(LIBTYPE)) endif ifndef REQUIRED_LIBS REQUIRED_LIBS = $(foreach l,$(REQUIRED_LIBRARIES),-L$(REQUIRED_LIBRARY_DIR_$(l)) -l$(l)) --- festival/config/project.mak.orig 2007-03-16 13:01:40.000000000 -0400 +++ festival/config/project.mak 2007-03-16 13:02:24.000000000 -0400 @@ -83,6 +83,8 @@ PROJECT_LIBRARY_DIR_Festival = $(TOP)/src/lib PROJECT_DEFAULT_LIBRARY = Festival +PROJECT_LIBRARY_VERSION_Festival = $(PROJECT_VERSION).0 + # Libraries used from other projects REQUIRED_LIBRARIES = estools estbase eststring diff -p -up festival/speech_tools/config/compilers/gcc_defaults.mak.bettersoname festival/speech_tools/config/compilers/gcc_defaults.mak --- speech_tools/config/compilers/gcc_defaults.mak.bettersoname 2010-12-06 10:25:35.000000000 +0100 +++ speech_tools/config/compilers/gcc_defaults.mak 2010-12-06 10:27:51.000000000 +0100 @@ -83,7 +83,7 @@ SHARED_CXXFLAGS = -fPIC ifndef GCC_MAKE_SHARED_LIB # Older versions of gcc might have required -fno-shared-data # MAKE_SHARED_LIB = $(CXX) -shared -fno-shared-data -o XXX - MAKE_SHARED_LIB = $(CXX) -shared -o XXX + MAKE_SHARED_LIB = $(CXX) -shared -o XXX -Wl,-soname,YYY else MAKE_SHARED_LIB = $(GCC_MAKE_SHARED_LIB) endif diff -p -up festival/speech_tools/config/rules/library.mak.bettersoname festival/speech_tools/config/rules/library.mak --- speech_tools/config/rules/library.mak.bettersoname 2001-04-04 13:55:32.000000000 +0200 +++ speech_tools/config/rules/library.mak 2010-12-06 10:25:35.000000000 +0100 @@ -103,14 +103,14 @@ endif ########################################################################### lib%.so : lib%.a - @echo Make Shared Library $* + @echo Make Shared Library $(*F) @if [ ! -d shared_space ] ; then mkdir shared_space ; else $(RM) -f shared_space/*.o ; fi @(cd shared_space ; $(AR) x ../$< ) - @echo Link Shared Library $* - if [ -n "$(PROJECT_LIBRARY_NEEDS_SYSLIBS_$*)" ] ; then libs='$(JAVA_PROJECT_LIBS)' ; fi ;\ - $(subst XXX,$@.$(PROJECT_LIBRARY_VERSION_$*),$(MAKE_SHARED_LIB)) shared_space/*.o $(PROJECT_LIBRARY_USES_$*:%=-L. -l%) $$libs + @echo Link Shared Library $(*F) + if [ -n "$(PROJECT_LIBRARY_NEEDS_SYSLIBS_$(*F))" ] ; then libs='$(JAVA_PROJECT_LIBS)' ; fi ;\ + $(subst XXX,$@.$(PROJECT_LIBRARY_VERSION_$(*F)),$(subst YYY,$(@F).$(PROJECT_LIBRARY_VERSION_$(*F)),$(MAKE_SHARED_LIB))) shared_space/*.o $(PROJECT_LIBRARY_USES_$(*F):%=-L. -l%) $$libs @$(RM) -f shared_space/*.o $@ - @ln -s $@.$(PROJECT_LIBRARY_VERSION_$*) $@ + @ln -s $(@F).$(PROJECT_LIBRARY_VERSION_$(*F)) $@ ########################################################################### ## ##