Dave Chapman | 273d2e8 | 2005-10-26 12:35:58 +0000 | [diff] [blame] | 1 | # __________ __ ___. |
| 2 | # Open \______ \ ____ ____ | | _\_ |__ _______ ___ |
| 3 | # Source | _// _ \_/ ___\| |/ /| __ \ / _ \ \/ / |
| 4 | # Jukebox | | ( <_> ) \___| < | \_\ ( <_> > < < |
| 5 | # Firmware |____|_ /\____/ \___ >__|_ \|___ /\____/__/\_ \ |
| 6 | # \/ \/ \/ \/ \/ |
| 7 | # $Id$ |
| 8 | # |
| 9 | |
| 10 | INCLUDES=-I$(APPSDIR) -I.. -I. -I$(FIRMDIR)/include -I$(FIRMDIR)/export \ |
| 11 | -I$(FIRMDIR)/common -I$(FIRMDIR)/drivers -I$(BUILDDIR) |
| 12 | |
| 13 | ifdef APPEXTRA |
Linus Nielsen Feltzing | dc9e201 | 2005-10-27 14:39:00 +0000 | [diff] [blame] | 14 | INCLUDES += $(patsubst %,-I$(APPSDIR)/%,$(subst :, ,$(APPEXTRA))) |
Dave Chapman | 273d2e8 | 2005-10-26 12:35:58 +0000 | [diff] [blame] | 15 | endif |
| 16 | |
| 17 | FLACOPTS = -O2 |
Magnus Holmgren | 1b0d1da | 2005-12-05 19:32:13 +0000 | [diff] [blame] | 18 | CFLAGS = $(GCCOPTS) $(FLACOPTS) $(INCLUDES) $(TARGET) $(EXTRA_DEFINES) \ |
Brandon Low | 05dccc3 | 2006-01-18 20:54:13 +0000 | [diff] [blame^] | 19 | -DMEM=${MEMORYSIZE} $(PROFILE_OPTS) |
Dave Chapman | 273d2e8 | 2005-10-26 12:35:58 +0000 | [diff] [blame] | 20 | |
| 21 | # This sets up 'SRC' based on the files mentioned in SOURCES |
| 22 | include $(TOOLSDIR)/makesrc.inc |
| 23 | |
| 24 | SOURCES = $(SRC) |
| 25 | OBJS2 := $(SRC:%.c=$(OBJDIR)/%.o) |
| 26 | OBJS = $(patsubst %.S, $(OBJDIR)/%.o, $(OBJS2)) |
Dave Chapman | 3efa91e | 2005-10-27 17:04:57 +0000 | [diff] [blame] | 27 | DEPFILE = $(OBJDIR)/dep-libffmpegFLAC |
Dave Chapman | 273d2e8 | 2005-10-26 12:35:58 +0000 | [diff] [blame] | 28 | DIRS = |
| 29 | |
Dave Chapman | 273d2e8 | 2005-10-26 12:35:58 +0000 | [diff] [blame] | 30 | all: $(OUTPUT) |
| 31 | |
| 32 | $(OUTPUT): $(OBJS) |
| 33 | @echo "AR $@" |
| 34 | @$(AR) ruv $@ $+ >/dev/null 2>&1 |
| 35 | |
Dave Chapman | 273d2e8 | 2005-10-26 12:35:58 +0000 | [diff] [blame] | 36 | include $(TOOLSDIR)/make.inc |
| 37 | |
| 38 | clean: |
| 39 | @echo "cleaning libffmpegFLAC" |
| 40 | @rm -f $(OBJS) $(OUTPUT) $(DEPFILE) |
| 41 | |
Magnus Holmgren | 1b0d1da | 2005-12-05 19:32:13 +0000 | [diff] [blame] | 42 | ifneq ($(MAKECMDGOALS),clean) |
Dave Chapman | 273d2e8 | 2005-10-26 12:35:58 +0000 | [diff] [blame] | 43 | -include $(DEPFILE) |
Magnus Holmgren | 1b0d1da | 2005-12-05 19:32:13 +0000 | [diff] [blame] | 44 | endif |