summaryrefslogtreecommitdiff
path: root/apps/codecs/libFLAC/Makefile
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/Makefile
parentf729fce058d863b6df15ea4ca22e033820b783a0 (diff)
downloadrockbox-1c6b2513ea0114150447824df45e566d87fd06d9.tar.gz
rockbox-1c6b2513ea0114150447824df45e566d87fd06d9.zip
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/Makefile')
-rw-r--r--apps/codecs/libFLAC/Makefile45
1 files changed, 45 insertions, 0 deletions
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)