]> git.karo-electronics.de Git - karo-tx-uboot.git/blobdiff - arch/powerpc/lib/Makefile
Switch from archive libraries to partial linking
[karo-tx-uboot.git] / arch / powerpc / lib / Makefile
index 2065b6d807fc782c10a37c6d5762ef8b3544ca2c..724d8ee7f74d05b098c882e7312c708d12b5c1a6 100644 (file)
 
 include $(TOPDIR)/config.mk
 
-LIB    = $(obj)lib$(ARCH).a
+LIB    = $(obj)lib$(ARCH).o
 
 SOBJS-y        += ppccache.o
 SOBJS-y        += ppcstring.o
 SOBJS-y        += ticks.o
 SOBJS-y        += reloc.o
 
-COBJS-y        += bat_rw.o
+COBJS-$(CONFIG_BAT_RW) += bat_rw.o
 COBJS-y        += board.o
 COBJS-y        += bootm.o
 COBJS-$(CONFIG_BOOTCOUNT_LIMIT) += bootcount.o
@@ -63,7 +63,7 @@ $(LIB):       $(obj).depend $(OBJS)
                echo "       Upgrade to a recent toolchain."; \
                exit 1; \
        fi;
-       $(AR) $(ARFLAGS) $@ $(OBJS)
+       $(call cmd_link_o_target, $(OBJS))
 
 #########################################################################