]> git.karo-electronics.de Git - karo-tx-uboot.git/blobdiff - drivers/mtd/onenand/Makefile
Merge branch 'master' of git://git.denx.de/u-boot-nios
[karo-tx-uboot.git] / drivers / mtd / onenand / Makefile
index 2571df016385a440f6d20d442a0d969feabdc292..b090d40ea071c5ca7b7d6e4a5bfa522236e5c5f8 100644 (file)
 
 include $(TOPDIR)/config.mk
 
-LIB    := $(obj)libonenand.a
+LIB    := $(obj)libonenand.o
 
+ifndef CONFIG_SPL_BUILD
 COBJS-$(CONFIG_CMD_ONENAND)    := onenand_uboot.o onenand_base.o onenand_bbt.o
 COBJS-$(CONFIG_SAMSUNG_ONENAND)        += samsung.o
+else
+COBJS-y                                := onenand_spl.o
+endif
 
 COBJS  := $(COBJS-y)
 SRCS   := $(COBJS:.o=.c)
@@ -35,7 +39,7 @@ OBJS  := $(addprefix $(obj),$(COBJS))
 all:   $(LIB)
 
 $(LIB): $(obj).depend $(OBJS)
-       $(AR) $(ARFLAGS) $@ $(OBJS)
+       $(call cmd_link_o_target, $(OBJS))
 
 #########################################################################