summaryrefslogtreecommitdiff
path: root/apps/codecs/libtremor
diff options
context:
space:
mode:
Diffstat (limited to 'apps/codecs/libtremor')
-rw-r--r--apps/codecs/libtremor/Makefile49
-rw-r--r--apps/codecs/libtremor/config-tremor.h2
-rw-r--r--apps/codecs/libtremor/ctype.c2
-rw-r--r--apps/codecs/libtremor/libtremor.make36
-rw-r--r--apps/codecs/libtremor/mapping0.c2
-rw-r--r--apps/codecs/libtremor/oggmalloc.c5
6 files changed, 41 insertions, 55 deletions
diff --git a/apps/codecs/libtremor/Makefile b/apps/codecs/libtremor/Makefile
deleted file mode 100644
index 674d2ae64c..0000000000
--- a/apps/codecs/libtremor/Makefile
+++ /dev/null
@@ -1,49 +0,0 @@
1# __________ __ ___.
2# Open \______ \ ____ ____ | | _\_ |__ _______ ___
3# Source | _// _ \_/ ___\| |/ /| __ \ / _ \ \/ /
4# Jukebox | | ( <_> ) \___| < | \_\ ( <_> > < <
5# Firmware |____|_ /\____/ \___ >__|_ \|___ /\____/__/\_ \
6# \/ \/ \/ \/ \/
7# $Id$
8#
9
10INCLUDES=-I$(APPSDIR) -I.. -I. -I$(FIRMDIR)/include -I$(FIRMDIR)/export \
11 -I$(FIRMDIR)/common -I$(FIRMDIR)/drivers -I$(BUILDDIR)
12
13ifdef APPEXTRA
14 INCLUDES += $(patsubst %,-I$(APPSDIR)/%,$(subst :, ,$(APPEXTRA)))
15endif
16
17# Tremor is slightly faster on coldfire with -O3
18ifeq ($(CPU),coldfire)
19 TREMOROPTS = -O3
20else
21 TREMOROPTS = -O2
22endif
23
24CFLAGS = $(INCLUDES) $(GCCOPTS) $(TARGET_INC) $(TREMOROPTS) $(TARGET) \
25$(EXTRA_DEFINES) -DMEM=${MEMORYSIZE} ${PROFILE_OPTS}
26
27# This sets up 'SRC' based on the files mentioned in SOURCES
28include $(TOOLSDIR)/makesrc.inc
29
30SOURCES = $(SRC)
31OBJS2 := $(SRC:%.c=$(OBJDIR)/%.o)
32OBJS = $(patsubst %.S, $(OBJDIR)/%.o, $(OBJS2))
33DEPFILE = $(OBJDIR)/dep-libtremor
34DIRS =
35
36all: $(OUTPUT)
37
38$(OUTPUT): $(OBJS)
39 $(call PRINTS,AR+RANLIB $(@F))$(AR) ruv $@ $+ >/dev/null 2>&1
40 $(SILENT)$(RANLIB) $@
41
42include $(TOOLSDIR)/make.inc
43
44clean:
45 $(call PRINTS,cleaning libtremor)rm -f $(OBJS) $(OUTPUT) $(DEPFILE)
46
47ifneq ($(MAKECMDGOALS),clean)
48-include $(DEPFILE)
49endif
diff --git a/apps/codecs/libtremor/config-tremor.h b/apps/codecs/libtremor/config-tremor.h
index e1ade700e5..7cfcb7e35d 100644
--- a/apps/codecs/libtremor/config-tremor.h
+++ b/apps/codecs/libtremor/config-tremor.h
@@ -1,4 +1,4 @@
1#include "../codec.h" 1#include "codeclib.h"
2#ifdef CPU_ARM 2#ifdef CPU_ARM
3#define _ARM_ASSEM_ 3#define _ARM_ASSEM_
4#endif 4#endif
diff --git a/apps/codecs/libtremor/ctype.c b/apps/codecs/libtremor/ctype.c
index 9eb6eef80a..10468bc27d 100644
--- a/apps/codecs/libtremor/ctype.c
+++ b/apps/codecs/libtremor/ctype.c
@@ -1 +1 @@
#include "../../../firmware/common/ctype.c" #include "common/ctype.c"
diff --git a/apps/codecs/libtremor/libtremor.make b/apps/codecs/libtremor/libtremor.make
new file mode 100644
index 0000000000..6f500ea7ac
--- /dev/null
+++ b/apps/codecs/libtremor/libtremor.make
@@ -0,0 +1,36 @@
1# __________ __ ___.
2# Open \______ \ ____ ____ | | _\_ |__ _______ ___
3# Source | _// _ \_/ ___\| |/ /| __ \ / _ \ \/ /
4# Jukebox | | ( <_> ) \___| < | \_\ ( <_> > < <
5# Firmware |____|_ /\____/ \___ >__|_ \|___ /\____/__/\_ \
6# \/ \/ \/ \/ \/
7# $Id: Makefile 19082 2008-11-10 23:54:24Z zagor $
8#
9
10# libtremor
11TREMORLIB := $(CODECDIR)/libtremor.a
12TREMORLIB_SRC := $(call preprocess, $(APPSDIR)/codecs/libtremor/SOURCES)
13TREMORLIB_OBJ := $(call c2obj, $(TREMORLIB_SRC))
14OTHER_SRC += $(TREMORLIB_SRC)
15
16$(TREMORLIB): $(TREMORLIB_OBJ)
17 $(call PRINTS,AR $(@F))$(AR) rs $@ $^ >/dev/null 2>&1
18
19$(CODECDIR)/libtremor/%.o: $(ROOTDIR)/apps/codecs/libtremor/%.c
20 $(SILENT)mkdir -p $(dir $@)
21 $(call PRINTS,CC $(subst $(ROOTDIR)/,,$<))$(CC) \
22 -I$(APPSDIR)/codecs/libtremor \
23 $(CODECFLAGS) $(CFLAGS) -c $< -o $@
24
25TREMORFLAGS = -I$(APPSDIR)/codecs/libtremor $(filter-out -O%,$(CODECFLAGS))
26
27# Tremor is slightly faster on coldfire with -O3
28ifeq ($(CPU),coldfire)
29 TREMORFLAGS += -O3
30else
31 TREMORFLAGS += -O2
32endif
33
34$(CODECDIR)/libtremor/%.o: $(ROOTDIR)/apps/codecs/libtremor/%.c
35 $(SILENT)mkdir -p $(dir $@)
36 $(call PRINTS,CC $(subst $(ROOTDIR)/,,$<))$(CC) $(TREMORFLAGS) -c $< -o $@
diff --git a/apps/codecs/libtremor/mapping0.c b/apps/codecs/libtremor/mapping0.c
index 6bcc717d86..2bb7a46d79 100644
--- a/apps/codecs/libtremor/mapping0.c
+++ b/apps/codecs/libtremor/mapping0.c
@@ -21,7 +21,7 @@
21#include <math.h> 21#include <math.h>
22#include "ogg.h" 22#include "ogg.h"
23#include "ivorbiscodec.h" 23#include "ivorbiscodec.h"
24#include <codecs/lib/codeclib.h> 24#include "codeclib.h"
25#include "codec_internal.h" 25#include "codec_internal.h"
26#include "codebook.h" 26#include "codebook.h"
27#include "window.h" 27#include "window.h"
diff --git a/apps/codecs/libtremor/oggmalloc.c b/apps/codecs/libtremor/oggmalloc.c
index b11eaa54f5..ca917ff397 100644
--- a/apps/codecs/libtremor/oggmalloc.c
+++ b/apps/codecs/libtremor/oggmalloc.c
@@ -1,7 +1,6 @@
1#include <os_types.h> 1#include "os_types.h"
2 2
3static unsigned char *mallocbuf; 3static size_t tmp_ptr;
4static size_t bufsize, tmp_ptr, mem_ptr;
5 4
6void ogg_malloc_init(void) 5void ogg_malloc_init(void)
7{ 6{