Index: flite-1.4-release/main/Makefile
===================================================================
--- flite-1.4-release.orig/main/Makefile
+++ flite-1.4-release/main/Makefile
@@ -85,17 +85,17 @@ $(BINDIR)/flite$(EXEEXT): flite_main.o $
 	$(TOP)/tools/make_voice_list $(VOICES)
 	rm -f flite_voice_list.o
 	$(MAKE) flite_voice_list.o
-	$(CC) $(CFLAGS) -o $@ flite_main.o flite_voice_list.o $(flite_LIBS_flags) $(LDFLAGS)
+	$(CC) $(CFLAGS) $(LDFLAGS) flite_main.o flite_voice_list.o $(flite_LIBS_flags) $(LIBADD) -o $@
 
 $(BINDIR)/flite_time$(EXEEXT): flite_time_main.o $(flite_time_LIBS_deps)
-	$(CC) $(CFLAGS) -o $@ flite_time_main.o $(flite_time_LIBS_flags) $(FLITELIBFLAGS) $(LDFLAGS) 
+	$(CC) $(CFLAGS) $(LDFLAGS) flite_time_main.o $(flite_time_LIBS_flags) $(FLITELIBFLAGS) $(LIBADD) -o $@
 
 $(BINDIR)/t2p$(EXEEXT): t2p_main.o $(flite_LIBS_deps)
-	$(CC) $(CFLAGS) -o $@ t2p_main.o $(flite_LIBS_flags) $(LDFLAGS)
+	$(CC) $(CFLAGS) $(LDFLAGS) t2p_main.o $(flite_LIBS_flags) $(LIBADD) -o $@
 
 
 $(BINDIR)/compile_regexes$(EXEEXT): compile_regexes.o $(FLITELIBS)
-	$(CC) $(CFLAGS) -o $@ compile_regexes.o $(FLITELIBFLAGS) $(LDFLAGS)
+	$(CC) $(CFLAGS) $(LDFLAGS) compile_regexes.o $(FLITELIBFLAGS) $(LIBADD) -o $@
 
 each:
 	@ for i in $(VOICES) ; \
@@ -107,7 +107,7 @@ $(BINDIR)/flite_${VOICE}: flite_main.o $
 	$(TOP)/tools/make_voice_list $(VOICE)
 	rm -f flite_voice_list.o
 	$(MAKE) flite_voice_list.o
-	$(CC) $(CFLAGS) -o $@ flite_main.o flite_voice_list.o $(flite_LIBS_flags) $(LDFLAGS)
+	$(CC) $(CFLAGS) $(LDFLAGS) flite_main.o flite_voice_list.o $(flite_LIBS_flags) $(LIBADD) -o $@
 
 install:
 #       The basic binaries
Index: flite-1.4-release/config/common_make_rules
===================================================================
--- flite-1.4-release.orig/config/common_make_rules
+++ flite-1.4-release/config/common_make_rules
@@ -69,7 +69,8 @@ BUILDDIRS=$(OBJDIR) $(BINDIR) $(LIBDIR)
 
 ifdef SHFLAGS
 FLITELIBS = $(LIBDIR)/libflite.so
-LDFLAGS += -L$(LIBDIR) -lflite $(OTHERLIBS)
+LIBADD += -L$(LIBDIR) -lflite $(OTHERLIBS)
+LDFLAGS +=
 else
 FLITELIBS = $(LIBDIR)/libflite.a
 LDFLAGS += -L$(LIBDIR) -lflite -lm $(AUDIOLIBS) $(OTHERLIBS)
Index: flite-1.4-release/tools/Makefile
===================================================================
--- flite-1.4-release.orig/tools/Makefile
+++ flite-1.4-release/tools/Makefile
@@ -62,9 +62,9 @@ include $(TOP)/config/common_make_rules
 LOCAL_CLEAN = $(BINDIR)/find_sts $(BINDIR)/flite_sort
 
 $(BINDIR)/find_sts: find_sts_main.o $(FLITELIBS) 
-	$(CC) $(CFLAGS) -o $@ find_sts_main.o $(FLITELIBFLAGS) $(LDFLAGS)
+	$(CC) $(CFLAGS) $(LDFLAGS) find_sts_main.o $(FLITELIBFLAGS) $(LIBADD) -o $@
 $(BINDIR)/flite_sort: flite_sort_main.o $(FLITELIBS)
-	$(CC) $(CFLAGS) -o $@ flite_sort_main.o $(FLITELIBFLAGS) $(LDFLAGS)
+	$(CC) $(CFLAGS) $(LDFLAGS) flite_sort_main.o $(FLITELIBFLAGS) $(LIBADD) -o $@
 makescripts:
 	@ cp -p $(SCRIPTS) $(TOP)/bin
 
Index: flite-1.4-release/testsuite/Makefile
===================================================================
--- flite-1.4-release.orig/testsuite/Makefile
+++ flite-1.4-release/testsuite/Makefile
@@ -71,5 +71,5 @@ MAIN_O = $(SRCS:%=%_main.o)
 $(MAIN_O) : %_main.o : %_main.c
 	$(CC) $(CFLAGS) -o $@ $< 
 $(ALL) : %$(EXEEXT) : %_main.o $(FLITELIBS)
-	$(CC) $(CFLAGS) -o $@ $@_main.o $($(@:=_LIBS)) $(FLITELIBFLAGS) $(LDFLAGS)
+	$(CC) $(CFLAGS) $(LDFLAGS) $@_main.o $($(@:=_LIBS)) $(FLITELIBFLAGS) $(LIBADD) -o $@
 
Index: flite-1.4-release/tools/Makefile.flite
===================================================================
--- flite-1.4-release.orig/tools/Makefile.flite
+++ flite-1.4-release/tools/Makefile.flite
@@ -103,7 +103,7 @@ $(VOICENAME)_mcep.o: $(VOICENAME)_mcep.c
 	$(CC) -I. -I$(FLITEDIR)/include -c -o $@ $<
 
 flite_$(VOICENAME): flite_main.o flite_voice_list.o $(FLITELIBS) lib$(VOICENAME).a
-	$(CC) $(CFLAGS) -o $@ flite_main.o flite_voice_list.o $(LOCAL_LIBS)  $(LOCAL_LANGLEX_LIBS) $(FLITELIBFLAGS) $(LDFLAGS)
+	$(CC) $(CFLAGS) $(LDFLAGS) flite_main.o flite_voice_list.o $(LOCAL_LIBS)  $(LOCAL_LANGLEX_LIBS) $(FLITELIBFLAGS) $(LIBADD) -o $@
 
 .build_lib: $(OBJS)
 	@ $(AR) cruv $(LIBDIR)/lib$(VOICENAME).a $(OBJS)
