kbuild: use shorten logs objcopy rules
Signed-off-by: Masahiro Yamada <yamada.m@jp.panasonic.com>
diff --git a/examples/api/Makefile b/examples/api/Makefile
index 09475f8..6c19830 100644
--- a/examples/api/Makefile
+++ b/examples/api/Makefile
@@ -40,8 +40,10 @@
$(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