diff options
Diffstat (limited to 'tools/rbspeex/Makefile')
-rw-r--r-- | tools/rbspeex/Makefile | 56 |
1 files changed, 56 insertions, 0 deletions
diff --git a/tools/rbspeex/Makefile b/tools/rbspeex/Makefile new file mode 100644 index 0000000000..4771fe4ea2 --- /dev/null +++ b/tools/rbspeex/Makefile | |||
@@ -0,0 +1,56 @@ | |||
1 | # __________ __ ___. | ||
2 | # Open \______ \ ____ ____ | | _\_ |__ _______ ___ | ||
3 | # Source | _// _ \_/ ___\| |/ /| __ \ / _ \ \/ / | ||
4 | # Jukebox | | ( <_> ) \___| < | \_\ ( <_> > < < | ||
5 | # Firmware |____|_ /\____/ \___ >__|_ \|___ /\____/__/\_ \ | ||
6 | # \/ \/ \/ \/ \/ | ||
7 | # $Id: Makefile,v 1.16 2006-09-02 22:34:13 bagder Exp $ | ||
8 | # | ||
9 | |||
10 | ifndef V | ||
11 | SILENT = @ | ||
12 | endif | ||
13 | |||
14 | SPEEXSRC = ../../apps/codecs/libspeex | ||
15 | |||
16 | INCLUDES = -I $(SPEEXSRC) -iquote $(SPEEXSRC) | ||
17 | SPEEXOPTS = -DHAVE_CONFIG_H -DROCKBOX_VOICE_ENCODER | ||
18 | |||
19 | CFLAGS = $(SPEEXOPTS) $(INCLUDES) -O3 -fomit-frame-pointer -Wno-unused-parameter | ||
20 | |||
21 | # This sets up 'SRC' based on the files mentioned in SOURCES | ||
22 | SRC := $(shell cat $(SPEEXSRC)/SOURCES | $(CC) $(CFLAGS) -E -P - | grep -v "^\#") | ||
23 | |||
24 | SOURCES = $(SRC:%.c=$(SPEEXSRC)/%.c) rbspeexenc.c | ||
25 | OBJS := $(SRC:%.c=%.o) rbspeexenc.o | ||
26 | DEPFILE = dep-speex | ||
27 | DIRS = | ||
28 | |||
29 | .PHONY : all | ||
30 | |||
31 | all: ../rbspeexenc | ||
32 | |||
33 | $(DEPFILE): $(SOURCES) | ||
34 | $(SILENT)rm -f $(DEPFILE) | ||
35 | $(SILENT)(for each in $(SOURCES) x; do \ | ||
36 | if test "x" != "$$each"; then \ | ||
37 | obj=`echo $$each | sed -e 's/\.[cS]/.o/' | sed -e 's/^.*\///' `; \ | ||
38 | $(CC) -MG -MM -MT "$$obj" $(CFLAGS) $$each 2>/dev/null; \ | ||
39 | fi; \ | ||
40 | if test -n "$$del"; then \ | ||
41 | rm $$del; \ | ||
42 | del=""; \ | ||
43 | fi \ | ||
44 | done > $(DEPFILE); \ | ||
45 | echo "oo" > /dev/null ) | ||
46 | |||
47 | ../rbspeexenc: $(OBJS) $(DEPFILE) | ||
48 | gcc -o ../rbspeexenc $(OBJS) -lm | ||
49 | |||
50 | %.o: | ||
51 | $(CC) $(CFLAGS) -c $< -o $@ | ||
52 | |||
53 | clean: | ||
54 | rm -f $(OBJS) dep-speex | ||
55 | |||
56 | -include $(DEPFILE) | ||