summaryrefslogtreecommitdiff
path: root/drivers/mtd/Makefile
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/mtd/Makefile')
-rw-r--r--drivers/mtd/Makefile4
1 files changed, 3 insertions, 1 deletions
diff --git a/drivers/mtd/Makefile b/drivers/mtd/Makefile
index 543c845ff0..99f39fc752 100644
--- a/drivers/mtd/Makefile
+++ b/drivers/mtd/Makefile
@@ -25,7 +25,9 @@ include $(TOPDIR)/config.mk
LIB := $(obj)libmtd.o
-COBJS-$(CONFIG_MTD_DEVICE) += mtdcore.o
+ifneq (,$(findstring y,$(CONFIG_MTD_DEVICE)$(CONFIG_CMD_NAND)$(CONFIG_CMD_ONENAND)))
+COBJS-y += mtdcore.o
+endif
COBJS-$(CONFIG_MTD_PARTITIONS) += mtdpart.o
COBJS-$(CONFIG_MTD_CONCAT) += mtdconcat.o
COBJS-$(CONFIG_HAS_DATAFLASH) += at45.o