0
|
1 |
###### USER CONFIG ###############
|
|
2 |
TARGET = ../bin/vreader #
|
|
3 |
MBROLA = /opt/mbrola/bin/mbrola #
|
|
4 |
FESTIVAL= /usr/bin/festival #
|
|
5 |
INSTDIR = ~/bin #
|
|
6 |
##### USER CONFIG ENDS ###########
|
|
7 |
|
|
8 |
CC = gcc
|
|
9 |
MCFLAGS = -Wall -O2 -DMBROLA $(shell sdl-config --cflags)
|
|
10 |
FCFLAGS = -Wall -O2 -DFESTIVAL $(shell sdl-config --cflags)
|
|
11 |
PCFLAGS = -Wall -O2 -DPROSER -DLINUX -DWINAPI="" $(shell sdl-config --cflags)
|
|
12 |
INCLUDE = -I../include
|
|
13 |
LDFLAGS = -Wl,-rpath,lib -L../lib $(shell sdl-config --libs)
|
|
14 |
DEBUG = -g -ggdb
|
|
15 |
OBJECTS = \
|
|
16 |
main.o \
|
|
17 |
sentence.o \
|
|
18 |
keyboard.o \
|
|
19 |
thread.o \
|
|
20 |
audioplayer.o \
|
|
21 |
proser_interface.o \
|
|
22 |
mbrola_interface.o \
|
|
23 |
festival_interface.o
|
|
24 |
|
|
25 |
.c.o:
|
|
26 |
@if [ -f ../lib/libProserGerman.a ]; \
|
|
27 |
then \
|
|
28 |
$(CC) -c $(PCFLAGS) $(INCLUDE) $(DEBUG) -o $@ $<; \
|
|
29 |
elif [ -x $(MBROLA) ]; \
|
|
30 |
then \
|
1
|
31 |
if [ ! -f /etc/txt2pho ]; \
|
|
32 |
then \
|
|
33 |
if [ ! -f ~/.txt2phorc ]; \
|
|
34 |
then \
|
|
35 |
echo "Warning: ~/.txt2phorc or /etc/txt2pho is missing"; \
|
|
36 |
fi; \
|
|
37 |
fi; \
|
0
|
38 |
$(CC) -c $(MCFLAGS) $(INCLUDE) $(DEBUG) -o $@ $<; \
|
|
39 |
elif [ -x $(FESTIVAL) ]; \
|
|
40 |
then \
|
|
41 |
$(CC) -c $(FCFLAGS) $(INCLUDE) $(DEBUG) -o $@ $<; \
|
|
42 |
else \
|
|
43 |
echo "Cannot find any TTS-System on your Machine"; \
|
1
|
44 |
exit 1; \
|
0
|
45 |
fi;
|
|
46 |
@echo "CC $<"
|
|
47 |
|
|
48 |
all: $(TARGET)
|
|
49 |
|
|
50 |
$(TARGET): $(OBJECTS)
|
|
51 |
@if [ -f ../lib/libProserGerman.a ]; \
|
|
52 |
then \
|
|
53 |
$(CC) $(OBJECTS) $(LDFLAGS) -lProserGerman -o $@; \
|
|
54 |
else \
|
|
55 |
$(CC) $(OBJECTS) $(LDFLAGS) -o $@; fi
|
|
56 |
@echo "LD OBJECTS -o $@"
|
|
57 |
|
|
58 |
.PHONY: clean distclean
|
|
59 |
|
|
60 |
clean:
|
|
61 |
@rm -f *.o *~
|
|
62 |
@echo "CLEANING $$PWD"
|
|
63 |
|
|
64 |
distclean:
|
|
65 |
@make clean
|
|
66 |
@rm -f $(TARGET)
|
|
67 |
@echo "WIPING $$PWD OUT"
|
|
68 |
|
|
69 |
install: $(TARGET)
|
|
70 |
install -m 755 $(TARGET) $(INSTDIR)
|