patches/espeak-01-makefile.diff
changeset 1002 601040dd2efb
child 1308 ed0b1d282d8c
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/patches/espeak-01-makefile.diff	Sat Mar 22 00:59:52 2008 +0000
@@ -0,0 +1,69 @@
+--- espeak-1.31-source/src/Makefile-orig	2008-03-21 19:12:21.884078000 -0500
++++ espeak-1.31-source/src/Makefile	2008-03-21 19:12:52.092806000 -0500
+@@ -11,10 +11,20 @@ STATIC_LIB_NAME = libespeak.a
+ LIB_VERSION = 1
+ LIBTAG = $(LIB_VERSION).$(RELEASE)
+ 
+-INSTALL = /usr/bin/install
++INSTALL = install
+ LN_SF = /bin/ln -sf
+ MKDIR = mkdir -p
+ 
++ifeq ($(AUDIO),pulseaudio)
++WAVE=wave_pulse.cpp
++LIB_AUDIO=pulse
++USE_AUDIO=USE_PULSEAUDIO
++else
++WAVE=wave.cpp
++LIB_AUDIO=portaudio
++USE_AUDIO=USE_PORTAUDIO
++endif
++
+ speak_SOURCES = speak.cpp compiledict.cpp dictionary.cpp intonation.cpp \
+ 	readclause.cpp setlengths.cpp numbers.cpp synth_mbrola.cpp \
+ 	synthdata.cpp synthesize.cpp translate.cpp tr_english.cpp \
+@@ -24,23 +34,22 @@ libespeak_SOURCES = speak_lib.cpp compil
+ 	readclause.cpp setlengths.cpp numbers.cpp synth_mbrola.cpp \
+ 	synthdata.cpp synthesize.cpp translate.cpp tr_english.cpp \
+ 	tr_languages.cpp voices.cpp wavegen.cpp phonemelist.cpp \
+-	espeak_command.cpp event.cpp fifo.cpp wave.cpp debug.cpp
++	espeak_command.cpp event.cpp fifo.cpp $(WAVE) debug.cpp
+ 
+ 
+ SRCS1=$(speak_SOURCES)
+ OBJS1=$(patsubst %.cpp,%.o,$(SRCS1))
+-LIBS1=-lstdc++ -lportaudio -lpthread
++LIBS1=-l$(LIB_AUDIO) -lpthread
+ 
+ SRCS2=$(libespeak_SOURCES)
+ OBJS2=$(patsubst %.cpp,x_%.o,$(SRCS2))
+-LIBS2=-lstdc++ -lportaudio -lpthread
++LIBS2=-l$(LIB_AUDIO) -lpthread
+ 
+ SRCS3 = espeak.cpp
+ OBJS3=$(patsubst %.cpp,%.o,$(SRCS3))
+-LIBS3=-lstdc++ ./libespeak.so
+-
+-CXXFLAGS=-O2
++LIBS3=libespeak.so
+ 
++CXXFLAGS=-xO2 -D$(USE_AUDIO)
+ 
+ all: $(BIN_NAME) $(LIB_NAME) $(STATIC_LIB_NAME) $(BIN2_NAME)
+ 	mv $(LIB_NAME) $(LIB_NAME).$(LIBTAG)
+@@ -54,14 +63,12 @@ $(BIN_NAME): $(OBJS1)
+ $(BIN2_NAME): $(OBJS3) $(LIB_NAME)
+ 	$(CXX) -o $@ $(OBJS3) $(LIBS3)
+ 
+-
+-
+ x_%.o: %.cpp
+ 	$(CXX) $(CXXFLAGS) -Wall -fpic -fvisibility=hidden -pedantic \
+ 	-I. -D LIBRARY -c -fno-exceptions $<  -o x_$*.o
+ 
+ $(LIB_NAME): $(OBJS2)
+-	$(CXX) -shared -Wl,-soname,$(LIB_NAME).$(LIB_VERSION) -o $@ $(OBJS2) $(LIBS2)
++	$(CXX) -G -Wl,-soname,$(LIB_NAME).$(LIB_VERSION) -o $@ $(OBJS2) $(LIBS2)
+ 
+ $(STATIC_LIB_NAME): $(OBJS2)
+ 	$(AR) cqs $(STATIC_LIB_NAME) $(OBJS2)