diff options
author | Daniel Stenberg <daniel@haxx.se> | 2005-12-05 21:56:56 +0000 |
---|---|---|
committer | Daniel Stenberg <daniel@haxx.se> | 2005-12-05 21:56:56 +0000 |
commit | e1108ab7e6dd4dcf11676fbf9f3de34b476bf8c7 (patch) | |
tree | 7f9a513e7d226fc3a1e6b0d0042ddab343e38efb /firmware/decompressor | |
parent | 0099061b903a4a1367b7375248013e0635396361 (diff) |
Adjusted the decompressor work to build a compressed image for the Archos
targets in case it is too big to fit.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@8158 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'firmware/decompressor')
-rw-r--r-- | firmware/decompressor/Makefile | 47 |
1 files changed, 25 insertions, 22 deletions
diff --git a/firmware/decompressor/Makefile b/firmware/decompressor/Makefile index 4136eafdb7..5e4e73912e 100644 --- a/firmware/decompressor/Makefile +++ b/firmware/decompressor/Makefile @@ -7,43 +7,46 @@ # $Id$ # -CC = sh-elf-gcc -LD = sh-elf-ld -AR = sh-elf-ar -AS = sh-elf-as -OC = sh-elf-objcopy - -TOOLSDIR=../../tools -OBJDIR := . -# FIXME: get proper value from build system -MEMORYSIZE = 2 +ifndef V +SILENT=@ +endif LDS := link.lds LINKFILE = $(OBJDIR)/linkage.lds OBJS := $(OBJDIR)/decompressor.o $(OBJDIR)/uclimage.o $(OBJDIR)/startup.o - -CFLAGS = -O -W -Wall -m1 -nostdlib -ffreestanding -Wstrict-prototypes -fomit-frame-pointer -fschedule-insns +CFLAGS = $(GCCOPTS) all: $(OBJDIR)/compressed.bin $(OBJDIR)/compressed.bin : $(OBJDIR)/compressed.elf @echo "OBJCOPY "`basename $@` - @$(OC) -O binary $< $@ + $(SILENT)$(OC) -O binary $< $@ $(OBJDIR)/compressed.elf : $(OBJS) $(LINKFILE) - @echo "LD rockbox.elf" - @$(CC) $(GCCOPTS) -Os -nostdlib -o $@ $(OBJS) -T$(LINKFILE) -Wl,-Map,$(OBJDIR)/compressed.map + @echo "LD `basename $@`" + $(SILENT)$(CC) $(GCCOPTS) -Os -nostdlib -o $@ $(OBJS) -T$(LINKFILE) -Wl,-Map,$(OBJDIR)/compressed.map $(LINKFILE): $(LDS) @echo "Build LDS file" - @cat $< | $(CC) -DMEMORYSIZE=$(MEMORYSIZE) $(INCLUDES) $(TARGET) $(DEFINES) -E -P $(ROMBUILD) - >$@ + $(SILENT)cat $< | $(CC) -DMEMORYSIZE=$(MEMORYSIZE) $(INCLUDES) $(TARGET) $(DEFINES) -E -P $(ROMBUILD) - >$@ -$(OBJDIR)/decompressor.o : $(OBJDIR)/uclimage.h +$(OBJDIR)/decompressor.o : decompressor.c $(OBJDIR)/uclimage.c + $(SILENT)mkdir -p `dirname $@` + @echo "CC $<" + $(SILENT)$(CC) $(CFLAGS) -I$(OBJDIR) -c $< -o $@ -$(OBJDIR)/uclimage.c : $(OBJDIR)/rockbox.ucl $(TOOLSDIR)/ucl2src.pl - @echo "UCL2SRC" - @perl -s $(TOOLSDIR)/ucl2src.pl -p=uclimage $< $@ +$(OBJDIR)/startup.o : startup.S + $(SILENT)mkdir -p `dirname $@` + @echo "AS $<" + $(SILENT)$(CC) $(CFLAGS) -c $< -o $@ -$(OBJDIR)/uclimage.h : $(OBJDIR)/rockbox.ucl $(TOOLSDIR)/ucl2src.pl +$(OBJDIR)/uclimage.o : $(OBJDIR)/uclimage.c + $(SILENT)mkdir -p `dirname $@` + @echo "CC `basename $<`" + $(SILENT)$(CC) $(CFLAGS) -c $< -o $@ + +$(OBJDIR)/uclimage.c : $(FLASHFILE) $(TOOLSDIR)/ucl2src.pl + $(SILENT)mkdir -p `dirname $@` @echo "UCL2SRC" - @perl -s $(TOOLSDIR)/ucl2src.pl -p=uclimage $< $@ + $(SILENT)perl -s $(TOOLSDIR)/ucl2src.pl -p=$(OBJDIR)/uclimage $< + |