From: Jean-Christophe PLAGNIOL-VILLARD Date: Wed, 10 Sep 2008 20:47:59 +0000 (+0200) Subject: env_nvram: Move conditional compilation to Makefile X-Git-Tag: v2008.10-rc2~9^2^2~16 X-Git-Url: https://git.librecmc.org/?a=commitdiff_plain;h=957a0e69575683efd70ace147746bbb3d8e7c501;p=oweals%2Fu-boot.git env_nvram: Move conditional compilation to Makefile Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD --- diff --git a/common/Makefile b/common/Makefile index 2e0fa262dc..cb3a7425f7 100644 --- a/common/Makefile +++ b/common/Makefile @@ -54,7 +54,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-$(CONFIG_ENV_IS_IN_NAND) += env_nand.o -COBJS-y += env_nvram.o +COBJS-$(CONFIG_ENV_IS_IN_NVRAM) += env_nvram.o COBJS-y += env_onenand.o COBJS-y += env_sf.o COBJS-y += env_nowhere.o diff --git a/common/env_nvram.c b/common/env_nvram.c index c877f00a66..c59bf9faa1 100644 --- a/common/env_nvram.c +++ b/common/env_nvram.c @@ -41,15 +41,12 @@ */ #include - -DECLARE_GLOBAL_DATA_PTR; - -#ifdef CONFIG_ENV_IS_IN_NVRAM /* Environment is in NVRAM */ - #include #include #include +DECLARE_GLOBAL_DATA_PTR; + #ifdef CFG_NVRAM_ACCESS_ROUTINE extern void *nvram_read(void *dest, const long src, size_t count); extern void nvram_write(long dest, const void *src, size_t count); @@ -156,5 +153,3 @@ int env_init (void) #endif return (0); } - -#endif /* CONFIG_ENV_IS_IN_NVRAM */