xref: /openbmc/u-boot/env/Makefile (revision 48263504)
1#
2# (C) Copyright 2004-2006
3# Wolfgang Denk, DENX Software Engineering, wd@denx.de.
4#
5# SPDX-License-Identifier:	GPL-2.0+
6#
7
8obj-y += common.o env.o
9
10ifndef CONFIG_SPL_BUILD
11obj-y += attr.o
12obj-y += callback.o
13obj-y += flags.o
14obj-$(CONFIG_ENV_IS_IN_EEPROM) += eeprom.o
15extra-$(CONFIG_ENV_IS_EMBEDDED) += embedded.o
16obj-$(CONFIG_ENV_IS_IN_EEPROM) += embedded.o
17extra-$(CONFIG_ENV_IS_IN_FLASH) += embedded.o
18obj-$(CONFIG_ENV_IS_IN_NVRAM) += embedded.o
19obj-$(CONFIG_ENV_IS_IN_FLASH) += flash.o
20obj-$(CONFIG_ENV_IS_IN_MMC) += mmc.o
21obj-$(CONFIG_ENV_IS_IN_FAT) += fat.o
22obj-$(CONFIG_ENV_IS_IN_EXT4) += ext4.o
23obj-$(CONFIG_ENV_IS_IN_NAND) += nand.o
24obj-$(CONFIG_ENV_IS_IN_NVRAM) += nvram.o
25obj-$(CONFIG_ENV_IS_IN_ONENAND) += onenand.o
26obj-$(CONFIG_ENV_IS_IN_SATA) += sata.o
27obj-$(CONFIG_ENV_IS_IN_SPI_FLASH) += sf.o
28obj-$(CONFIG_ENV_IS_IN_REMOTE) += remote.o
29obj-$(CONFIG_ENV_IS_IN_UBI) += ubi.o
30obj-$(CONFIG_ENV_IS_NOWHERE) += nowhere.o
31endif
32
33ifdef CONFIG_SPL_BUILD
34obj-$(CONFIG_ENV_IS_IN_FLASH) += flash.o
35# environment
36ifdef CONFIG_TPL_BUILD
37obj-$(CONFIG_TPL_ENV_SUPPORT) += attr.o
38obj-$(CONFIG_TPL_ENV_SUPPORT) += flags.o
39obj-$(CONFIG_TPL_ENV_SUPPORT) += callback.o
40else
41obj-$(CONFIG_SPL_ENV_SUPPORT) += attr.o
42obj-$(CONFIG_SPL_ENV_SUPPORT) += flags.o
43obj-$(CONFIG_SPL_ENV_SUPPORT) += callback.o
44endif
45ifneq ($(CONFIG_TPL_ENV_SUPPORT)$(CONFIG_SPL_ENV_SUPPORT),)
46obj-$(CONFIG_ENV_IS_NOWHERE) += nowhere.o
47obj-$(CONFIG_ENV_IS_IN_MMC) += mmc.o
48obj-$(CONFIG_ENV_IS_IN_FAT) += fat.o
49obj-$(CONFIG_ENV_IS_IN_EXT4) += ext4.o
50obj-$(CONFIG_ENV_IS_IN_NAND) += nand.o
51obj-$(CONFIG_ENV_IS_IN_SPI_FLASH) += sf.o
52obj-$(CONFIG_ENV_IS_IN_FLASH) += flash.o
53endif
54endif
55
56CFLAGS_embedded.o := -Wa,--no-warn -DENV_CRC=$(shell tools/envcrc 2>/dev/null)
57