summaryrefslogtreecommitdiff
path: root/tools/rbspeex/Makefile
diff options
context:
space:
mode:
Diffstat (limited to 'tools/rbspeex/Makefile')
-rw-r--r--tools/rbspeex/Makefile56
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
10ifndef V
11SILENT = @
12endif
13
14SPEEXSRC = ../../apps/codecs/libspeex
15
16INCLUDES = -I $(SPEEXSRC) -iquote $(SPEEXSRC)
17SPEEXOPTS = -DHAVE_CONFIG_H -DROCKBOX_VOICE_ENCODER
18
19CFLAGS = $(SPEEXOPTS) $(INCLUDES) -O3 -fomit-frame-pointer -Wno-unused-parameter
20
21# This sets up 'SRC' based on the files mentioned in SOURCES
22SRC := $(shell cat $(SPEEXSRC)/SOURCES | $(CC) $(CFLAGS) -E -P - | grep -v "^\#")
23
24SOURCES = $(SRC:%.c=$(SPEEXSRC)/%.c) rbspeexenc.c
25OBJS := $(SRC:%.c=%.o) rbspeexenc.o
26DEPFILE = dep-speex
27DIRS =
28
29.PHONY : all
30
31all: ../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
53clean:
54 rm -f $(OBJS) dep-speex
55
56-include $(DEPFILE)