env_nand: Move conditional compilation to Makefile
Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
diff --git a/common/Makefile b/common/Makefile
index 27f515b..2e0fa26 100644
--- a/common/Makefile
+++ b/common/Makefile
@@ -53,7 +53,7 @@
COBJS-$(CONFIG_ENV_IS_IN_DATAFLASH) += env_dataflash.o
COBJS-$(CONFIG_ENV_IS_IN_EEPROM) += env_eeprom.o
COBJS-y += env_flash.o
-COBJS-y += env_nand.o
+COBJS-$(CONFIG_ENV_IS_IN_NAND) += env_nand.o
COBJS-y += env_nvram.o
COBJS-y += env_onenand.o
COBJS-y += env_sf.o