diff options
Diffstat (limited to 'apps')
-rw-r--r-- | apps/Makefile | 18 |
1 files changed, 16 insertions, 2 deletions
diff --git a/apps/Makefile b/apps/Makefile index 4fa225033b..278e1c7118 100644 --- a/apps/Makefile +++ b/apps/Makefile | |||
@@ -107,9 +107,23 @@ $(OBJDIR)/rombox.bin : $(OBJDIR)/rombox.elf | |||
107 | $(OBJDIR)/rockbox.asm: $(OBJDIR)/rockbox.bin | 107 | $(OBJDIR)/rockbox.asm: $(OBJDIR)/rockbox.bin |
108 | $(TOOLSDIR)/sh2d -sh1 $< > $@ | 108 | $(TOOLSDIR)/sh2d -sh1 $< > $@ |
109 | 109 | ||
110 | $(BUILDDIR)/$(BINARY) : $(OBJDIR)/rockbox.bin | 110 | # |
111 | # If there's a flashfile defined for this target (rockbox.ucl for Archos | ||
112 | # models) Then check if the mkfirmware script fails, as then it is (likely) | ||
113 | # because the image is too big and we need to create a compressed image | ||
114 | # instead. | ||
115 | # | ||
116 | $(BUILDDIR)/$(BINARY) : $(OBJDIR)/rockbox.bin $(FLASHFILE) | ||
111 | @echo "Build firmware file" | 117 | @echo "Build firmware file" |
112 | $(SILENT)$(MKFIRMWARE) $< $@ | 118 | $(SILENT)($(MKFIRMWARE) $< $@; \ |
119 | stat=$$?; \ | ||
120 | if test -n "$(FLASHFILE)"; then \ | ||
121 | if test "$$stat" -ne 0; then \ | ||
122 | echo "Image too big, making a compressed version!"; \ | ||
123 | $(MAKE) -C $(FIRMDIR)/decompressor OBJDIR=$(BUILDDIR)/firmware/decompressor; \ | ||
124 | $(MKFIRMWARE) $(BUILDDIR)/firmware/decompressor/compressed.bin $@; \ | ||
125 | fi \ | ||
126 | fi ) | ||
113 | 127 | ||
114 | else | 128 | else |
115 | # this is a simulator build | 129 | # this is a simulator build |