summaryrefslogtreecommitdiff
path: root/examples
diff options
context:
space:
mode:
authorMasahiro Yamada <yamada.m@jp.panasonic.com>2014-02-24 11:12:14 +0900
committerTom Rini <trini@ti.com>2014-02-25 11:01:29 -0500
commitf9c235fd9950ca1b150f8d40d358e1a58cbb0ea8 (patch)
tree5f1625ddbcaeb45a104b8dfbb3f9f0ec341d14c2 /examples
parent03c7b3fc0ba9636d3de8db0997f60e96c7494bfc (diff)
kbuild: use shorten logs objcopy rules
Signed-off-by: Masahiro Yamada <yamada.m@jp.panasonic.com>
Diffstat (limited to 'examples')
-rw-r--r--examples/api/Makefile6
-rw-r--r--examples/standalone/Makefile10
2 files changed, 10 insertions, 6 deletions
diff --git a/examples/api/Makefile b/examples/api/Makefile
index 09475f87e4..6c19830d2c 100644
--- a/examples/api/Makefile
+++ b/examples/api/Makefile
@@ -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
diff --git a/examples/standalone/Makefile b/examples/standalone/Makefile
index 47c9d54f5f..5f61043e52 100644
--- a/examples/standalone/Makefile
+++ b/examples/standalone/Makefile
@@ -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)