2002-03-28 15:09:10 +00:00
|
|
|
# __________ __ ___.
|
|
|
|
# Open \______ \ ____ ____ | | _\_ |__ _______ ___
|
|
|
|
# Source | _// _ \_/ ___\| |/ /| __ \ / _ \ \/ /
|
|
|
|
# Jukebox | | ( <_> ) \___| < | \_\ ( <_> > < <
|
|
|
|
# Firmware |____|_ /\____/ \___ >__|_ \|___ /\____/__/\_ \
|
|
|
|
# \/ \/ \/ \/ \/
|
|
|
|
# $Id$
|
|
|
|
#
|
|
|
|
|
2005-05-07 22:41:17 +00:00
|
|
|
INCLUDES=-Iinclude -I$(FIRMDIR) -Iexport -Icommon -Idrivers -I$(BUILDDIR)
|
2002-03-28 15:09:10 +00:00
|
|
|
|
2004-10-04 13:03:33 +00:00
|
|
|
CFLAGS = $(GCCOPTS) $(INCLUDES) $(TARGET) $(EXTRA_DEFINES) -DMEM=${MEMORYSIZE}
|
|
|
|
|
2005-03-06 15:40:03 +00:00
|
|
|
# This sets up 'SRC' based on the files mentioned in SOURCES
|
|
|
|
include $(TOOLSDIR)/makesrc.inc
|
|
|
|
|
2004-10-04 13:03:33 +00:00
|
|
|
SOURCES = $(SRC)
|
|
|
|
OBJS2 := $(patsubst %.c, $(OBJDIR)/%.o, $(SRC)) $(OBJDIR)/sysfont.o
|
|
|
|
OBJS = $(patsubst %.S, $(OBJDIR)/%.o, $(OBJS2))
|
2004-09-22 08:58:50 +00:00
|
|
|
DIRS:=. drivers common
|
2005-05-07 22:41:17 +00:00
|
|
|
OUTPUT = $(BUILDDIR)/librockbox.a
|
2004-09-22 08:58:50 +00:00
|
|
|
DEPFILE = $(OBJDIR)/dep-firmware
|
2002-10-02 16:47:38 +00:00
|
|
|
|
2005-05-07 22:41:17 +00:00
|
|
|
all: $(OUTPUT) $(EXTRA_TARGETS)
|
2003-07-10 11:52:42 +00:00
|
|
|
|
2004-09-22 08:58:50 +00:00
|
|
|
dep: $(DEPFILE)
|
|
|
|
|
|
|
|
$(OUTPUT): $(OBJS) $(DEPFILE)
|
2005-05-07 22:41:17 +00:00
|
|
|
@echo "AR+RANLIB $@"
|
2004-09-22 21:40:45 +00:00
|
|
|
@$(AR) ruv $@ $(OBJS) >/dev/null 2>&1
|
2005-02-18 13:47:17 +00:00
|
|
|
@$(RANLIB) $@
|
2002-05-23 12:00:50 +00:00
|
|
|
|
2004-09-22 08:58:50 +00:00
|
|
|
include $(TOOLSDIR)/make.inc
|
2002-08-15 09:30:41 +00:00
|
|
|
|
2002-03-28 15:09:10 +00:00
|
|
|
clean:
|
2004-09-06 07:05:12 +00:00
|
|
|
@echo "cleaning firmware"
|
2004-09-22 08:58:50 +00:00
|
|
|
@rm -f $(OBJS) $(OUTPUT) $(OBJDIR)/sysfont.c $(DEPFILE)
|
|
|
|
@rm -rf $(OBJDIR)/drivers $(OBJDIR)/common
|
2002-04-28 09:53:39 +00:00
|
|
|
|
2002-05-17 09:28:07 +00:00
|
|
|
# Special targets
|
2003-02-07 09:41:57 +00:00
|
|
|
$(OBJDIR)/thread.o: thread.c export/thread.h
|
2005-05-07 22:41:17 +00:00
|
|
|
$(SILENT)echo "CC thread.c"
|
|
|
|
$(SILENT)$(CC) -c -O -fomit-frame-pointer $(CFLAGS) $< -o $@
|
2002-05-17 09:28:07 +00:00
|
|
|
|
2005-06-30 10:52:51 +00:00
|
|
|
$(OBJDIR)/sysfont.o: ../fonts/rockbox_default.bdf
|
2004-09-06 07:05:12 +00:00
|
|
|
@echo "CONVBDF"
|
2005-05-07 22:41:17 +00:00
|
|
|
$(SILENT)$(TOOLSDIR)/convbdf -c -o $(OBJDIR)/sysfont.c $<
|
2004-09-06 07:05:12 +00:00
|
|
|
@echo "CC sysfont.c"
|
2005-05-07 22:41:17 +00:00
|
|
|
$(SILENT)$(CC) $(CFLAGS) -c $(OBJDIR)/sysfont.c -o $@
|
2002-09-20 08:07:51 +00:00
|
|
|
|
2004-09-22 08:58:50 +00:00
|
|
|
-include $(DEPFILE)
|