2009-05-22 21:58:48 +00:00
|
|
|
# __________ __ ___.
|
|
|
|
# Open \______ \ ____ ____ | | _\_ |__ _______ ___
|
|
|
|
# Source | _// _ \_/ ___\| |/ /| __ \ / _ \ \/ /
|
|
|
|
# Jukebox | | ( <_> ) \___| < | \_\ ( <_> > < <
|
|
|
|
# Firmware |____|_ /\____/ \___ >__|_ \|___ /\____/__/\_ \
|
|
|
|
# \/ \/ \/ \/ \/
|
|
|
|
# $Id$
|
|
|
|
#
|
|
|
|
|
|
|
|
PDBOXSRCDIR := $(APPSDIR)/plugins/pdbox
|
|
|
|
PDBOXBUILDDIR := $(BUILDDIR)/apps/plugins/pdbox
|
|
|
|
|
|
|
|
ROCKS += $(PDBOXBUILDDIR)/pdbox.rock
|
|
|
|
|
2009-06-02 20:24:05 +00:00
|
|
|
PDBOX_SRC := $(call preprocess, $(PDBOXSRCDIR)/SOURCES)
|
|
|
|
PDBOX_OBJ := $(call c2obj, $(PDBOX_SRC))
|
2009-05-22 21:58:48 +00:00
|
|
|
|
|
|
|
# add source files to OTHERSRC to get automatic dependencies
|
2010-02-25 23:35:16 +00:00
|
|
|
OTHER_SRC += $(PDBOX_SRC)
|
2009-05-22 21:58:48 +00:00
|
|
|
|
2009-09-23 18:36:13 +00:00
|
|
|
$(PDBOXBUILDDIR)/pdbox.rock: $(PDBOX_OBJ) $(MPEG_OBJ) $(CODECDIR)/libtlsf.a
|
2009-05-22 21:58:48 +00:00
|
|
|
|
2010-07-23 08:56:18 +00:00
|
|
|
PDBOXFLAGS = $(PLUGINFLAGS) -fno-strict-aliasing
|
2010-07-03 21:16:59 +00:00
|
|
|
PDBOXLDFLAGS = $(PLUGINLDFLAGS)
|
2010-07-10 13:49:49 +00:00
|
|
|
ifdef APP_TYPE
|
2010-07-03 21:16:59 +00:00
|
|
|
PDBOXLDFLAGS += -lm
|
|
|
|
endif
|
2009-05-22 21:58:48 +00:00
|
|
|
|
|
|
|
# Compile PDBox with extra flags (adapted from ZXBox)
|
2010-01-17 13:03:10 +00:00
|
|
|
$(PDBOXBUILDDIR)/%.o: $(PDBOXSRCDIR)/%.c $(PDBOXSRCDIR)/pdbox.make
|
2009-05-22 21:58:48 +00:00
|
|
|
$(SILENT)mkdir -p $(dir $@)
|
|
|
|
$(call PRINTS,CC $(subst $(ROOTDIR)/,,$<))$(CC) -I$(dir $<) $(PDBOXFLAGS) -c $< -o $@
|
2010-07-03 21:16:59 +00:00
|
|
|
|
|
|
|
$(PDBOXBUILDDIR)/pdbox.rock:
|
|
|
|
$(call PRINTS,LD $(@F))$(CC) $(PLUGINFLAGS) -o $*.elf \
|
|
|
|
$(filter %.o, $^) \
|
|
|
|
$(filter %.a, $+) \
|
|
|
|
-lgcc $(PDBOXLDFLAGS)
|
2010-07-10 13:49:49 +00:00
|
|
|
ifdef APP_TYPE
|
2010-07-03 21:16:59 +00:00
|
|
|
$(SILENT)cp $*.elf $@
|
|
|
|
else
|
|
|
|
$(SILENT)$(OC) -O binary $*.elf $@
|
|
|
|
endif
|
|
|
|
|
|
|
|
|