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