1
0
mirror of https://xff.cz/git/u-boot/ synced 2025-09-01 16:52:14 +02:00

kbuild: use shorten logs objcopy rules

Signed-off-by: Masahiro Yamada <yamada.m@jp.panasonic.com>
This commit is contained in:
Masahiro Yamada
2014-02-24 11:12:14 +09:00
committed by Tom Rini
parent 03c7b3fc0b
commit f9c235fd99
4 changed files with 56 additions and 20 deletions

View File

@@ -40,8 +40,10 @@ OBJS += $(addprefix $(obj)/,$(notdir $(EXT_SOBJ_FILES-y)))
$(obj)/demo: $(OBJS)
$(LD) --gc-sections -Ttext $(LOAD_ADDR) -o $@ $^ $(PLATFORM_LIBS)
$(obj)/demo.bin: $(obj)/demo
$(OBJCOPY) -O binary $< $@ 2>/dev/null
# demo.bin is never genrated. Is this necessary?
OBJCOPYFLAGS_demo.bin := -O binary
$(obj)/demo.bin: $(obj)/demo FORCE
$(call if_changed,objcopy)
# Rule to build generic library C files
$(addprefix $(obj)/,$(notdir $(EXT_COBJ_FILES-y))): $(obj)/%.o: $(SRCTREE)/lib/%.c FORCE

View File

@@ -72,8 +72,10 @@ $(obj)/%: $(obj)/%.o $(LIB)
-o $@ -e $(SYM_PREFIX)$(notdir $(<:.o=)) $< $(LIB) \
-L$(gcclibdir) -lgcc
$(obj)/%.srec: $(obj)/%
$(OBJCOPY) -O srec $< $@ 2>/dev/null
$(obj)/%.srec: OBJCOPYFLAGS := -O srec
$(obj)/%.srec: $(obj)/% FORCE
$(call if_changed,objcopy)
$(obj)/%.bin: $(obj)/%
$(OBJCOPY) -O binary $< $@ 2>/dev/null
$(obj)/%.bin: OBJCOPYFLAGS := -O binary
$(obj)/%.bin: $(obj)/% FORCE
$(call if_changed,objcopy)