73 lines
2.4 KiB
Plaintext
Executable File
73 lines
2.4 KiB
Plaintext
Executable File
$OpenBSD: patch-src_Makefile,v 1.4 2009/03/23 12:02:28 ajacoutot Exp $
|
|
--- src/Makefile.orig Mon Mar 23 12:36:15 2009
|
|
+++ src/Makefile Mon Mar 23 12:39:29 2009
|
|
@@ -1,6 +1,5 @@
|
|
# 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
|
|
@@ -11,9 +10,11 @@ BIN_NAME = speak
|
|
BIN2_NAME = espeak
|
|
LIB_NAME = libespeak.so
|
|
STATIC_LIB_NAME = libespeak.a
|
|
-LIB_VERSION = 1
|
|
-LIBTAG = $(LIB_VERSION).$(RELEASE)
|
|
+LIB_VERSION = ${LIBespeak_VERSION}
|
|
+LIBTAG = $(LIB_VERSION)
|
|
|
|
+LPATH= -L${LOCALBASE}/lib -Wl,-R${LOCALBASE}/lib
|
|
+
|
|
# Use SONAME_OPT=-Wl,h, on Solaris
|
|
SONAME_OPT=-Wl,-soname,
|
|
|
|
@@ -60,27 +61,25 @@ 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)
|
|
@@ -88,11 +87,11 @@ $(BIN2_NAME): $(OBJS3) $(LIB_NAME)
|
|
|
|
|
|
x_%.o: %.cpp
|
|
- $(CXX) $(CXXFLAGS) $(USE_AUDIO) -Wall -fpic -fvisibility=hidden -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)
|