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