summaryrefslogtreecommitdiffstats
path: root/apps/plugins/pictureflow/pictureflow.make
diff options
context:
space:
mode:
authorAndrew Mahone <andrew.mahone@gmail.com>2009-05-07 01:23:13 +0000
committerAndrew Mahone <andrew.mahone@gmail.com>2009-05-07 01:23:13 +0000
commit5621fd393a4445645b07bb2e89d89d23bb9a6473 (patch)
treeb2b46a056ea1ae599e0a99118ddacdf72a6dac4a /apps/plugins/pictureflow/pictureflow.make
parent580b1a5c4b305c7cb320415267c5e1b88b053948 (diff)
downloadrockbox-5621fd393a4445645b07bb2e89d89d23bb9a6473.tar.gz
rockbox-5621fd393a4445645b07bb2e89d89d23bb9a6473.tar.bz2
rockbox-5621fd393a4445645b07bb2e89d89d23bb9a6473.zip
Build pictureflow using overlay on lowmem targets, support JPEG AA in PF on all targets.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@20864 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'apps/plugins/pictureflow/pictureflow.make')
-rw-r--r--apps/plugins/pictureflow/pictureflow.make58
1 files changed, 58 insertions, 0 deletions
diff --git a/apps/plugins/pictureflow/pictureflow.make b/apps/plugins/pictureflow/pictureflow.make
new file mode 100644
index 0000000000..c1fb1f3957
--- /dev/null
+++ b/apps/plugins/pictureflow/pictureflow.make
@@ -0,0 +1,58 @@
+# __________ __ ___.
+# Open \______ \ ____ ____ | | _\_ |__ _______ ___
+# Source | _// _ \_/ ___\| |/ /| __ \ / _ \ \/ /
+# Jukebox | | ( <_> ) \___| < | \_\ ( <_> > < <
+# Firmware |____|_ /\____/ \___ >__|_ \|___ /\____/__/\_ \
+# \/ \/ \/ \/ \/
+# $Id$
+#
+
+PICTUREFLOW_SRCDIR = $(APPSDIR)/plugins/pictureflow
+PICTUREFLOW_OBJDIR = $(BUILDDIR)/apps/plugins/pictureflow
+
+PICTUREFLOW_SRC := $(call preprocess, $(PICTUREFLOW_SRCDIR)/SOURCES)
+PICTUREFLOW_OBJ := $(call c2obj, $(PICTUREFLOW_SRC))
+
+OTHER_SRC += $(PICTUREFLOW_SRC)
+
+ifndef SIMVER
+ifneq (,$(strip $(foreach tgt,RECORDER ONDIO,$(findstring $(tgt),$(TARGET)))))
+ ### lowmem targets
+ ROCKS += $(PICTUREFLOW_OBJDIR)/pictureflow.ovl
+ PICTUREFLOW_OUTLDS = $(PICTUREFLOW_OBJDIR)/picutreflow.link
+ PICTUREFLOW_OVLFLAGS = -T$(PICTUREFLOW_OUTLDS) -Wl,--gc-sections -Wl,-Map,$(basename $@).map
+else
+ ### all other targets
+ ROCKS += $(PICTUREFLOW_OBJDIR)/pictureflow.rock
+endif
+else
+ ### simulator
+ ROCKS += $(PICTUREFLOW_OBJDIR)/pictureflow.rock
+endif
+
+ifeq ($(CPU),sh)
+# sh need to retain its' -Os
+PICTUREFLOWFLAGS = $(PLUGINFLAGS)
+else
+PICTUREFLOWFLAGS = $(filter-out -O%,$(PLUGINFLAGS)) -O2
+endif
+
+$(PICTUREFLOW_OBJDIR)/pictureflow.rock: $(PICTUREFLOW_OBJ)
+
+$(PICTUREFLOW_OBJDIR)/pictureflow.refmap: $(PICTUREFLOW_OBJ)
+
+$(PICTUREFLOW_OUTLDS): $(PLUGIN_LDS) $(PICTUREFLOW_OBJDIR)/pictureflow.refmap
+ $(call PRINTS,PP $(@F))$(call preprocess2file,$<,$@,-DOVERLAY_OFFSET=$(shell \
+ $(TOOLSDIR)/ovl_offset.pl $(PICTUREFLOW_OBJDIR)/pictureflow.refmap))
+
+$(PICTUREFLOW_OBJDIR)/pictureflow.ovl: $(PICTUREFLOW_OBJ) $(PICTUREFLOW_OUTLDS)
+ $(SILENT)$(CC) $(PLUGINFLAGS) -o $(basename $@).elf \
+ $(filter %.o, $^) \
+ $(filter %.a, $+) \
+ -lgcc $(PICTUREFLOW_OVLFLAGS)
+ $(call PRINTS,LD $(@F))$(OC) -O binary $(basename $@).elf $@
+
+# special pattern rule for compiling pictureflow with extra flags
+$(PICTUREFLOW_OBJDIR)/%.o: $(PICTUREFLOW_SRCDIR)/%.c $(PLUGINBITMAPLIB) $(PICTUREFLOW_SRCDIR)/pictureflow.make
+ $(SILENT)mkdir -p $(dir $@)
+ $(call PRINTS,CC $(subst $(ROOTDIR)/,,$<))$(CC) -I$(dir $<) $(PICTUREFLOWFLAGS) -c $< -o $@