]> git.ipfire.org Git - people/ms/u-boot.git/blobdiff - drivers/mtd/nand/Makefile
drivers/mtd/nand: Move conditional compilation to Makefile
[people/ms/u-boot.git] / drivers / mtd / nand / Makefile
index ffb3169594513f7620f90cea3aea6c0d8d69a0c4..19233105a20653e55aa55911cc351679a29a66d9 100644 (file)
@@ -25,15 +25,19 @@ include $(TOPDIR)/config.mk
 
 LIB    := $(obj)libnand.a
 
+ifdef CONFIG_CMD_NAND
+ifndef CONFIG_NAND_LEGACY
 COBJS-y += nand.o
 COBJS-y += nand_base.o
-COBJS-y += nand_ids.o
-COBJS-y += nand_ecc.o
 COBJS-y += nand_bbt.o
+COBJS-y += nand_ecc.o
+COBJS-y += nand_ids.o
 COBJS-y += nand_util.o
+endif
 
 COBJS-$(CONFIG_NAND_FSL_ELBC) += fsl_elbc_nand.o
-COBJS-y += fsl_upm.o
+COBJS-$(CONFIG_NAND_FSL_UPM) += fsl_upm.o
+endif
 
 COBJS  := $(COBJS-y)
 SRCS   := $(COBJS:.o=.c)