summaryrefslogtreecommitdiff
path: root/apps/codecs/libFLAC
diff options
context:
space:
mode:
authorDave Chapman <dave@dchapman.com>2005-02-16 20:15:30 +0000
committerDave Chapman <dave@dchapman.com>2005-02-16 20:15:30 +0000
commit1c6b2513ea0114150447824df45e566d87fd06d9 (patch)
tree1138445a98a60d8fef1ce32bd6949915782a0f77 /apps/codecs/libFLAC
parentf729fce058d863b6df15ea4ca22e033820b783a0 (diff)
downloadrockbox-1c6b2513ea0114150447824df45e566d87fd06d9.zip
rockbox-1c6b2513ea0114150447824df45e566d87fd06d9.tar.gz
rockbox-1c6b2513ea0114150447824df45e566d87fd06d9.tar.bz2
rockbox-1c6b2513ea0114150447824df45e566d87fd06d9.tar.xz
Add libFLAC to the build system
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@5987 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'apps/codecs/libFLAC')
-rw-r--r--apps/codecs/libFLAC/Makefile45
-rw-r--r--apps/codecs/libFLAC/SOURCES12
2 files changed, 57 insertions, 0 deletions
diff --git a/apps/codecs/libFLAC/Makefile b/apps/codecs/libFLAC/Makefile
new file mode 100644
index 0000000..d711134
--- /dev/null
+++ b/apps/codecs/libFLAC/Makefile
@@ -0,0 +1,45 @@
+# __________ __ ___.
+# Open \______ \ ____ ____ | | _\_ |__ _______ ___
+# Source | _// _ \_/ ___\| |/ /| __ \ / _ \ \/ /
+# Jukebox | | ( <_> ) \___| < | \_\ ( <_> > < <
+# Firmware |____|_ /\____/ \___ >__|_ \|___ /\____/__/\_ \
+# \/ \/ \/ \/ \/
+# $Id$
+#
+
+INCLUDES=-I$(APPSDIR) -I.. -I. -I$(FIRMDIR)/include -I$(FIRMDIR)/export \
+ -I$(FIRMDIR)/common -I$(FIRMDIR)/drivers -I$(APPSDIR)/codecs/libFLAC/include
+
+ifdef APPEXTRA
+INCLUDES += -I$(APPSDIR)/$(APPEXTRA)
+endif
+
+FLACOPTS = -DFLAC__NO_ASM -DFLAC__ALIGN_MALLOC_DATA -DFLAC__INTEGER_ONLY_LIBRARY -DVERSION=\"1.1.2\" -fomit-frame-pointer -funroll-loops -finline-functions -Wall -W -Winline -DFLaC__INLINE=__inline__
+CFLAGS = $(GCCOPTS) $(FLACOPTS)\
+$(INCLUDES) $(TARGET) $(EXTRA_DEFINES) -DMEM=${MEMORYSIZE}
+
+SRC := $(shell cat SOURCES | $(CC) -DMEMORYSIZE=$(MEMORYSIZE) $(INCLUDES) $(TARGET) $(DEFINES) -E -P -include "config.h" - )
+SOURCES = $(SRC)
+OBJS := $(SRC:%.c=$(OBJDIR)/libFLAC/%.o)
+DEPFILE = $(OBJDIR)/dep-libFLAC
+DIRS =
+
+OUTPUT = $(OBJDIR)/libFLAC.a
+
+all: $(OUTPUT)
+
+$(OUTPUT): $(OBJS)
+ @echo "AR $@"
+ @$(AR) ruv $@ $+ >/dev/null 2>&1
+
+$(OBJDIR)/libFLAC/%.o: $(APPSDIR)/codecs/libFLAC/%.c
+ @mkdir -p $(OBJDIR)/libFLAC
+ @$(CC) -c -O2 $(CFLAGS) -I$(APPSDIR)/codecs/libFLAC/include/FLAC $< -o $@
+
+include $(TOOLSDIR)/make.inc
+
+clean:
+ @echo "cleaning libFLAC"
+ @rm -f $(OBJS) $(OUTPUT) $(DEPFILE)
+
+-include $(DEPFILE)
diff --git a/apps/codecs/libFLAC/SOURCES b/apps/codecs/libFLAC/SOURCES
new file mode 100644
index 0000000..fc793f5
--- /dev/null
+++ b/apps/codecs/libFLAC/SOURCES
@@ -0,0 +1,12 @@
+bitbuffer.c
+bitmath.c
+cpu.c
+crc.c
+fixed.c
+float.c
+format.c
+lpc.c
+md5.c
+memory.c
+seekable_stream_decoder.c
+stream_decoder.c