env_onenand: Move conditional compilation to Makefile

Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
diff --git a/common/Makefile b/common/Makefile
index cb3a742..a9d66ae 100644
--- a/common/Makefile
+++ b/common/Makefile
@@ -55,7 +55,7 @@
 COBJS-y += env_flash.o
 COBJS-$(CONFIG_ENV_IS_IN_NAND) += env_nand.o
 COBJS-$(CONFIG_ENV_IS_IN_NVRAM) += env_nvram.o
-COBJS-y += env_onenand.o
+COBJS-$(CONFIG_ENV_IS_IN_ONENAND) += env_onenand.o
 COBJS-y += env_sf.o
 COBJS-y += env_nowhere.o