blob: 7d9030e64881d4869591afd01c0b88883fafe648 [file] [log] [blame]
Dave Chapman273d2e82005-10-26 12:35:58 +00001# __________ __ ___.
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
Linus Nielsen Feltzingdc9e2012005-10-27 14:39:00 +000014 INCLUDES += $(patsubst %,-I$(APPSDIR)/%,$(subst :, ,$(APPEXTRA)))
Dave Chapman273d2e82005-10-26 12:35:58 +000015endif
16
17FLACOPTS = -O2
Magnus Holmgren1b0d1da2005-12-05 19:32:13 +000018CFLAGS = $(GCCOPTS) $(FLACOPTS) $(INCLUDES) $(TARGET) $(EXTRA_DEFINES) \
Brandon Low05dccc32006-01-18 20:54:13 +000019 -DMEM=${MEMORYSIZE} $(PROFILE_OPTS)
Dave Chapman273d2e82005-10-26 12:35:58 +000020
21# This sets up 'SRC' based on the files mentioned in SOURCES
22include $(TOOLSDIR)/makesrc.inc
23
24SOURCES = $(SRC)
25OBJS2 := $(SRC:%.c=$(OBJDIR)/%.o)
26OBJS = $(patsubst %.S, $(OBJDIR)/%.o, $(OBJS2))
Dave Chapman3efa91e2005-10-27 17:04:57 +000027DEPFILE = $(OBJDIR)/dep-libffmpegFLAC
Dave Chapman273d2e82005-10-26 12:35:58 +000028DIRS =
29
Dave Chapman273d2e82005-10-26 12:35:58 +000030all: $(OUTPUT)
31
32$(OUTPUT): $(OBJS)
33 @echo "AR $@"
34 @$(AR) ruv $@ $+ >/dev/null 2>&1
35
Dave Chapman273d2e82005-10-26 12:35:58 +000036include $(TOOLSDIR)/make.inc
37
38clean:
39 @echo "cleaning libffmpegFLAC"
40 @rm -f $(OBJS) $(OUTPUT) $(DEPFILE)
41
Magnus Holmgren1b0d1da2005-12-05 19:32:13 +000042ifneq ($(MAKECMDGOALS),clean)
Dave Chapman273d2e82005-10-26 12:35:58 +000043-include $(DEPFILE)
Magnus Holmgren1b0d1da2005-12-05 19:32:13 +000044endif