]> git.ipfire.org Git - people/ms/u-boot.git/blame - config.mk
kbuild: improve Kbuild speed
[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.
27CPUDIR=arch/$(ARCH)/cpu/$(CPU)
28ifneq ($(SRCTREE)/$(CPUDIR),$(wildcard $(SRCTREE)/$(CPUDIR)))
29CPUDIR=arch/$(ARCH)/cpu
30endif
03b7004d 31
ea0364f1 32sinclude $(TOPDIR)/arch/$(ARCH)/config.mk # include architecture dependend rules
03b7004d
PT
33sinclude $(TOPDIR)/$(CPUDIR)/config.mk # include CPU specific rules
34
c4e5f52a 35ifdef SOC
03b7004d 36sinclude $(TOPDIR)/$(CPUDIR)/$(SOC)/config.mk # include SoC specific rules
c4e5f52a 37endif
33a02da0 38ifneq ($(BOARD),)
c4e5f52a
WD
39ifdef VENDOR
40BOARDDIR = $(VENDOR)/$(BOARD)
41else
42BOARDDIR = $(BOARD)
43endif
33a02da0 44endif
c4e5f52a
WD
45ifdef BOARD
46sinclude $(TOPDIR)/board/$(BOARDDIR)/config.mk # include board specific rules
47endif
48
49#########################################################################
50
026f9cf2 51RELFLAGS := $(PLATFORM_RELFLAGS)
83b7e2a7 52
95ddcd68 53OBJCOPYFLAGS += --gap-fill=0xff
e2211743 54
026f9cf2
MY
55PLATFORM_CPPFLAGS += $(RELFLAGS)
56PLATFORM_CPPFLAGS += -pipe
4a30f1e8 57
8aba9dce 58LDFLAGS += $(PLATFORM_LDFLAGS)
6dc1eceb 59LDFLAGS_FINAL += -Bstatic
026f9cf2
MY
60
61export PLATFORM_CPPFLAGS
62export RELFLAGS
63export LDFLAGS_FINAL
64export CONFIG_STANDALONE_LOAD_ADDR