diff options
author | Björn Stenberg <bjorn@haxx.se> | 2008-11-20 11:27:31 +0000 |
---|---|---|
committer | Björn Stenberg <bjorn@haxx.se> | 2008-11-20 11:27:31 +0000 |
commit | c6b3d38a156dd624760a8eb1bb374affd43b4f2a (patch) | |
tree | 493eba929e2396d86cf4f077709aa09fe172cd35 /apps/codecs/libspeex/libspeex.make | |
parent | f66c30346783a400a029bedcd60ab67c81c34a07 (diff) | |
download | rockbox-c6b3d38a156dd624760a8eb1bb374affd43b4f2a.tar.gz rockbox-c6b3d38a156dd624760a8eb1bb374affd43b4f2a.zip |
New makefile solution: A single invocation of 'make' to build the entire tree. Fully controlled dependencies give faster and more correct recompiles.
Many #include lines adjusted to conform to the new standards.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@19146 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'apps/codecs/libspeex/libspeex.make')
-rw-r--r-- | apps/codecs/libspeex/libspeex.make | 60 |
1 files changed, 60 insertions, 0 deletions
diff --git a/apps/codecs/libspeex/libspeex.make b/apps/codecs/libspeex/libspeex.make new file mode 100644 index 0000000000..a27d559a06 --- /dev/null +++ b/apps/codecs/libspeex/libspeex.make | |||
@@ -0,0 +1,60 @@ | |||
1 | # __________ __ ___. | ||
2 | # Open \______ \ ____ ____ | | _\_ |__ _______ ___ | ||
3 | # Source | _// _ \_/ ___\| |/ /| __ \ / _ \ \/ / | ||
4 | # Jukebox | | ( <_> ) \___| < | \_\ ( <_> > < < | ||
5 | # Firmware |____|_ /\____/ \___ >__|_ \|___ /\____/__/\_ \ | ||
6 | # \/ \/ \/ \/ \/ | ||
7 | # $Id: Makefile 19082 2008-11-10 23:54:24Z zagor $ | ||
8 | # | ||
9 | |||
10 | # we need to build two different speex libraries | ||
11 | # (one for codec, one for core voice) | ||
12 | # so a little trickery is necessary | ||
13 | |||
14 | SPEEXFLAGS = $(filter-out -O%,$(CODECFLAGS)) \ | ||
15 | -DHAVE_CONFIG_H -DSPEEX_DISABLE_ENCODER \ | ||
16 | -I$(APPSDIR)/codecs/libspeex | ||
17 | |||
18 | # libspeex is faster on ARM-targets with -O1 instead of -O2 | ||
19 | ifeq ($(CPU),arm) | ||
20 | SPEEXFLAGS += -O1 | ||
21 | else | ||
22 | SPEEXFLAGS += -O2 | ||
23 | endif | ||
24 | |||
25 | VOICESPEEXFLAGS = $(filter-out -ffunction-sections, $(filter-out -DCODEC,$(SPEEXFLAGS))) -DROCKBOX_VOICE_CODEC | ||
26 | |||
27 | # libspeex | ||
28 | SPEEXLIB := $(CODECDIR)/libspeex.a | ||
29 | SPEEXLIB_SRC := $(call preprocess, $(APPSDIR)/codecs/libspeex/SOURCES) | ||
30 | SPEEXLIB_OBJ := $(call c2obj, $(SPEEXLIB_SRC)) | ||
31 | OTHER_SRC += $(SPEEXLIB_SRC) | ||
32 | |||
33 | $(SPEEXLIB): $(SPEEXLIB_OBJ) | ||
34 | $(call PRINTS,AR $(@F))$(AR) rs $@ $^ >/dev/null 2>&1 | ||
35 | |||
36 | # libspeex-voice | ||
37 | VOICESPEEXLIB := $(CODECDIR)/libspeex-voice.a | ||
38 | VOICESPEEXLIB_SRC := $(call preprocess, $(APPSDIR)/codecs/libspeex/SOURCES) | ||
39 | VOICESPEEXLIB_OBJ := $(subst .c,.o,$(subst .S,.o,$(subst $(ROOTDIR)/apps/codecs/libspeex,$(BUILDDIR)/apps/codecs/libspeex-voice,$(VOICESPEEXLIB_SRC)))) | ||
40 | |||
41 | $(VOICESPEEXLIB): $(VOICESPEEXLIB_OBJ) | ||
42 | $(call PRINTS,AR $(@F))$(AR) rs $@ $^ >/dev/null 2>&1 | ||
43 | |||
44 | # pattern rules | ||
45 | |||
46 | $(CODECDIR)/libspeex-voice/%.o : $(ROOTDIR)/apps/codecs/libspeex/%.c | ||
47 | $(SILENT)mkdir -p $(dir $@) | ||
48 | $(call PRINTS,CC $(subst $(ROOTDIR)/,,$<))$(CC) $(VOICESPEEXFLAGS) -c $< -o $@ | ||
49 | |||
50 | $(CODECDIR)/libspeex-voice/%.o : $(ROOTDIR)/apps/codecs/libspeex/%.S | ||
51 | $(SILENT)mkdir -p $(dir $@) | ||
52 | $(call PRINTS,CC $(subst $(ROOTDIR)/,,$<))$(CC) $(VOICESPEEXFLAGS) -c $< -o $@ | ||
53 | |||
54 | $(CODECDIR)/libspeex/%.o: $(ROOTDIR)/apps/codecs/libspeex/%.c | ||
55 | $(SILENT)mkdir -p $(dir $@) | ||
56 | $(call PRINTS,CC $(subst $(ROOTDIR)/,,$<))$(CC) $(SPEEXFLAGS) -c $< -o $@ | ||
57 | |||
58 | $(CODECDIR)/libspeex/%.o: $(ROOTDIR)/apps/codecs/libspeex/%.S | ||
59 | $(SILENT)mkdir -p $(dir $@) | ||
60 | $(call PRINTS,CC $(subst $(ROOTDIR)/,,$<))$(CC) $(SPEEXFLAGS) -c $< -o $@ | ||