From 64276fc0fff63661a40d8640cc1a08143c80dc72 Mon Sep 17 00:00:00 2001 From: Frank Gevaerts Date: Sat, 3 Jul 2010 21:16:59 +0000 Subject: Add -lm to pdbox sim build git-svn-id: svn://svn.rockbox.org/rockbox/trunk@27261 a1c6a512-1295-4272-9138-f99709370657 --- apps/plugins/pdbox/pdbox.make | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) 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 + + -- cgit v1.2.3