Blame SOURCES/flite-1.3-sharedlibs.patch

73d0ca
diff -uNr flite-1.3-release/config/common_make_rules flite-1.3-release-mod/config/common_make_rules
73d0ca
--- flite-1.3-release/config/common_make_rules	2004-12-20 00:20:43.000000000 +0200
73d0ca
+++ flite-1.3-release-mod/config/common_make_rules	2006-11-12 12:17:25.000000000 +0200
73d0ca
@@ -59,27 +59,35 @@
73d0ca
 endif
73d0ca
 OBJDIR=$(BUILDDIR)/obj/$(DIRNAME)
73d0ca
 BINDIR=$(BUILDDIR)/bin
73d0ca
+LIBDIR=$(BUILDDIR)/lib
73d0ca
 ifeq ($(HOST_PLATFORM),$(TARGET_PLATFORM))
73d0ca
 BINDIR=$(TOP)/bin
73d0ca
+LIBDIR=$(TOP)/lib
73d0ca
 endif
73d0ca
 
73d0ca
-LIBDIR=$(BUILDDIR)/lib
73d0ca
 BUILDDIRS=$(OBJDIR) $(BINDIR) $(LIBDIR)
73d0ca
 
73d0ca
-FLITELIBS = $(BUILDDIR)/lib/libflite.a
73d0ca
-LDFLAGS += -L$(BUILDDIR)/lib -lflite -lm $(AUDIOLIBS) $(OTHERLIBS)
73d0ca
+ifdef SHFLAGS
73d0ca
+FLITELIBS = $(LIBDIR)/libflite.so
73d0ca
+LDFLAGS += -L$(LIBDIR) -lflite $(OTHERLIBS)
73d0ca
+else
73d0ca
+FLITELIBS = $(LIBDIR)/libflite.a
73d0ca
+LDFLAGS += -L$(LIBDIR) -lflite -lm $(AUDIOLIBS) $(OTHERLIBS)
73d0ca
+endif
73d0ca
 
73d0ca
 FULLOBJS = $(OBJS:%=$(OBJDIR)/%)
73d0ca
 ifdef SHFLAGS
73d0ca
 SOOBJS = $(OBJS:.o=.os)
73d0ca
-FULLSHOBJS = $(SOOBJS:%=$(OBJDIR)/%)
73d0ca
+FULLSOOBJS = $(SOOBJS:%=$(OBJDIR)/%)
73d0ca
 ifdef LIBNAME
73d0ca
 ALL += $(OBJDIR)/.build_so
73d0ca
 endif
73d0ca
-endif
73d0ca
+else
73d0ca
 ifdef LIBNAME
73d0ca
 ALL += $(OBJDIR)/.build_lib
73d0ca
 endif
73d0ca
+endif
73d0ca
+
73d0ca
 # Only do some directories when you are not cross compiling
73d0ca
 ifeq ($(HOST_PLATFORM),$(TARGET_PLATFORM))
73d0ca
 OTHER_BUILD_DIRS = $(HOST_ONLY_DIRS)
73d0ca
@@ -117,14 +125,14 @@
73d0ca
 	@ touch $(OBJDIR)/.build_so
73d0ca
 
73d0ca
 # Used in the lib/ directory and in building new voices
73d0ca
-$(OBJDIR)/%.so: %.shared.a
73d0ca
+%.so: %.shared.a
73d0ca
 	@ echo making $@
73d0ca
 	@ rm -rf shared_os && mkdir shared_os
73d0ca
-	@ rm -f $@ $(LIBDIR)/$@.${PROJECT_VERSION} $(LIBDIR)/$@.${PROJECT_SHLIB_VERSION} 
73d0ca
+	@ rm -f $@ $@.${PROJECT_VERSION} $@.${PROJECT_SHLIB_VERSION} 
73d0ca
 	@ (cd shared_os && ar x ../$<)
