cpu/ppc4xx/Makefile: build only needed object files
[platform/kernel/u-boot.git] / config.mk
index ce8e5f2..19e0a6e 100644 (file)
--- a/config.mk
+++ b/config.mk
@@ -259,3 +259,10 @@ $(obj)%.s: %.c
                -o $@ $< -c -S
 
 #########################################################################
+
+# If the list of objects to link is empty, just create an empty built-in.o
+cmd_link_o_target = $(if $(strip $1),\
+                      $(LD) -r -o $@ $1 ,\
+                      rm -f $@; $(AR) rcs $@ )
+
+#########################################################################