summaryrefslogtreecommitdiff
path: root/apps
diff options
context:
space:
mode:
Diffstat (limited to 'apps')
-rw-r--r--apps/codecs/Makefile10
-rw-r--r--apps/codecs/libFLAC/Makefile45
-rw-r--r--apps/codecs/libFLAC/SOURCES12
3 files changed, 65 insertions, 2 deletions
diff --git a/apps/codecs/Makefile b/apps/codecs/Makefile
index 805eaf55cd..863d552a1e 100644
--- a/apps/codecs/Makefile
+++ b/apps/codecs/Makefile
@@ -16,7 +16,7 @@ ifdef APPEXTRA
16 INCLUDES += -I$(APPSDIR)/$(APPEXTRA) 16 INCLUDES += -I$(APPSDIR)/$(APPEXTRA)
17endif 17endif
18 18
19all: $(OBJDIR)/libmad.a $(OBJDIR)/liba52.a 19all: $(OBJDIR)/libmad.a $(OBJDIR)/liba52.a $(OBJDIR)/libFLAC.a
20 20
21include $(TOOLSDIR)/make.inc 21include $(TOOLSDIR)/make.inc
22 22
@@ -30,8 +30,14 @@ $(OBJDIR)/liba52.a:
30 @mkdir -p $(OBJDIR)/liba52 30 @mkdir -p $(OBJDIR)/liba52
31 @$(MAKE) -C liba52 TARGET=$(TARGET) DEBUG=$(DEBUG) OBJDIR=$(OBJDIR) VERSION=$(VERSION) EXTRA_DEFINES="$(EXTRA_DEFINES)" MEM=${MEMORYSIZE} 31 @$(MAKE) -C liba52 TARGET=$(TARGET) DEBUG=$(DEBUG) OBJDIR=$(OBJDIR) VERSION=$(VERSION) EXTRA_DEFINES="$(EXTRA_DEFINES)" MEM=${MEMORYSIZE}
32 32
33$(OBJDIR)/libFLAC.a:
34 @echo "MAKE in libFLAC"
35 @mkdir -p $(OBJDIR)/libFLAC
36 @$(MAKE) -C libFLAC TARGET=$(TARGET) DEBUG=$(DEBUG) OBJDIR=$(OBJDIR) VERSION=$(VERSION) EXTRA_DEFINES="$(EXTRA_DEFINES)" MEM=${MEMORYSIZE}
37
33clean: 38clean:
34 @echo "cleaning codecs" 39 @echo "cleaning codecs"
35 @rm -fr $(OBJDIR)/libmad $(OBJDIR)/liba52 40 @rm -fr $(OBJDIR)/libmad $(OBJDIR)/liba52 $(OBJDIR)/libFLAC
36 @$(MAKE) -C libmad clean 41 @$(MAKE) -C libmad clean
37 @$(MAKE) -C liba52 clean 42 @$(MAKE) -C liba52 clean
43 @$(MAKE) -C libFLAC clean
diff --git a/apps/codecs/libFLAC/Makefile b/apps/codecs/libFLAC/Makefile
new file mode 100644
index 0000000000..d711134ae9
--- /dev/null
+++ b/apps/codecs/libFLAC/Makefile
@@ -0,0 +1,45 @@
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$(APPSDIR)/codecs/libFLAC/include
12
13ifdef APPEXTRA
14INCLUDES += -I$(APPSDIR)/$(APPEXTRA)
15endif
16
17FLACOPTS = -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__
18CFLAGS = $(GCCOPTS) $(FLACOPTS)\
19$(INCLUDES) $(TARGET) $(EXTRA_DEFINES) -DMEM=${MEMORYSIZE}
20
21SRC := $(shell cat SOURCES | $(CC) -DMEMORYSIZE=$(MEMORYSIZE) $(INCLUDES) $(TARGET) $(DEFINES) -E -P -include "config.h" - )
22SOURCES = $(SRC)
23OBJS := $(SRC:%.c=$(OBJDIR)/libFLAC/%.o)
24DEPFILE = $(OBJDIR)/dep-libFLAC
25DIRS =
26
27OUTPUT = $(OBJDIR)/libFLAC.a
28
29all: $(OUTPUT)
30
31$(OUTPUT): $(OBJS)
32 @echo "AR $@"
33 @$(AR) ruv $@ $+ >/dev/null 2>&1
34
35$(OBJDIR)/libFLAC/%.o: $(APPSDIR)/codecs/libFLAC/%.c
36 @mkdir -p $(OBJDIR)/libFLAC
37 @$(CC) -c -O2 $(CFLAGS) -I$(APPSDIR)/codecs/libFLAC/include/FLAC $< -o $@
38
39include $(TOOLSDIR)/make.inc
40
41clean:
42 @echo "cleaning libFLAC"
43 @rm -f $(OBJS) $(OUTPUT) $(DEPFILE)
44
45-include $(DEPFILE)
diff --git a/apps/codecs/libFLAC/SOURCES b/apps/codecs/libFLAC/SOURCES
new file mode 100644
index 0000000000..fc793f5e10
--- /dev/null
+++ b/apps/codecs/libFLAC/SOURCES
@@ -0,0 +1,12 @@
1bitbuffer.c
2bitmath.c
3cpu.c
4crc.c
5fixed.c
6float.c
7format.c
8lpc.c
9md5.c
10memory.c
11seekable_stream_decoder.c
12stream_decoder.c