2 # Open \______ \ ____ ____ | | _\_ |__ _______ ___
3 # Source | _// _ \_/ ___\| |/ /| __ \ / _ \ \/ /
4 # Jukebox | | ( <_> ) \___| < | \_\ ( <_> > < <
5 # Firmware |____|_ /\____/ \___ >__|_ \|___ /\____/__/\_ \
13 PRINTS
=$(SILENT
)$(call
info,$(1))
16 LINKFILE
= $(OBJDIR
)/linkage.lds
17 OBJS
:= $(OBJDIR
)/decompressor.o
$(OBJDIR
)/uclimage.o
$(OBJDIR
)/startup.o
20 all: $(OBJDIR
)/compressed.bin
22 $(OBJDIR
)/compressed.bin
: $(OBJDIR
)/compressed.elf
23 $(call PRINTS
,OBJCOPY
$(@F
))$(OC
) -O binary
$< $@
25 $(OBJDIR
)/compressed.elf
: $(OBJS
) $(LINKFILE
)
26 $(call PRINTS
,LD
$(@F
))$(CC
) $(GCCOPTS
) -Os
-nostdlib
-o
$@
$(OBJS
) -T
$(LINKFILE
) -Wl
,-Map
,$(OBJDIR
)/compressed.map
32 $(call PRINTS
,Build LDS file
)cat
$< |
$(CC
) -DMEMORYSIZE
=$(MEMORYSIZE
) $(INCLUDES
) $(TARGET
) $(DEFINES
) -E
-P
$(ROMBUILD
) - >$@
34 $(OBJDIR
)/decompressor.o
: decompressor.c
$(OBJDIR
)/uclimage.c
35 $(SILENT
)mkdir
-p
$(dir $@
)
36 $(call PRINTS
,CC
$<)$(CC
) $(CFLAGS
) -I
$(OBJDIR
) -c
$< -o
$@
38 $(OBJDIR
)/startup.o
: startup.S
39 $(SILENT
)mkdir
-p
$(dir $@
)
40 $(call PRINTS
,AS
$<)$(CC
) $(CFLAGS
) -c
$< -o
$@
42 $(OBJDIR
)/uclimage.o
: $(OBJDIR
)/uclimage.c
43 $(SILENT
)mkdir
-p
$(dir $@
)
44 $(call PRINTS
,CC
$(<F
))$(CC
) $(CFLAGS
) -c
$< -o
$@
46 $(OBJDIR
)/uclimage.c
: $(FLASHFILE
) $(TOOLSDIR
)/ucl2src.pl
47 $(SILENT
)mkdir
-p
$(dir $@
)
48 $(call PRINTS
,UCL2SRC
)perl
-s
$(TOOLSDIR
)/ucl2src.pl
-p
=$(OBJDIR
)/uclimage
$<