summaryrefslogtreecommitdiff
path: root/firmware/decompressor/Makefile
diff options
context:
space:
mode:
Diffstat (limited to 'firmware/decompressor/Makefile')
-rw-r--r--firmware/decompressor/Makefile22
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 @@
10ifndef V 10ifndef V
11SILENT=@ 11SILENT=@
12endif 12endif
13PRINTS=$(info $(1))$(SILENT)
13 14
14LDS := link.lds 15LDS := link.lds
15LINKFILE = $(OBJDIR)/linkage.lds 16LINKFILE = $(OBJDIR)/linkage.lds
@@ -19,37 +20,30 @@ CFLAGS = $(GCCOPTS)
19all: $(OBJDIR)/compressed.bin 20all: $(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