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