73d0ca
-	@ (cd shared_os && $(CC) -shared -Wl,-soname,$@.${PROJECT_SHLIB_VERSION} -o ../$@.${PROJECT_VERSION} *.os)
73d0ca
-	@ ln -s $(LIBDIR)/$@.${PROJECT_VERSION} $(LIBDIR)/$@.${PROJECT_SHLIB_VERSION}
73d0ca
-	@ ln -s $(LIBDIR)/$@.${PROJECT_SHLIB_VERSION} $(LIBDIR)/$@
73d0ca
+	@ (cd shared_os && $(CC) -shared -Wl,-soname,$@.${PROJECT_SHLIB_VERSION} -o ../$@.${PROJECT_VERSION} *.os -L../ $($(@:%.so=%_LDLIBS)))
73d0ca
+	@ ln -s $@.${PROJECT_VERSION} $@.${PROJECT_SHLIB_VERSION}
73d0ca
+	@ ln -s $@.${PROJECT_SHLIB_VERSION} $@
73d0ca
 	@ rm -rf shared_os
73d0ca
 
73d0ca
 $(OBJDIR)/.make_build_dirs:
73d0ca
diff -uNr flite-1.3-release/lib/Makefile flite-1.3-release-mod/lib/Makefile
73d0ca
--- flite-1.3-release/lib/Makefile	1970-01-01 02:00:00.000000000 +0200
73d0ca
+++ flite-1.3-release-mod/lib/Makefile	2006-11-12 12:17:40.000000000 +0200
73d0ca
@@ -0,0 +1,73 @@
73d0ca
+###########################################################################
73d0ca
+##                                                                       ##
73d0ca
+##                  Language Technologies Institute                      ##
73d0ca
+##                     Carnegie Mellon University                        ##
73d0ca
+##                        Copyright (c) 1999                             ##
73d0ca
+##                        All Rights Reserved.                           ##
73d0ca
+##                                                                       ##
73d0ca
+##  Permission is hereby granted, free of charge, to use and distribute  ##
73d0ca
+##  this software and its documentation without restriction, including   ##
73d0ca
+##  without limitation the rights to use, copy, modify, merge, publish,  ##
73d0ca
+##  distribute, sublicense, and/or sell copies of this work, and to      ##
73d0ca
+##  permit persons to whom this work is furnished to do so, subject to   ##
73d0ca
+##  the following conditions:                                            ##
73d0ca
+##   1. The code must retain the above copyright notice, this list of    ##
73d0ca
+##      conditions and the following disclaimer.                         ##
73d0ca
+##   2. Any modifications must be clearly marked as such.                ##
73d0ca
+##   3. Original authors' names are not deleted.                         ##
73d0ca
+##   4. The authors' names are not used to endorse or promote products   ##
73d0ca
+##      derived from this software without specific prior written        ##
73d0ca
+##      permission.                                                      ##
73d0ca
+##                                                                       ##
73d0ca
+##  CARNEGIE MELLON UNIVERSITY AND THE CONTRIBUTORS TO THIS WORK         ##
73d0ca
+##  DISCLAIM ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING      ##
73d0ca
+##  ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT   ##
73d0ca
+##  SHALL CARNEGIE MELLON UNIVERSITY NOR THE CONTRIBUTORS BE LIABLE      ##
73d0ca
+##  FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES    ##
73d0ca
+##  WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN   ##
73d0ca
+##  AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION,          ##
73d0ca
+##  ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF       ##
73d0ca
+##  THIS SOFTWARE.                                                       ##
73d0ca
+##                                                                       ##
73d0ca
+###########################################################################
73d0ca
+##                                                                       ##
73d0ca
+##    FLITE libraries                                                    ##
73d0ca
+##                                                                       ##
73d0ca
+###########################################################################
73d0ca
+TOP=..
73d0ca
+DIRNAME=lib
73d0ca
+BUILD_DIRS = 
73d0ca
+ALL_DIRS=
73d0ca
+FILES = Makefile
73d0ca
+LIBNAMES = flite flite_cmulex flite_usenglish \
73d0ca
+           flite_cmu_us_kal flite_cmu_us_kal16 flite_cmu_time_awb
73d0ca
+
73d0ca
+STATICLIBS= $(LIBNAMES:%=lib%.a)
73d0ca
+SHAREDARLIBS= $(LIBNAMES:%=lib%.shared.a)
73d0ca
+#SHAREDLIBS = $(LIBNAMES:%=lib%.so)
73d0ca
+SHAREDLIBS = $(SHAREDARLIBS:%.shared.a=%.so)
73d0ca
+VERSIONSHAREDLIBS = $(SHAREDLIBS:%=%.${PROJECT_VERSION}) \
73d0ca
+                    $(SHAREDLIBS:%=%.${PROJECT_SHLIB_VERSION})
73d0ca
+ALL_LIBS = $(SHAREDLIBS) $(VERSIONSHAREDLIBS)
73d0ca
+
73d0ca
+ALL = shared_libs
73d0ca
+
73d0ca
+LOCAL_CLEAN=*.a *.so *.so.${PROJECT_VERSION} *.so.${PROJECT_SHLIB_VERSION}
73d0ca
+
73d0ca
+include $(TOP)/config/common_make_rules
73d0ca
+
73d0ca
+ifdef SHFLAGS
73d0ca
+shared_libs: $(SHAREDLIBS)
73d0ca
+libflite_LDLIBS = -lm $(AUDIOLIBS)
73d0ca
+libflite_cmulex_LDLIBS = -lflite
73d0ca
+libflite_usenglish_LDLIBS = -lflite
73d0ca
+libflite_cmu_us_kal_LDLIBS = -lflite_cmulex -lflite_usenglish
73d0ca
+libflite_cmu_us_kal16_LDLIBS = -lflite_cmulex -lflite_usenglish
73d0ca
+libflite_cmu_time_awb_LDLIBS = -lflite -lflite_cmulex -lflite_usenglish
73d0ca
+else
73d0ca
+shared_libs: nothing
73d0ca
+endif
73d0ca
+
73d0ca
+install:
73d0ca
+	@ tar cvf - $(ALL_LIBS) | ( cd $(INSTALLLIBDIR) && tar xf -)
73d0ca
+
73d0ca
diff -uNr flite-1.3-release/main/Makefile flite-1.3-release-mod/main/Makefile
73d0ca
--- flite-1.3-release/main/Makefile	2005-08-08 00:38:42.000000000 +0200
73d0ca
+++ flite-1.3-release-mod/main/Makefile	2006-11-12 11:44:46.000000000 +0200
73d0ca
@@ -50,11 +50,11 @@
73d0ca
 
