]> git.ipfire.org Git - people/ms/u-boot.git/blame - config.mk
include: define CONFIG_SPL and CONFIG_TPL as 1
[people/ms/u-boot.git] / config.mk
CommitLineData
e2211743 1#
eca3aeb3 2# (C) Copyright 2000-2013
e2211743
WD
3# Wolfgang Denk, DENX Software Engineering, wd@denx.de.
4#
eca3aeb3 5# SPDX-License-Identifier: GPL-2.0+
e2211743 6#
e2211743
WD
7#########################################################################
8
026f9cf2
MY
9# This file is included from ./Makefile and spl/Makefile.
10# Clean the state to avoid the same flags added twice.
11#
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...)
15PLATFORM_RELFLAGS :=
16PLATFORM_CPPFLAGS :=
17PLATFORM_LDFLAGS :=
18LDFLAGS :=
19LDFLAGS_FINAL :=
20OBJCOPYFLAGS :=
c4e5f52a
WD
21#########################################################################
22
03b7004d
PT
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.
8d1f2682
PT
25# Check if arch/$ARCH/cpu/$CPU exists, otherwise assume arch/$ARCH/cpu contains
26# CPU-specific code.
a8b0f9b6 27CPUDIR=arch/$(ARCH)/cpu$(if $(CPU),/$(CPU),)
03b7004d 28
4379ac61
MY
29sinclude $(srctree)/arch/$(ARCH)/config.mk # include architecture dependend rules
30sinclude $(srctree)/$(CPUDIR)/config.mk # include CPU specific rules
03b7004d 31
c4e5f52a 32ifdef SOC
4379ac61 33sinclude $(srctree)/$(CPUDIR)/$(SOC)/config.mk # include SoC specific rules
c4e5f52a 34endif
33a02da0 35ifneq ($(BOARD),)
c4e5f52a
WD
36ifdef VENDOR
37BOARDDIR = $(VENDOR)/$(BOARD)
38else
39BOARDDIR = $(BOARD)
40endif
33a02da0 41endif
c4e5f52a 42ifdef BOARD
4379ac61 43sinclude $(srctree)/board/$(BOARDDIR)/config.mk # include board specific rules
c4e5f52a
WD
44endif
45
46#########################################################################
47
026f9cf2 48RELFLAGS := $(PLATFORM_RELFLAGS)
83b7e2a7 49
95ddcd68 50OBJCOPYFLAGS += --gap-fill=0xff
e2211743 51
026f9cf2
MY
52PLATFORM_CPPFLAGS += $(RELFLAGS)
53PLATFORM_CPPFLAGS += -pipe
4a30f1e8 54
8aba9dce 55LDFLAGS += $(PLATFORM_LDFLAGS)
6dc1eceb 56LDFLAGS_FINAL += -Bstatic
026f9cf2
MY
57
58export PLATFORM_CPPFLAGS
59export RELFLAGS
60export LDFLAGS_FINAL
61export CONFIG_STANDALONE_LOAD_ADDR