aboutsummaryrefslogtreecommitdiffstats
path: root/audio/espeak/files/patch-src__Makefile
blob: 48f99b1acd64195fa7139e389d705c2e4bbb05a5 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
--- src/Makefile.orig   2014-02-02 10:58:11 UTC
+++ src/Makefile
@@ -1,8 +1,8 @@
 # remove -fno-exceptions  if it causes problems with stdio library on some platforms (ARM)
 
-DATADIR=/usr/share/espeak-data
+DATADIR=%%DATADIR%%/espeak-data
 
-PREFIX=/usr
+PREFIX?=/usr
 BINDIR=$(PREFIX)/bin
 INCDIR=$(PREFIX)/include/espeak
 LIBDIR=$(PREFIX)/lib
@@ -27,7 +27,7 @@ MKDIR = mkdir -p
 
 # 'runtime' uses pulseaudio if it is running, else uses portaudio
 #AUDIO = runtime
-AUDIO = portaudio
+AUDIO?= portaudio
 #AUDIO = portaudio0
 #AUDIO = portaudio2
 #AUDIO = pulseaudio
@@ -35,17 +35,17 @@ AUDIO = portaudio
 
 ifeq ($(AUDIO),runtime)
 WAVE=wave.cpp wave_pulse.cpp
-LIB_AUDIO=-lpulse -lpulse-simple -lportaudio
+LIB_AUDIO=-L$(LOCALBASE)/lib -lpulse -lpulse-simple -lportaudio
 USE_AUDIO=-DUSE_PULSEAUDIO -DUSE_PORTAUDIO
 else
 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),portaudio0)
@@ -91,9 +91,9 @@ LIBS2=-lstdc++ $(LIB_AUDIO) -lpthread
 
 SRCS3 = espeak.cpp
 OBJS3=$(patsubst %.cpp,%.o,$(SRCS3))
-LIBS3=-lstdc++ -L . -lespeak
+LIBS3=-lstdc++ -L . -lespeak -lpthread
 
-CXXFLAGS=-O2
+CXXFLAGS?=-O2
 
 
 all: $(BIN_NAME) $(LIB_NAME) $(STATIC_LIB_NAME) $(BIN2_NAME)
@@ -133,7 +133,7 @@ distclean: clean
 
 install: all
    # Create directories
-   rm -rf $(DESTDIR)$(DATADIR)
+   #rm -rf $(DESTDIR)$(DATADIR)
    $(MKDIR) $(DESTDIR)$(BINDIR)
    $(MKDIR) $(DESTDIR)$(LIBDIR)
    $(MKDIR) $(DESTDIR)$(INCDIR)
@@ -149,5 +149,5 @@ install: all
    # 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)