summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-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)
21$(PDBOXBUILDDIR)/pdbox.rock: $(PDBOX_OBJ) $(MPEG_OBJ) $(CODECDIR)/libtlsf.a 21$(PDBOXBUILDDIR)/pdbox.rock: $(PDBOX_OBJ) $(MPEG_OBJ) $(CODECDIR)/libtlsf.a
22 22
23PDBOXFLAGS = $(PLUGINFLAGS) 23PDBOXFLAGS = $(PLUGINFLAGS)
24PDBOXLDFLAGS = $(PLUGINLDFLAGS)
25ifdef SIMVER
26PDBOXLDFLAGS += -lm
27endif
24 28
25# Compile PDBox with extra flags (adapted from ZXBox) 29# Compile PDBox with extra flags (adapted from ZXBox)
26$(PDBOXBUILDDIR)/%.o: $(PDBOXSRCDIR)/%.c $(PDBOXSRCDIR)/pdbox.make 30$(PDBOXBUILDDIR)/%.o: $(PDBOXSRCDIR)/%.c $(PDBOXSRCDIR)/pdbox.make
27 $(SILENT)mkdir -p $(dir $@) 31 $(SILENT)mkdir -p $(dir $@)
28 $(call PRINTS,CC $(subst $(ROOTDIR)/,,$<))$(CC) -I$(dir $<) $(PDBOXFLAGS) -c $< -o $@ 32 $(call PRINTS,CC $(subst $(ROOTDIR)/,,$<))$(CC) -I$(dir $<) $(PDBOXFLAGS) -c $< -o $@
33
34$(PDBOXBUILDDIR)/pdbox.rock:
35 $(call PRINTS,LD $(@F))$(CC) $(PLUGINFLAGS) -o $*.elf \
36 $(filter %.o, $^) \
37 $(filter %.a, $+) \
38 -lgcc $(PDBOXLDFLAGS)
39ifdef SIMVER
40 $(SILENT)cp $*.elf $@
41else
42 $(SILENT)$(OC) -O binary $*.elf $@
43endif
44
45