summaryrefslogtreecommitdiff
path: root/common/Makefile
diff options
context:
space:
mode:
authorSimon Glass <sjg@chromium.org>2016-09-12 23:18:25 -0600
committerTom Rini <trini@konsulko.com>2016-09-16 17:03:39 -0400
commit76f1f38816d8763b51e5f1d6ca099a88aa1fd077 (patch)
treee407c3bf5d6b690df6f5bec7b78d265103463063 /common/Makefile
parent218d0d5b9b29b71c9c4db62bc735a54755e8ee1b (diff)
Use separate options for TPL support
At present TPL uses the same options as SPL support. In a few cases the board config enables or disables the SPL options depending on whether CONFIG_TPL_BUILD is defined. With the move to Kconfig, options are determined for the whole build and (without a hack like an #undef in a header file) cannot be controlled in this way. Create new TPL options for these and update users. This will allow Kconfig conversion to proceed for these boards. Signed-off-by: Simon Glass <sjg@chromium.org>
Diffstat (limited to 'common/Makefile')
-rw-r--r--common/Makefile12
1 files changed, 11 insertions, 1 deletions
diff --git a/common/Makefile b/common/Makefile
index 21619b304d..9a9a065ad2 100644
--- a/common/Makefile
+++ b/common/Makefile
@@ -99,10 +99,16 @@ obj-$(CONFIG_SPL_USB_SUPPORT) += usb.o usb_hub.o
obj-$(CONFIG_USB_STORAGE) += usb_storage.o
endif
# environment
-ifdef CONFIG_SPL_ENV_SUPPORT
+ifdef CONFIG_TPL_BUILD
+obj-$(CONFIG_TPL_ENV_SUPPORT) += env_attr.o
+obj-$(CONFIG_TPL_ENV_SUPPORT) += env_flags.o
+obj-$(CONFIG_TPL_ENV_SUPPORT) += env_callback.o
+else
obj-$(CONFIG_SPL_ENV_SUPPORT) += env_attr.o
obj-$(CONFIG_SPL_ENV_SUPPORT) += env_flags.o
obj-$(CONFIG_SPL_ENV_SUPPORT) += env_callback.o
+endif
+ifneq ($(CONFIG_TPL_ENV_SUPPORT)$(CONFIG_SPL_ENV_SUPPORT),)
obj-$(CONFIG_ENV_IS_NOWHERE) += env_nowhere.o
obj-$(CONFIG_ENV_IS_IN_MMC) += env_mmc.o
obj-$(CONFIG_ENV_IS_IN_FAT) += env_fat.o
@@ -123,7 +129,11 @@ obj-$(CONFIG_SPD_EEPROM) += ddr_spd.o
obj-$(CONFIG_HWCONFIG) += hwconfig.o
obj-$(CONFIG_BOUNCE_BUFFER) += bouncebuf.o
ifdef CONFIG_SPL_BUILD
+ifdef CONFIG_TPL_BUILD
+obj-$(CONFIG_TPL_SERIAL_SUPPORT) += console.o
+else
obj-$(CONFIG_SPL_SERIAL_SUPPORT) += console.o
+endif
else
obj-y += console.o
endif