Add DM320 I²C driver, although not (yet) enabled in the sources.
[Rockbox.git] / firmware / decompressor / Makefile
blob46d7afe1b09b79434b7ff10bf88fdbffb42711d1
1 # __________ __ ___.
2 # Open \______ \ ____ ____ | | _\_ |__ _______ ___
3 # Source | _// _ \_/ ___\| |/ /| __ \ / _ \ \/ /
4 # Jukebox | | ( <_> ) \___| < | \_\ ( <_> > < <
5 # Firmware |____|_ /\____/ \___ >__|_ \|___ /\____/__/\_ \
6 # \/ \/ \/ \/ \/
7 # $Id$
10 ifndef V
11 SILENT=@
12 endif
13 PRINTS=$(SILENT)$(call info,$(1))
15 LDS := link.lds
16 LINKFILE = $(OBJDIR)/linkage.lds
17 OBJS := $(OBJDIR)/decompressor.o $(OBJDIR)/uclimage.o $(OBJDIR)/startup.o
18 CFLAGS = $(GCCOPTS)
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
28 $(LDS): $(OBJS)
31 $(LINKFILE): $(LDS)
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 $<