78 lines
2.4 KiB
Plaintext
Executable File
78 lines
2.4 KiB
Plaintext
Executable File
$OpenBSD: patch-src_Makefile,v 1.3 2008/11/04 06:40:26 sturm Exp $
|
|
--- src/Makefile.orig Wed Apr 16 06:06:34 2008
|
|
+++ src/Makefile Mon Nov 3 22:30:44 2008
|
|
@@ -1,19 +1,20 @@
|
|
# remove -fno-exceptions if it causes problems with stdio library on some platforms (ARM)
|
|
|
|
-PREFIX=/usr
|
|
BINDIR=$(PREFIX)/bin
|
|
INCDIR=$(PREFIX)/include/espeak
|
|
LIBDIR=$(PREFIX)/lib
|
|
-DATADIR=$(PREFIX)/share/espeak-data
|
|
+DATADIR=${PREFIX}/share/espeak-data
|
|
|
|
RELEASE = 1.37
|
|
BIN_NAME = speak
|
|
BIN2_NAME = espeak
|
|
LIB_NAME = libespeak.so
|
|
STATIC_LIB_NAME = libespeak.a
|
|
-LIB_VERSION = 1
|
|
-LIBTAG = $(LIB_VERSION).$(RELEASE)
|
|
+LIB_VERSION = 0.0
|
|
+LIBTAG = $(LIB_VERSION)
|
|
|
|
+LPATH= -L${LOCALBASE}/lib -Wl,-R${LOCALBASE}/lib
|
|
+
|
|
# Use SONAME_OPT=-Wl,h, on Solaris
|
|
SONAME_OPT=-Wl,-soname,
|
|
|
|
@@ -60,39 +61,37 @@ libespeak_SOURCES = speak_lib.cpp compiledict.cpp dict
|
|
|
|
SRCS1=$(speak_SOURCES)
|
|
OBJS1=$(patsubst %.cpp,%.o,$(SRCS1))
|
|
-LIBS1=-lstdc++ $(LIB_AUDIO) -lpthread $(EXTRA_LIBS)
|
|
+LIBS1=-lstdc++ $(LPATH) -lportaudio -pthread
|
|
|
|
SRCS2=$(libespeak_SOURCES)
|
|
OBJS2=$(patsubst %.cpp,x_%.o,$(SRCS2))
|
|
-LIBS2=-lstdc++ $(LIB_AUDIO) -lpthread
|
|
+LIBS2=-lstdc++ $(LPATH) -lportaudio -pthread
|
|
|
|
SRCS3 = espeak.cpp
|
|
OBJS3=$(patsubst %.cpp,%.o,$(SRCS3))
|
|
-LIBS3=-lstdc++ -L . -lespeak
|
|
+LIBS3=-lstdc++ -L . -lespeak $(LPATH) -lportaudio -pthread
|
|
|
|
-CXXFLAGS=-O2
|
|
|
|
-
|
|
all: $(BIN_NAME) $(LIB_NAME) $(STATIC_LIB_NAME) $(BIN2_NAME)
|
|
mv $(LIB_NAME) $(LIB_NAME).$(LIBTAG)
|
|
|
|
.cpp.o:
|
|
- $(CXX) $(CXXFLAGS) $(USE_AUDIO) -D PATH_ESPEAK_DATA=\"$(DATADIR)\" -Wall -pedantic -I. -c -fno-exceptions $<
|
|
+ $(CXX) $(CXXFLAGS) $(EXTRA_FLAGS) $(USE_AUDIO) -D PATH_ESPEAK_DATA=\"$(DATADIR)\" -Wall -pedantic -I. -c -fno-exceptions $<
|
|
|
|
$(BIN_NAME): $(OBJS1)
|
|
- $(CXX) -o $@ $(OBJS1) $(LIBS1)
|
|
+ $(CXX) -o $@ $(EXTRA_FLAGS) $(OBJS1) $(LIBS1)
|
|
|
|
$(BIN2_NAME): $(OBJS3) $(LIB_NAME)
|
|
- $(CXX) -o $@ $(OBJS3) $(LIBS3)
|
|
+ $(CXX) -o $@ $(EXTRA_FLAGS) $(OBJS3) $(LIBS3)
|
|
|
|
|
|
|
|
x_%.o: %.cpp
|
|
- $(CXX) $(CXXFLAGS) $(USE_AUDIO) -Wall -fpic -pedantic \
|
|
- -I. -D LIBRARY -c -fno-exceptions $< -o x_$*.o
|
|
+ $(CXX) $(CXXFLAGS) $(USE_AUDIO) -Wall -fPIC -DPIC -pedantic \
|
|
+ -I. -DLIBRARY -DPATH_ESPEAK_DATA=\"$(DATADIR)\" -c -fno-exceptions $< -o x_$*.o
|
|
|
|
$(LIB_NAME): $(OBJS2)
|
|
- $(CXX) -shared $(SONAME_OPT)$(LIB_NAME).$(LIB_VERSION) -o $@ $(OBJS2) $(LIBS2)
|
|
+ $(CXX) -shared -fPIC $(SONAME_OPT)$(LIB_NAME).$(LIB_VERSION) -o $@ $(OBJS2) $(LIBS2) $(EXTRA_FLAGS)
|
|
|
|
$(STATIC_LIB_NAME): $(OBJS2)
|
|
$(AR) cqs $(STATIC_LIB_NAME) $(OBJS2)
|