diff options
Diffstat (limited to 'firmware/decompressor/Makefile')
-rw-r--r-- | firmware/decompressor/Makefile | 42 |
1 files changed, 42 insertions, 0 deletions
diff --git a/firmware/decompressor/Makefile b/firmware/decompressor/Makefile new file mode 100644 index 0000000000..99e91aa35e --- /dev/null +++ b/firmware/decompressor/Makefile | |||
@@ -0,0 +1,42 @@ | |||
1 | # __________ __ ___. | ||
2 | # Open \______ \ ____ ____ | | _\_ |__ _______ ___ | ||
3 | # Source | _// _ \_/ ___\| |/ /| __ \ / _ \ \/ / | ||
4 | # Jukebox | | ( <_> ) \___| < | \_\ ( <_> > < < | ||
5 | # Firmware |____|_ /\____/ \___ >__|_ \|___ /\____/__/\_ \ | ||
6 | # \/ \/ \/ \/ \/ | ||
7 | # $Id$ | ||
8 | # | ||
9 | |||
10 | CC = sh-elf-gcc | ||
11 | LD = sh-elf-ld | ||
12 | AR = sh-elf-ar | ||
13 | AS = sh-elf-as | ||
14 | OC = sh-elf-objcopy | ||
15 | |||
16 | TOOLSDIR=../../tools | ||
17 | OBJDIR := . | ||
18 | # FIXME: get proper value from build system | ||
19 | MEMORYSIZE = 2 | ||
20 | |||
21 | |||
22 | LDS := link.lds | ||
23 | LINKFILE = $(OBJDIR)/linkage.lds | ||
24 | OBJS := $(OBJDIR)/decompressor.o $(OBJDIR)/rockboxucl.o | ||
25 | |||
26 | CFLAGS = -O -W -Wall -m1 -nostdlib -ffreestanding -Wstrict-prototypes -fomit-frame-pointer -fschedule-insns | ||
27 | |||
28 | $(OBJDIR)/compressed.bin : $(OBJDIR)/compressed.elf | ||
29 | @echo "OBJCOPY "`basename $@` | ||
30 | @$(OC) -O binary $< $@ | ||
31 | |||
32 | $(OBJDIR)/compressed.elf : $(OBJS) $(LINKFILE) | ||
33 | @echo "LD rockbox.elf" | ||
34 | @$(CC) $(GCCOPTS) -Os -nostdlib -o $@ $(OBJS) -T$(LINKFILE) -Wl,-Map,$(OBJDIR)/compressed.map | ||
35 | |||
36 | $(LINKFILE): $(LDS) | ||
37 | @echo "Build LDS file" | ||
38 | @cat $< | $(CC) -DMEMORYSIZE=$(MEMORYSIZE) $(INCLUDES) $(TARGET) $(DEFINES) -E -P $(ROMBUILD) - >$@ | ||
39 | |||
40 | $(OBJDIR)/rockboxucl.o: $(OBJDIR)/rockbox.ucl | ||
41 | @echo "OBJCOPY rockbox.ucl" | ||
42 | @$(OC) -I binary -O elf32-sh -B sh --rename-section .data=.image,alloc,load,data,contents $< $@ | ||