author | Markus Bröker <mbroeker@largo.dyndns.tv> |
Mon, 09 Sep 2013 15:54:09 +0200 | |
changeset 4 | be4de85337e5 |
parent 2 | 6ee2a130dc07 |
permissions | -rw-r--r-- |
0 | 1 |
###### USER CONFIG ############### |
2 |
TARGET = ../bin/vreader # |
|
4 | 3 |
MBROLA = /opt/mbrola/bin/mbrolas # |
0 | 4 |
FESTIVAL= /usr/bin/festival # |
5 |
INSTDIR = ~/bin # |
|
6 |
##### USER CONFIG ENDS ########### |
|
7 |
||
2
6ee2a130dc07
Common Makefile Style
Markus Bröker <mbroeker@largo.dyndns.tv>
parents:
1
diff
changeset
|
8 |
CC = gcc |
0 | 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) |
|
2
6ee2a130dc07
Common Makefile Style
Markus Bröker <mbroeker@largo.dyndns.tv>
parents:
1
diff
changeset
|
14 |
DEBUG = -g -ggdb |
6ee2a130dc07
Common Makefile Style
Markus Bröker <mbroeker@largo.dyndns.tv>
parents:
1
diff
changeset
|
15 |
|
6ee2a130dc07
Common Makefile Style
Markus Bröker <mbroeker@largo.dyndns.tv>
parents:
1
diff
changeset
|
16 |
OBJECTS = main.o |
6ee2a130dc07
Common Makefile Style
Markus Bröker <mbroeker@largo.dyndns.tv>
parents:
1
diff
changeset
|
17 |
OBJECTS += sentence.o |
6ee2a130dc07
Common Makefile Style
Markus Bröker <mbroeker@largo.dyndns.tv>
parents:
1
diff
changeset
|
18 |
OBJECTS += keyboard.o |
6ee2a130dc07
Common Makefile Style
Markus Bröker <mbroeker@largo.dyndns.tv>
parents:
1
diff
changeset
|
19 |
OBJECTS += thread.o |
6ee2a130dc07
Common Makefile Style
Markus Bröker <mbroeker@largo.dyndns.tv>
parents:
1
diff
changeset
|
20 |
OBJECTS += audioplayer.o |
6ee2a130dc07
Common Makefile Style
Markus Bröker <mbroeker@largo.dyndns.tv>
parents:
1
diff
changeset
|
21 |
OBJECTS += proser_interface.o |
6ee2a130dc07
Common Makefile Style
Markus Bröker <mbroeker@largo.dyndns.tv>
parents:
1
diff
changeset
|
22 |
OBJECTS += mbrola_interface.o |
6ee2a130dc07
Common Makefile Style
Markus Bröker <mbroeker@largo.dyndns.tv>
parents:
1
diff
changeset
|
23 |
OBJECTS += festival_interface.o |
0 | 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) |