equal
deleted
inserted
replaced
|
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 \ |
|
31 $(CC) -c $(MCFLAGS) $(INCLUDE) $(DEBUG) -o $@ $<; \ |
|
32 elif [ -x $(FESTIVAL) ]; \ |
|
33 then \ |
|
34 $(CC) -c $(FCFLAGS) $(INCLUDE) $(DEBUG) -o $@ $<; \ |
|
35 else \ |
|
36 echo "Cannot find any TTS-System on your Machine"; \ |
|
37 fi; |
|
38 @echo "CC $<" |
|
39 |
|
40 all: $(TARGET) |
|
41 |
|
42 $(TARGET): $(OBJECTS) |
|
43 @if [ -f ../lib/libProserGerman.a ]; \ |
|
44 then \ |
|
45 $(CC) $(OBJECTS) $(LDFLAGS) -lProserGerman -o $@; \ |
|
46 else \ |
|
47 $(CC) $(OBJECTS) $(LDFLAGS) -o $@; fi |
|
48 @echo "LD OBJECTS -o $@" |
|
49 |
|
50 .PHONY: clean distclean |
|
51 |
|
52 clean: |
|
53 @rm -f *.o *~ |
|
54 @echo "CLEANING $$PWD" |
|
55 |
|
56 distclean: |
|
57 @make clean |
|
58 @rm -f $(TARGET) |
|
59 @echo "WIPING $$PWD OUT" |
|
60 |
|
61 install: $(TARGET) |
|
62 install -m 755 $(TARGET) $(INSTDIR) |