73d0ca
 flite_LIBS = flite_$(FL_VOX) flite_$(FL_LANG) flite_$(FL_LEX) 
73d0ca
 flite_LIBS_flags = -L$(LIBDIR) $(flite_LIBS:%=-l%)
73d0ca
-flite_LIBS_deps = $(flite_LIBS:%=$(LIBDIR)/lib%.a)
73d0ca
+flite_LIBS_deps = $(flite_LIBS:%=$(LIBDIR)/lib%.so)
73d0ca
 
73d0ca
 flite_time_LIBS = flite_cmu_time_awb flite_$(FL_LANG) flite_$(FL_LEX)
73d0ca
 flite_time_LIBS_flags = -L$(LIBDIR) $(flite_time_LIBS:%=-l%)
73d0ca
-flite_time_LIBS_deps = $(flite_time_LIBS:%=$(LIBDIR)/lib%.a)
73d0ca
+flite_time_LIBS_deps = $(flite_time_LIBS:%=$(LIBDIR)/lib%.so)
73d0ca
 
73d0ca
 include $(TOP)/config/common_make_rules
73d0ca
 
73d0ca
diff -uNr flite-1.3-release/Makefile flite-1.3-release-mod/Makefile
73d0ca
--- flite-1.3-release/Makefile	2005-11-01 15:40:45.000000000 +0200
73d0ca
+++ flite-1.3-release-mod/Makefile	2006-11-12 11:44:46.000000000 +0200
73d0ca
@@ -41,7 +41,7 @@
73d0ca
 ###########################################################################
73d0ca
 TOP=.
73d0ca
 DIRNAME=
73d0ca
-BUILD_DIRS = include src lang doc
73d0ca
+BUILD_DIRS = include src lang lib doc
73d0ca
 ALL_DIRS=config $(BUILD_DIRS) testsuite sapi palm tools main
73d0ca
 CONFIG=configure configure.in config.sub config.guess \
73d0ca
        missing install-sh mkinstalldirs