mirror of
https://git.FreeBSD.org/ports.git
synced 2025-01-24 09:25:01 +00:00
93 lines
2.5 KiB
Plaintext
93 lines
2.5 KiB
Plaintext
--- src/Makefile 2008-12-22 23:37:41.000000000 +0100
|
|
+++ src/Makefile.port 2009-01-13 15:24:01.000000000 +0100
|
|
@@ -1,10 +1,10 @@
|
|
# remove -fno-exceptions if it causes problems with stdio library on some platforms (ARM)
|
|
|
|
-PREFIX=/usr
|
|
+PREFIX?=/usr
|
|
BINDIR=$(PREFIX)/bin
|
|
INCDIR=$(PREFIX)/include/espeak
|
|
LIBDIR=$(PREFIX)/lib
|
|
-DATADIR=$(PREFIX)/share/espeak-data
|
|
+DATADIR=%%DATADIR%%/espeak-data
|
|
|
|
RELEASE = 1.40
|
|
BIN_NAME = speak
|
|
@@ -24,18 +24,18 @@
|
|
LN_SF = /bin/ln -sf
|
|
MKDIR = mkdir -p
|
|
|
|
-AUDIO = portaudio
|
|
+AUDIO ?= portaudio
|
|
#AUDIO = pulseaudio
|
|
#AUDIO = sada
|
|
|
|
ifeq ($(AUDIO),pulseaudio)
|
|
WAVE=wave_pulse.cpp
|
|
-LIB_AUDIO=-lpulse
|
|
+LIB_AUDIO=-L$(LOCALBASE)/lib -lpulse
|
|
USE_AUDIO=-DUSE_PULSEAUDIO
|
|
else
|
|
ifeq ($(AUDIO),portaudio)
|
|
WAVE=wave.cpp
|
|
-LIB_AUDIO=-lportaudio
|
|
+LIB_AUDIO=-L$(LOCALBASE)/lib -lportaudio
|
|
USE_AUDIO=-DUSE_PORTAUDIO
|
|
else
|
|
ifeq ($(AUDIO),sada)
|
|
@@ -60,24 +60,24 @@
|
|
|
|
SRCS1=$(speak_SOURCES)
|
|
OBJS1=$(patsubst %.cpp,%.o,$(SRCS1))
|
|
-LIBS1=-lstdc++ $(LIB_AUDIO) -lpthread $(EXTRA_LIBS)
|
|
+LIBS1=-lstdc++ $(LIB_AUDIO) $(PTHREAD_LIBS) $(EXTRA_LIBS)
|
|
|
|
SRCS2=$(libespeak_SOURCES)
|
|
OBJS2=$(patsubst %.cpp,x_%.o,$(SRCS2))
|
|
-LIBS2=-lstdc++ $(LIB_AUDIO) -lpthread
|
|
+LIBS2=-lstdc++ $(LIB_AUDIO) $(PTHREAD_LIBS)
|
|
|
|
SRCS3 = espeak.cpp
|
|
OBJS3=$(patsubst %.cpp,%.o,$(SRCS3))
|
|
-LIBS3=-lstdc++ -L . -lespeak
|
|
+LIBS3=-lstdc++ -L . -lespeak $(PTHREAD_LIBS)
|
|
|
|
-CXXFLAGS=-O2
|
|
+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) $(PTHREAD_CFLAGS) $(USE_AUDIO) -D PATH_ESPEAK_DATA=\"$(DATADIR)\" -Wall -pedantic -I. -c -fno-exceptions $<
|
|
|
|
$(BIN_NAME): $(OBJS1)
|
|
$(CXX) -o $@ $(OBJS1) $(LIBS1)
|
|
@@ -88,7 +88,7 @@
|
|
|
|
|
|
x_%.o: %.cpp
|
|
- $(CXX) $(CXXFLAGS) $(USE_AUDIO) -Wall -fpic -fvisibility=hidden -pedantic \
|
|
+ $(CXX) $(CXXFLAGS) $(PTHREAD_CFLAGS) $(USE_AUDIO) -Wall -fpic -fvisibility=hidden -pedantic \
|
|
-I. -D LIBRARY -c -fno-exceptions $< -o x_$*.o
|
|
|
|
$(LIB_NAME): $(OBJS2)
|
|
@@ -107,7 +107,7 @@
|
|
|
|
install: all
|
|
# Create directories
|
|
- rm -rf $(DESTDIR)$(DATADIR)
|
|
+ #rm -rf $(DESTDIR)$(DATADIR)
|
|
$(MKDIR) $(DESTDIR)$(BINDIR)
|
|
$(MKDIR) $(DESTDIR)$(LIBDIR)
|
|
$(MKDIR) $(DESTDIR)$(INCDIR)
|
|
@@ -123,5 +123,5 @@
|
|
# Install development headers
|
|
$(INSTALL) -pm 644 speak_lib.h $(DESTDIR)$(INCDIR)
|
|
# Install data files
|
|
- cp -prf ../espeak-data/* $(DESTDIR)$(DATADIR)
|
|
+ cp -pRf ../espeak-data/* $(DESTDIR)$(DATADIR)
|
|
|