env_sf: Move conditional compilation to Makefile
authorJean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
Wed, 10 Sep 2008 20:48:00 +0000 (22:48 +0200)
committerJean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
Wed, 10 Sep 2008 20:48:00 +0000 (22:48 +0200)
Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
common/Makefile
common/env_sf.c

index a9d66ae157c77afd1a0f613b069e84c0716c7048..e171ae0b4c586b0cd10128f95adb03ce1e9e1a3f 100644 (file)
@@ -56,7 +56,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-$(CONFIG_ENV_IS_IN_ONENAND) += env_onenand.o
-COBJS-y += env_sf.o
+COBJS-$(CONFIG_ENV_IS_IN_SPI_FLASH) += env_sf.o
 COBJS-y += env_nowhere.o
 
 # command
index a4427764f2d3cdc3ce50817e83c35cb87d6a02e0..faf62608b4d28a54e49bbde566bba234b249a67d 100644 (file)
@@ -26,9 +26,6 @@
  * MA 02111-1307 USA
  */
 #include <common.h>
-
-#ifdef CONFIG_ENV_IS_IN_SPI_FLASH
-
 #include <environment.h>
 #include <spi_flash.h>
 
@@ -135,5 +132,3 @@ int env_init(void)
 
        return 0;
 }
-
-#endif /* CONFIG_ENV_IS_IN_SPI_FLASH */