ref: 4e2ee15fa101e23939f78f246754de558034fa40
parent: 4ffb819bfda1159554286c1cb0b9d5093cc9cd0c
parent: 6e3c1a2fa29c066f7d1a25037a1f61cd295ac3af
author: CMU Festvox Project <31623582+festvox@users.noreply.github.com>
date: Sun Mar 4 03:30:49 EST 2018
Merge pull request #5 from paulgevers/internal-linking Improve internal linking
--- a/config/common_make_rules
+++ b/config/common_make_rules
@@ -123,7 +123,7 @@
@ rm -rf shared_os && mkdir shared_os
@ rm -f $@ $@.${PROJECT_VERSION} $@.${PROJECT_SHLIB_VERSION}
@ (cd shared_os && ar x ../$<)
- @ (cd shared_os && $(CC) -shared -Wl,-soname,`basename $@`.${PROJECT_SHLIB_VERSION} -o ../$@.${PROJECT_VERSION} *.os)
+ @ (cd shared_os && $(CC) -shared -Wl,-soname,`basename $@`.${PROJECT_SHLIB_VERSION} -o ../$@.${PROJECT_VERSION} *.os $(LDFLAGS))
@ (cd $(LIBDIR) && ln -s `basename $@.${PROJECT_VERSION}` `basename $@.${PROJECT_SHLIB_VERSION}` )
@ (cd $(LIBDIR) && ln -s `basename $@.${PROJECT_SHLIB_VERSION}` `basename $@` )
@ rm -rf shared_os
--- a/main/Makefile
+++ b/main/Makefile
@@ -54,7 +54,8 @@
VOICES=$(VOXES)
VOICELIBS=$(VOICES:%=flite_%)
-flite_LIBS = $(VOICELIBS) $(LANGS:%=flite_%) $(LEXES:%=flite_%) flite
+flite_MODS = $(VOICELIBS) $(LANGS:%=flite_%) $(LEXES:%=flite_%)
+flite_LIBS = flite $(flite_MODS)
flite_LIBS_flags = -L$(LIBDIR) $(flite_LIBS:%=-l%)
flite_LIBS_deps = $(flite_LIBS:%=$(LIBDIR)/lib%.a)
@@ -65,6 +66,10 @@
# so make clean can remove them
SHAREDARLIBS= $(flite_LIBS:%=$(LIBDIR)/lib%.shared.a)
SHAREDLIBS = $(SHAREDARLIBS:%.shared.a=%.so)
+SHAREDMODS = $(flite_MODS:%=$(LIBDIR)/lib%.so)
+SHAREDusenMODS = $(LIBDIR)/libflite_cmu_time_awb.so $(LIBDIR)/libflite_cmu_us_awb.so $(LIBDIR)/libflite_cmu_us_kal16.so $(LIBDIR)/libflite_cmu_us_kal.so $(LIBDIR)/libflite_cmu_us_rms.so $(LIBDIR)/libflite_cmu_us_slt.so $(LIBDIR)/libflite_cmu_indic_lang.so
+SHAREDcmulexMODS = $(LIBDIR)/libflite_cmu_time_awb.so $(LIBDIR)/libflite_cmu_us_awb.so $(LIBDIR)/libflite_cmu_us_kal16.so $(LIBDIR)/libflite_cmu_us_kal.so $(LIBDIR)/libflite_cmu_us_rms.so $(LIBDIR)/libflite_cmu_us_slt.so $(LIBDIR)/libflite_cmu_indic_lex.so
+SHAREDindicMODS = $(LIBDIR)/libflite_cmu_indic_lex.so
VERSIONSHAREDLIBS = $(SHAREDLIBS:%=%.${PROJECT_VERSION}) \
$(SHAREDLIBS:%=%.${PROJECT_SHLIB_VERSION})
@@ -79,7 +84,14 @@
flite_voice_list.c
ifdef SHFLAGS
-flite_LIBS_flags += -Wl,-rpath $(LIBDIR)
+$(SHAREDMODS): $(LIBDIR)/libflite.so
+$(SHAREDMODS): LDFLAGS+=-L../$(LIBDIR) -lflite
+$(SHAREDusenMODS): $(LIBDIR)/libflite_usenglish.so
+$(SHAREDusenMODS): LDFLAGS+=-L../$(LIBDIR) -lflite_usenglish
+$(SHAREDcmulexMODS): $(LIBDIR)/libflite_cmulex.so
+$(SHAREDcmulexMODS): LDFLAGS+=-L../$(LIBDIR) -lflite_cmulex
+$(SHAREDindicMODS): $(LIBDIR)/libflite_cmu_indic_lang.so
+$(SHAREDindicMODS): LDFLAGS+=-L../$(LIBDIR) -lflite_cmu_indic_lang
shared_libs: $(SHAREDLIBS)
else
shared_libs: nothing