summaryrefslogtreecommitdiffstats
path: root/apps/plugins/pdbox
diff options
context:
space:
mode:
authorFrank Gevaerts <frank@gevaerts.be>2010-07-03 21:16:59 +0000
committerFrank Gevaerts <frank@gevaerts.be>2010-07-03 21:16:59 +0000
commit64276fc0fff63661a40d8640cc1a08143c80dc72 (patch)
tree5212c265f820258f6b454ae1bae239f76a69f9e6 /apps/plugins/pdbox
parentb8286d45be0cdaffccfe684dde7385e2c042141d (diff)
downloadrockbox-64276fc0fff63661a40d8640cc1a08143c80dc72.tar.gz
rockbox-64276fc0fff63661a40d8640cc1a08143c80dc72.tar.bz2
rockbox-64276fc0fff63661a40d8640cc1a08143c80dc72.zip
Add -lm to pdbox sim build
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@27261 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'apps/plugins/pdbox')
-rw-r--r--apps/plugins/pdbox/pdbox.make17
1 files changed, 17 insertions, 0 deletions
diff --git a/apps/plugins/pdbox/pdbox.make b/apps/plugins/pdbox/pdbox.make
index 7abb31f3bb..d39d9fde1e 100644
--- a/apps/plugins/pdbox/pdbox.make
+++ b/apps/plugins/pdbox/pdbox.make
@@ -21,8 +21,25 @@ OTHER_SRC += $(PDBOX_SRC)
$(PDBOXBUILDDIR)/pdbox.rock: $(PDBOX_OBJ) $(MPEG_OBJ) $(CODECDIR)/libtlsf.a
PDBOXFLAGS = $(PLUGINFLAGS)
+PDBOXLDFLAGS = $(PLUGINLDFLAGS)
+ifdef SIMVER
+PDBOXLDFLAGS += -lm
+endif
# Compile PDBox with extra flags (adapted from ZXBox)
$(PDBOXBUILDDIR)/%.o: $(PDBOXSRCDIR)/%.c $(PDBOXSRCDIR)/pdbox.make
$(SILENT)mkdir -p $(dir $@)
$(call PRINTS,CC $(subst $(ROOTDIR)/,,$<))$(CC) -I$(dir $<) $(PDBOXFLAGS) -c $< -o $@
+
+$(PDBOXBUILDDIR)/pdbox.rock:
+ $(call PRINTS,LD $(@F))$(CC) $(PLUGINFLAGS) -o $*.elf \
+ $(filter %.o, $^) \
+ $(filter %.a, $+) \
+ -lgcc $(PDBOXLDFLAGS)
+ifdef SIMVER
+ $(SILENT)cp $*.elf $@
+else
+ $(SILENT)$(OC) -O binary $*.elf $@
+endif
+
+