]> git.ipfire.org Git - people/ms/u-boot.git/blobdiff - arch/powerpc/cpu/mpc8xxx/Makefile
Switch from archive libraries to partial linking
[people/ms/u-boot.git] / arch / powerpc / cpu / mpc8xxx / Makefile
index 481f9e541dcfbcf1b9dd37cd71909e9dc09ab84f..ab80dd77230b56e685229888f0905f24ae31cd1e 100644 (file)
@@ -1,5 +1,5 @@
 #
-# Copyright 2009 Freescale Semiconductor, Inc.
+# Copyright 2009-2010 Freescale Semiconductor, Inc.
 #
 # This program is free software; you can redistribute it and/or
 # modify it under the terms of the GNU General Public License
@@ -8,11 +8,15 @@
 
 include $(TOPDIR)/config.mk
 
-LIB    = $(obj)lib8xxx.a
+LIB    = $(obj)lib8xxx.o
 
+ifneq ($(CPU),mpc83xx)
 COBJS-y        += cpu.o
-COBJS-$(CONFIG_OF_LIBFDT) += fdt.o
 COBJS-$(CONFIG_PCI)    += pci_cfg.o
+endif
+
+COBJS-$(CONFIG_OF_LIBFDT) += fdt.o
+COBJS-$(CONFIG_FSL_LBC) += fsl_lbc.o
 
 SRCS   := $(START:.o=.S) $(SOBJS-y:.o=.S) $(COBJS-y:.o=.c)
 OBJS   := $(addprefix $(obj),$(SOBJS-y) $(COBJS-y))
@@ -20,7 +24,7 @@ OBJS  := $(addprefix $(obj),$(SOBJS-y) $(COBJS-y))
 all:   $(obj).depend $(LIB)
 
 $(LIB):        $(OBJS)
-       $(AR) $(ARFLAGS) $@ $(OBJS)
+       $(call cmd_link_o_target, $(OBJS))
 
 include $(SRCTREE)/rules.mk