1 # SPDX-License-Identifier: GPL-2.0+
3 # (C) Copyright 2000-2013
4 # Wolfgang Denk, DENX Software Engineering, wd@denx.de.
5 #########################################################################
7 # This file is included from ./Makefile and spl/Makefile.
8 # Clean the state to avoid the same flags added twice.
10 # (Tegra needs different flags for SPL.
11 # That's the reason why this file must be included from spl/Makefile too.
12 # If we did not have Tegra SoCs, build system would be much simpler...)
19 # clear VENDOR for tcsh
21 #########################################################################
23 ARCH
:= $(CONFIG_SYS_ARCH
:"%"=%)
24 CPU
:= $(CONFIG_SYS_CPU
:"%"=%)
25 ifdef CONFIG_SPL_BUILD
30 BOARD
:= $(CONFIG_SYS_BOARD
:"%"=%)
31 ifneq ($(CONFIG_SYS_VENDOR
),)
32 VENDOR
:= $(CONFIG_SYS_VENDOR
:"%"=%)
34 ifneq ($(CONFIG_SYS_SOC
),)
35 SOC
:= $(CONFIG_SYS_SOC
:"%"=%)
38 # Some architecture config.mk files need to know what CPUDIR is set to,
39 # so calculate CPUDIR before including ARCH/SOC/CPU config.mk files.
40 # Check if arch/$ARCH/cpu/$CPU exists, otherwise assume arch/$ARCH/cpu contains
42 CPUDIR
=arch
/$(ARCH
)/cpu
$(if
$(CPU
),/$(CPU
),)
44 sinclude
$(srctree
)/arch
/$(ARCH
)/config.mk
# include architecture dependend rules
45 sinclude
$(srctree
)/$(CPUDIR
)/config.mk
# include CPU specific rules
48 sinclude
$(srctree
)/$(CPUDIR
)/$(SOC
)/config.mk
# include SoC specific rules
52 BOARDDIR
= $(VENDOR
)/$(BOARD
)
58 sinclude
$(srctree
)/board
/$(BOARDDIR
)/config.mk
# include board specific rules
62 PLATFORM_CPPFLAGS
+= -finstrument-functions
-DFTRACE
65 #########################################################################
67 RELFLAGS
:= $(PLATFORM_RELFLAGS
)
69 PLATFORM_CPPFLAGS
+= $(RELFLAGS
)
70 PLATFORM_CPPFLAGS
+= -pipe
72 LDFLAGS
+= $(PLATFORM_LDFLAGS
)
73 LDFLAGS_FINAL
+= -Bstatic
75 export PLATFORM_CPPFLAGS
78 export CONFIG_STANDALONE_LOAD_ADDR