diff options
-rw-r--r-- | apps/plugins/pdbox/pdbox.make | 17 |
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 | ||
23 | PDBOXFLAGS = $(PLUGINFLAGS) | 23 | PDBOXFLAGS = $(PLUGINFLAGS) |
24 | PDBOXLDFLAGS = $(PLUGINLDFLAGS) | ||
25 | ifdef SIMVER | ||
26 | PDBOXLDFLAGS += -lm | ||
27 | endif | ||
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) | ||
39 | ifdef SIMVER | ||
40 | $(SILENT)cp $*.elf $@ | ||
41 | else | ||
42 | $(SILENT)$(OC) -O binary $*.elf $@ | ||
43 | endif | ||
44 | |||
45 | |||