2 # (C) Copyright 2000-2013
3 # Wolfgang Denk, DENX Software Engineering, wd@denx.de.
5 # SPDX-License-Identifier: GPL-2.0+
7 #########################################################################
9 # This file is included from ./Makefile and spl/Makefile.
10 # Clean the state to avoid the same flags added twice.
12 # (Tegra needs different flags for SPL.
13 # That's the reason why this file must be included from spl/Makefile too.
14 # If we did not have Tegra SoCs, build system would be much simpler...)
21 #########################################################################
23 # Some architecture config.mk files need to know what CPUDIR is set to,
24 # so calculate CPUDIR before including ARCH/SOC/CPU config.mk files.
25 # Check if arch/$ARCH/cpu/$CPU exists, otherwise assume arch/$ARCH/cpu contains
27 CPUDIR=arch/$(ARCH)/cpu$(if $(CPU),/$(CPU),)
29 sinclude $(srctree)/arch/$(ARCH)/config.mk # include architecture dependend rules
30 sinclude $(srctree)/$(CPUDIR)/config.mk # include CPU specific rules
33 sinclude $(srctree)/$(CPUDIR)/$(SOC)/config.mk # include SoC specific rules
37 BOARDDIR = $(VENDOR)/$(BOARD)
43 sinclude $(srctree)/board/$(BOARDDIR)/config.mk # include board specific rules
46 #########################################################################
48 RELFLAGS := $(PLATFORM_RELFLAGS)
50 OBJCOPYFLAGS += --gap-fill=0xff
52 PLATFORM_CPPFLAGS += $(RELFLAGS)
53 PLATFORM_CPPFLAGS += -pipe
55 LDFLAGS += $(PLATFORM_LDFLAGS)
56 LDFLAGS_FINAL += -Bstatic
58 export PLATFORM_CPPFLAGS
61 export CONFIG_STANDALONE_LOAD_ADDR