diff options
Diffstat (limited to 'firmware/decompressor')
-rw-r--r-- | firmware/decompressor/Makefile | 22 |
1 files changed, 8 insertions, 14 deletions
diff --git a/firmware/decompressor/Makefile b/firmware/decompressor/Makefile index 357b855c41..17ccf6da77 100644 --- a/firmware/decompressor/Makefile +++ b/firmware/decompressor/Makefile | |||
@@ -10,6 +10,7 @@ | |||
10 | ifndef V | 10 | ifndef V |
11 | SILENT=@ | 11 | SILENT=@ |
12 | endif | 12 | endif |
13 | PRINTS=$(info $(1))$(SILENT) | ||
13 | 14 | ||
14 | LDS := link.lds | 15 | LDS := link.lds |
15 | LINKFILE = $(OBJDIR)/linkage.lds | 16 | LINKFILE = $(OBJDIR)/linkage.lds |
@@ -19,37 +20,30 @@ CFLAGS = $(GCCOPTS) | |||
19 | all: $(OBJDIR)/compressed.bin | 20 | all: $(OBJDIR)/compressed.bin |
20 | 21 | ||
21 | $(OBJDIR)/compressed.bin : $(OBJDIR)/compressed.elf | 22 | $(OBJDIR)/compressed.bin : $(OBJDIR)/compressed.elf |
22 | @echo "OBJCOPY $(notdir $@)" | 23 | $(call PRINTS,OBJCOPY $(@F))$(OC) -O binary $< $@ |
23 | $(SILENT)$(OC) -O binary $< $@ | ||
24 | 24 | ||
25 | $(OBJDIR)/compressed.elf : $(OBJS) $(LINKFILE) | 25 | $(OBJDIR)/compressed.elf : $(OBJS) $(LINKFILE) |
26 | @echo "LD $(notdir $@)" | 26 | $(call PRINTS,LD $(@F))$(CC) $(GCCOPTS) -Os -nostdlib -o $@ $(OBJS) -T$(LINKFILE) -Wl,-Map,$(OBJDIR)/compressed.map |
27 | $(SILENT)$(CC) $(GCCOPTS) -Os -nostdlib -o $@ $(OBJS) -T$(LINKFILE) -Wl,-Map,$(OBJDIR)/compressed.map | ||
28 | 27 | ||
29 | $(LDS): $(OBJS) | 28 | $(LDS): $(OBJS) |
30 | 29 | ||
31 | 30 | ||
32 | $(LINKFILE): $(LDS) | 31 | $(LINKFILE): $(LDS) |
33 | @echo "Build LDS file" | 32 | $(call PRINTS,Build LDS file)cat $< | $(CC) -DMEMORYSIZE=$(MEMORYSIZE) $(INCLUDES) $(TARGET) $(DEFINES) -E -P $(ROMBUILD) - >$@ |
34 | $(SILENT)cat $< | $(CC) -DMEMORYSIZE=$(MEMORYSIZE) $(INCLUDES) $(TARGET) $(DEFINES) -E -P $(ROMBUILD) - >$@ | ||
35 | 33 | ||
36 | $(OBJDIR)/decompressor.o : decompressor.c $(OBJDIR)/uclimage.c | 34 | $(OBJDIR)/decompressor.o : decompressor.c $(OBJDIR)/uclimage.c |
37 | $(SILENT)mkdir -p $(dir $@) | 35 | $(SILENT)mkdir -p $(dir $@) |
38 | @echo "CC $<" | 36 | $(call PRINTS,CC $<)$(CC) $(CFLAGS) -I$(OBJDIR) -c $< -o $@ |
39 | $(SILENT)$(CC) $(CFLAGS) -I$(OBJDIR) -c $< -o $@ | ||
40 | 37 | ||
41 | $(OBJDIR)/startup.o : startup.S | 38 | $(OBJDIR)/startup.o : startup.S |
42 | $(SILENT)mkdir -p $(dir $@) | 39 | $(SILENT)mkdir -p $(dir $@) |
43 | @echo "AS $<" | 40 | $(call PRINTS,AS $<)$(CC) $(CFLAGS) -c $< -o $@ |
44 | $(SILENT)$(CC) $(CFLAGS) -c $< -o $@ | ||
45 | 41 | ||
46 | $(OBJDIR)/uclimage.o : $(OBJDIR)/uclimage.c | 42 | $(OBJDIR)/uclimage.o : $(OBJDIR)/uclimage.c |
47 | $(SILENT)mkdir -p $(dir $@) | 43 | $(SILENT)mkdir -p $(dir $@) |
48 | @echo "CC $(notdir $<)" | 44 | $(call PRINTS,CC $(<F))$(CC) $(CFLAGS) -c $< -o $@ |
49 | $(SILENT)$(CC) $(CFLAGS) -c $< -o $@ | ||
50 | 45 | ||
51 | $(OBJDIR)/uclimage.c : $(FLASHFILE) $(TOOLSDIR)/ucl2src.pl | 46 | $(OBJDIR)/uclimage.c : $(FLASHFILE) $(TOOLSDIR)/ucl2src.pl |
52 | $(SILENT)mkdir -p $(dir $@) | 47 | $(SILENT)mkdir -p $(dir $@) |
53 | @echo "UCL2SRC" | 48 | $(call PRINTS,UCL2SRC)perl -s $(TOOLSDIR)/ucl2src.pl -p=$(OBJDIR)/uclimage $< |
54 | $(SILENT)perl -s $(TOOLSDIR)/ucl2src.pl -p=$(OBJDIR)/uclimage $< | ||
55 | 49 | ||