Adapted more Makefiles to the more efficient info printing.

git-svn-id: svn://svn.rockbox.org/rockbox/trunk@11390 a1c6a512-1295-4272-9138-f99709370657
This commit is contained in:
Jens Arnold 2006-10-30 01:40:20 +00:00
parent 5421e86969
commit f40f0debcb
4 changed files with 27 additions and 45 deletions

View file

@ -30,15 +30,13 @@ DIRS =
all: $(OUTPUT)
$(OUTPUT): $(OBJS)
@echo "AR+RANLIB $(notdir $@)"
@$(AR) ruv $@ $+ >/dev/null 2>&1
@$(RANLIB) $@
$(call PRINTS,AR+RANLIB $(@F))$(AR) ruv $@ $+ >/dev/null 2>&1
$(SILENT)$(RANLIB) $@
include $(TOOLSDIR)/make.inc
clean:
@echo "cleaning libwavpack"
@rm -f $(OBJS) $(OUTPUT) $(DEPFILE)
$(call PRINTS,cleaning libwavpack)rm -f $(OBJS) $(OUTPUT) $(DEPFILE)
ifneq ($(MAKECMDGOALS),clean)
-include $(DEPFILE)

View file

@ -50,35 +50,30 @@ endif
dep: $(DEPFILE)
$(LINKFILE): $(LDS)
@echo "Build LDS file"
@cat $< | $(CC) -DMEMORYSIZE=$(MEMORYSIZE) $(INCLUDES) $(TARGET) $(DEFINES) -E -P $(ROMBUILD) - >$@
$(call PRINTS,Build $(@F))cat $< | $(CC) -DMEMORYSIZE=$(MEMORYSIZE) $(INCLUDES) $(TARGET) $(DEFINES) -E -P $(ROMBUILD) - >$@
$(MAXOUTFILE):
@echo '#include "config.h"' > $(MAXINFILE)
@echo "ROM_START" >> $(MAXINFILE)
@cat $(MAXINFILE) | $(CC) -DMEMORYSIZE=$(MEMORYSIZE) $(INCLUDES) $(TARGET) $(DEFINES) -E -P $(ROMBUILD) - > $(MAXOUTFILE)
@rm $(MAXINFILE)
$(SILENT)echo '#include "config.h"' > $(MAXINFILE)
$(SILENT)echo "ROM_START" >> $(MAXINFILE)
$(SILENT)cat $(MAXINFILE) | $(CC) -DMEMORYSIZE=$(MEMORYSIZE) $(INCLUDES) $(TARGET) $(DEFINES) -E -P $(ROMBUILD) - > $(MAXOUTFILE)
$(SILENT)rm $(MAXINFILE)
$(OBJDIR)/bootloader.elf : $(OBJS) $(LINKFILE) $(DEPFILE) $(LIBROCKBOX)
@echo "LD bootloader.elf"
$(SILENT)$(CC) $(GCCOPTS) -Os -nostdlib -o $@ $(OBJS) -L$(BUILDDIR) -L$(BUILDDIR)/firmware -lrockbox -lgcc -T$(LINKFILE) -Wl,-Map,$(OBJDIR)/bootloader.map
$(call PRINTS,LD $(@F))$(CC) $(GCCOPTS) -Os -nostdlib -o $@ $(OBJS) -L$(BUILDDIR) -L$(BUILDDIR)/firmware -lrockbox -lgcc -T$(LINKFILE) -Wl,-Map,$(OBJDIR)/bootloader.map
$(OBJDIR)/bootloader.bin : $(OBJDIR)/bootloader.elf
@echo "OBJCOPY $<"
$(SILENT)$(OC) -O binary $< $@
$(call PRINTS,OBJCOPY $(@F))$(OC) -O binary $< $@
$(OBJDIR)/bootloader.asm: $(OBJDIR)/bootloader.bin
$(TOOLSDIR)/sh2d -sh1 $< > $@
$(BUILDDIR)/$(BINARY) : $(OBJDIR)/bootloader.bin
@echo "Build bootloader file"
$(SILENT)$(MKFIRMWARE) $< $@
$(call PRINTS,Build bootloader file)$(MKFIRMWARE) $< $@
include $(TOOLSDIR)/make.inc
clean:
@echo "cleaning bootloader"
@-rm -f $(OBJS) $(BUILDDIR)/$(BINARY) $(OBJDIR)/bootloader.asm \
$(call PRINTS,cleaning bootloader)-rm -f $(OBJS) $(BUILDDIR)/$(BINARY) $(OBJDIR)/bootloader.asm \
$(OBJDIR)/bootloader.bin $(OBJDIR)/bootloader.elf $(OBJDIR)/*.map \
$(LINKFILE) $(MAXOUTFILE) $(DEPFILE)

View file

@ -42,39 +42,33 @@ all: $(BUILDDIR)/$(BINARY) $(FLASHFILE)
dep: $(DEPFILE)
$(LINKFILE): $(LDS)
@echo "Build LDS file"
@cat $< | $(CC) -DMEMORYSIZE=$(MEMORYSIZE) $(INCLUDES) $(TARGET) $(DEFINES) -E -P $(ROMBUILD) - >$@
$(call PRINTS,Build $(@F))cat $< | $(CC) -DMEMORYSIZE=$(MEMORYSIZE) $(INCLUDES) $(TARGET) $(DEFINES) -E -P $(ROMBUILD) - >$@
$(MAXOUTFILE):
@echo '#include "config.h"' > $(MAXINFILE)
@echo "ROM_START" >> $(MAXINFILE)
@cat $(MAXINFILE) | $(CC) -DMEMORYSIZE=$(MEMORYSIZE) $(INCLUDES) $(TARGET) $(DEFINES) -E -P $(ROMBUILD) - > $(MAXOUTFILE)
@rm $(MAXINFILE)
$(SILENT)echo '#include "config.h"' > $(MAXINFILE)
$(SILENT)echo "ROM_START" >> $(MAXINFILE)
$(SILENT)cat $(MAXINFILE) | $(CC) -DMEMORYSIZE=$(MEMORYSIZE) $(INCLUDES) $(TARGET) $(DEFINES) -E -P $(ROMBUILD) - > $(MAXOUTFILE)
$(SILENT)rm $(MAXINFILE)
$(OBJDIR)/bootbox.elf : $(OBJS) $(LINKFILE) $(DEPFILE) $(LIBROCKBOX)
@echo "LD bootbox.elf"
$(CC) $(GCCOPTS) -Wl,--gc-sections -Os -nostdlib -o $@ $(OBJS) -L$(BUILDDIR) -L$(BUILDDIR)/firmware -lrockbox -lgcc -T$(LINKFILE) -Wl,-Map,$(OBJDIR)/bootbox.map
$(call PRINTS,LD $(@F))$(CC) $(GCCOPTS) -Wl,--gc-sections -Os -nostdlib -o $@ $(OBJS) -L$(BUILDDIR) -L$(BUILDDIR)/firmware -lrockbox -lgcc -T$(LINKFILE) -Wl,-Map,$(OBJDIR)/bootbox.map
$(OBJDIR)/bootbox.bin : $(OBJDIR)/bootbox.elf
@echo "OBJCOPY $<"
@$(OC) -O binary $< $@
$(call PRINTS,OBJCOPY $(@F))$(OC) -O binary $< $@
$(OBJDIR)/bootbox.asm: $(OBJDIR)/bootbox.bin
$(TOOLSDIR)/sh2d -sh1 $< > $@
$(BUILDDIR)/$(BINARY) : $(OBJDIR)/bootbox.bin
@echo "Build bootbox file"
@$(MKFIRMWARE) $< $@
$(call PRINTS,Build bootbox file)$(MKFIRMWARE) $< $@
$(FLASHFILE): $(OBJDIR)/bootbox.bin
$(SILENT)(echo "UCLPACK bootbox" ; \
$(TOOLSDIR)/uclpack --best --2e $< $@ >/dev/null 2>&1;)
$(call PRINTS,UCLPACK bootbox)$(TOOLSDIR)/uclpack --best --2e $< $@ >/dev/null 2>&1;
include $(TOOLSDIR)/make.inc
clean:
@echo "cleaning bootbox"
@-rm -f $(OBJS) $(BUILDDIR)/$(BINARY) $(OBJDIR)/bootbox.asm $(OBJDIR)/rockbox.ucl \
$(call PRINTS,cleaning bootbox)-rm -f $(OBJS) $(BUILDDIR)/$(BINARY) $(OBJDIR)/bootbox.asm $(OBJDIR)/rockbox.ucl \
$(OBJDIR)/bootbox.bin $(OBJDIR)/bootbox.elf $(OBJDIR)/*.map \
$(LINKFILE) $(MAXOUTFILE) $(DEPFILE) $(FLASHFILE)

View file

@ -41,26 +41,21 @@ all: $(BUILDDIR)/$(BINARY) $(FLASHFILE)
dep: $(DEPFILE)
$(LINKFILE): $(LDS)
@echo "Build LDS file"
@cat $< | $(CC) -DMEMORYSIZE=$(MEMORYSIZE) $(INCLUDES) $(TARGET) $(DEFINES) -E -P $(ROMBUILD) - >$@
$(call PRINTS,Build $(@F))cat $< | $(CC) -DMEMORYSIZE=$(MEMORYSIZE) $(INCLUDES) $(TARGET) $(DEFINES) -E -P $(ROMBUILD) - >$@
$(OBJDIR)/stub.elf : $(OBJS) $(LINKFILE) $(DEPFILE) $(LIBROCKBOX)
@echo "LD stub.elf"
@$(CC) $(GCCOPTS) -Os -nostdlib -o $@ $(OBJS) -L$(BUILDDIR) -L$(BUILDDIR)/firmware -lrockbox -lgcc -T$(LINKFILE) -Wl,-Map,$(OBJDIR)/stub.map
$(call PRINTS,LD $(@F))$(CC) $(GCCOPTS) -Os -nostdlib -o $@ $(OBJS) -L$(BUILDDIR) -L$(BUILDDIR)/firmware -lrockbox -lgcc -T$(LINKFILE) -Wl,-Map,$(OBJDIR)/stub.map
$(OBJDIR)/stub.bin : $(OBJDIR)/stub.elf
@echo "OBJCOPY $<"
@$(OC) -O binary $< $@
$(call PRINTS,OBJCOPY $(@F))$(OC) -O binary $< $@
$(BUILDDIR)/$(BINARY) : $(OBJDIR)/stub.bin
@echo "Build stub file"
$(MKFIRMWARE) $< $@
$(call PRINTS,Build stub file)$(MKFIRMWARE) $< $@
include $(TOOLSDIR)/make.inc
clean:
@echo "cleaning stub"
@-rm -f $(OBJS) $(BUILDDIR)/$(BINARY) \
$(call PRINTS,cleaning stub)-rm -f $(OBJS) $(BUILDDIR)/$(BINARY) \
$(OBJDIR)/stub.bin $(OBJDIR)/stub.elf $(OBJDIR)/*.map \
$(LINKFILE) $(DEPFILE)