FS#8961 - Anti-Aliased Fonts.
[kugel-rb/myfork.git] / apps / codecs / libspeex / libspeex.make
blobdcf5b8b5fdf3829db7244e40f5bdd0359d257c4d
1 # __________ __ ___.
2 # Open \______ \ ____ ____ | | _\_ |__ _______ ___
3 # Source | _// _ \_/ ___\| |/ /| __ \ / _ \ \/ /
4 # Jukebox | | ( <_> ) \___| < | \_\ ( <_> > < <
5 # Firmware |____|_ /\____/ \___ >__|_ \|___ /\____/__/\_ \
6 # \/ \/ \/ \/ \/
7 # $Id$
10 # we need to build two different speex libraries
11 # (one for codec, one for core voice)
12 # so a little trickery is necessary
14 SPEEXFLAGS = $(filter-out -O%,$(CODECFLAGS)) \
15 -DHAVE_CONFIG_H -DSPEEX_DISABLE_ENCODER \
16 -I$(APPSDIR)/codecs/libspeex
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
25 VOICESPEEXFLAGS = $(filter-out -ffunction-sections, $(filter-out -DCODEC,$(SPEEXFLAGS))) -DROCKBOX_VOICE_CODEC
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)
33 $(SPEEXLIB): $(SPEEXLIB_OBJ)
34 $(SILENT)$(shell rm -f $@)
35 $(call PRINTS,AR $(@F))$(AR) rcs $@ $^ >/dev/null
37 # libspeex-voice
38 VOICESPEEXLIB := $(CODECDIR)/libspeex-voice.a
39 VOICESPEEXLIB_SRC := $(call preprocess, $(APPSDIR)/codecs/libspeex/SOURCES)
40 VOICESPEEXLIB_OBJ := $(addsuffix .o,$(basename $(subst $(ROOTDIR)/apps/codecs/libspeex,$(BUILDDIR)/apps/codecs/libspeex-voice,$(VOICESPEEXLIB_SRC))))
42 $(VOICESPEEXLIB): $(VOICESPEEXLIB_OBJ)
43 $(call PRINTS,AR $(@F))$(AR) rcs $@ $^ >/dev/null
45 # pattern rules
47 $(CODECDIR)/libspeex-voice/%.o : $(ROOTDIR)/apps/codecs/libspeex/%.c
48 $(SILENT)mkdir -p $(dir $@)
49 $(call PRINTS,CC $(subst $(ROOTDIR)/,,$<))$(CC) $(VOICESPEEXFLAGS) -c $< -o $@
51 $(CODECDIR)/libspeex-voice/%.o : $(ROOTDIR)/apps/codecs/libspeex/%.S
52 $(SILENT)mkdir -p $(dir $@)
53 $(call PRINTS,CC $(subst $(ROOTDIR)/,,$<))$(CC) $(VOICESPEEXFLAGS) -c $< -o $@
55 $(CODECDIR)/libspeex/%.o: $(ROOTDIR)/apps/codecs/libspeex/%.c
56 $(SILENT)mkdir -p $(dir $@)
57 $(call PRINTS,CC $(subst $(ROOTDIR)/,,$<))$(CC) $(SPEEXFLAGS) -c $< -o $@
59 $(CODECDIR)/libspeex/%.o: $(ROOTDIR)/apps/codecs/libspeex/%.S
60 $(SILENT)mkdir -p $(dir $@)
61 $(call PRINTS,CC $(subst $(ROOTDIR)/,,$<))$(CC) $(SPEEXFLAGS) -c $< -o $@