diff options
author | Jens Arnold <amiconn@rockbox.org> | 2008-10-28 21:07:53 +0000 |
---|---|---|
committer | Jens Arnold <amiconn@rockbox.org> | 2008-10-28 21:07:53 +0000 |
commit | 2c52dee83f5c796fe471e6fab15dea17a2f508ff (patch) | |
tree | 4f90ccd3c1d5785385fea9144e5011b1943acfcd /firmware/decompressor/Makefile | |
parent | afd2f681d18e574442f8569f1a722d5d39d79b78 (diff) | |
download | rockbox-2c52dee83f5c796fe471e6fab15dea17a2f508ff.tar.gz rockbox-2c52dee83f5c796fe471e6fab15dea17a2f508ff.zip |
Self-extractor for on-disk firmware image: UCL decompressor in SH1 assembler - less than half the size of the compiled C function, and ~45% faster.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@18904 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'firmware/decompressor/Makefile')
-rw-r--r-- | firmware/decompressor/Makefile | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/firmware/decompressor/Makefile b/firmware/decompressor/Makefile index 46d7afe1b0..33b6affc6d 100644 --- a/firmware/decompressor/Makefile +++ b/firmware/decompressor/Makefile | |||
@@ -14,7 +14,8 @@ PRINTS=$(SILENT)$(call info,$(1)) | |||
14 | 14 | ||
15 | LDS := link.lds | 15 | LDS := link.lds |
16 | LINKFILE = $(OBJDIR)/linkage.lds | 16 | LINKFILE = $(OBJDIR)/linkage.lds |
17 | OBJS := $(OBJDIR)/decompressor.o $(OBJDIR)/uclimage.o $(OBJDIR)/startup.o | 17 | OBJS := $(OBJDIR)/decompressor.o $(OBJDIR)/uclimage.o \ |
18 | $(OBJDIR)/sh_nrv2e_d8.o $(OBJDIR)/startup.o | ||
18 | CFLAGS = $(GCCOPTS) | 19 | CFLAGS = $(GCCOPTS) |
19 | 20 | ||
20 | all: $(OBJDIR)/compressed.bin | 21 | all: $(OBJDIR)/compressed.bin |
@@ -25,9 +26,6 @@ $(OBJDIR)/compressed.bin : $(OBJDIR)/compressed.elf | |||
25 | $(OBJDIR)/compressed.elf : $(OBJS) $(LINKFILE) | 26 | $(OBJDIR)/compressed.elf : $(OBJS) $(LINKFILE) |
26 | $(call PRINTS,LD $(@F))$(CC) $(GCCOPTS) -Os -nostdlib -o $@ $(OBJS) -T$(LINKFILE) -Wl,-Map,$(OBJDIR)/compressed.map | 27 | $(call PRINTS,LD $(@F))$(CC) $(GCCOPTS) -Os -nostdlib -o $@ $(OBJS) -T$(LINKFILE) -Wl,-Map,$(OBJDIR)/compressed.map |
27 | 28 | ||
28 | $(LDS): $(OBJS) | ||
29 | |||
30 | |||
31 | $(LINKFILE): $(LDS) | 29 | $(LINKFILE): $(LDS) |
32 | $(call PRINTS,Build LDS file)cat $< | $(CC) -DMEMORYSIZE=$(MEMORYSIZE) $(INCLUDES) $(TARGET) $(DEFINES) -E -P $(ROMBUILD) - >$@ | 30 | $(call PRINTS,Build LDS file)cat $< | $(CC) -DMEMORYSIZE=$(MEMORYSIZE) $(INCLUDES) $(TARGET) $(DEFINES) -E -P $(ROMBUILD) - >$@ |
33 | 31 | ||
@@ -39,11 +37,15 @@ $(OBJDIR)/startup.o : startup.S | |||
39 | $(SILENT)mkdir -p $(dir $@) | 37 | $(SILENT)mkdir -p $(dir $@) |
40 | $(call PRINTS,AS $<)$(CC) $(CFLAGS) -c $< -o $@ | 38 | $(call PRINTS,AS $<)$(CC) $(CFLAGS) -c $< -o $@ |
41 | 39 | ||
40 | $(OBJDIR)/sh_nrv2e_d8.o : sh_nrv2e_d8.S | ||
41 | $(SILENT)mkdir -p $(dir $@) | ||
42 | $(call PRINTS,AS $<)$(CC) $(CFLAGS) -c $< -o $@ | ||
43 | |||
42 | $(OBJDIR)/uclimage.o : $(OBJDIR)/uclimage.c | 44 | $(OBJDIR)/uclimage.o : $(OBJDIR)/uclimage.c |
43 | $(SILENT)mkdir -p $(dir $@) | 45 | $(SILENT)mkdir -p $(dir $@) |
44 | $(call PRINTS,CC $(<F))$(CC) $(CFLAGS) -c $< -o $@ | 46 | $(call PRINTS,CC $(<F))$(CC) $(CFLAGS) -c $< -o $@ |
45 | 47 | ||
46 | $(OBJDIR)/uclimage.c : $(FLASHFILE) $(TOOLSDIR)/ucl2src.pl | 48 | $(OBJDIR)/uclimage.c : $(FLASHFILE) $(TOOLSDIR)/ucl2src.pl |
47 | $(SILENT)mkdir -p $(dir $@) | 49 | $(SILENT)mkdir -p $(dir $@) |
48 | $(call PRINTS,UCL2SRC)perl -s $(TOOLSDIR)/ucl2src.pl -p=$(OBJDIR)/uclimage $< | 50 | $(call PRINTS,UCL2SRC $(<F))perl -s $(TOOLSDIR)/ucl2src.pl -p=$(OBJDIR)/uclimage $< |
49 | 51 | ||