]> git.ipfire.org Git - thirdparty/u-boot.git/blame - config.mk
usb: dwc3: add dis_u2_freeclk_exists_quirk
[thirdparty/u-boot.git] / config.mk
CommitLineData
83d290c5 1# SPDX-License-Identifier: GPL-2.0+
e2211743 2#
eca3aeb3 3# (C) Copyright 2000-2013
e2211743 4# Wolfgang Denk, DENX Software Engineering, wd@denx.de.
e2211743
WD
5#########################################################################
6
026f9cf2
MY
7# This file is included from ./Makefile and spl/Makefile.
8# Clean the state to avoid the same flags added twice.
9#
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...)
13PLATFORM_RELFLAGS :=
14PLATFORM_CPPFLAGS :=
587e4a42 15KBUILD_LDFLAGS :=
026f9cf2 16LDFLAGS_FINAL :=
1d3b97c9 17LDFLAGS_STANDALONE :=
026f9cf2 18OBJCOPYFLAGS :=
5b3ee386
MY
19# clear VENDOR for tcsh
20VENDOR :=
c4e5f52a
WD
21#########################################################################
22
51148790
MY
23ARCH := $(CONFIG_SYS_ARCH:"%"=%)
24CPU := $(CONFIG_SYS_CPU:"%"=%)
e02ee254 25ifdef CONFIG_SPL_BUILD
18138ab2 26ifdef CONFIG_ARCH_TEGRA
e02ee254
MY
27CPU := arm720t
28endif
29endif
51148790
MY
30BOARD := $(CONFIG_SYS_BOARD:"%"=%)
31ifneq ($(CONFIG_SYS_VENDOR),)
32VENDOR := $(CONFIG_SYS_VENDOR:"%"=%)
33endif
34ifneq ($(CONFIG_SYS_SOC),)
35SOC := $(CONFIG_SYS_SOC:"%"=%)
36endif
37
03b7004d
PT
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.
8d1f2682
PT
40# Check if arch/$ARCH/cpu/$CPU exists, otherwise assume arch/$ARCH/cpu contains
41# CPU-specific code.
a8b0f9b6 42CPUDIR=arch/$(ARCH)/cpu$(if $(CPU),/$(CPU),)
03b7004d 43
4379ac61
MY
44sinclude $(srctree)/arch/$(ARCH)/config.mk # include architecture dependend rules
45sinclude $(srctree)/$(CPUDIR)/config.mk # include CPU specific rules
03b7004d 46
c4e5f52a 47ifdef SOC
4379ac61 48sinclude $(srctree)/$(CPUDIR)/$(SOC)/config.mk # include SoC specific rules
c4e5f52a 49endif
33a02da0 50ifneq ($(BOARD),)
c4e5f52a
WD
51ifdef VENDOR
52BOARDDIR = $(VENDOR)/$(BOARD)
53else
54BOARDDIR = $(BOARD)
55endif
33a02da0 56endif
c4e5f52a 57ifdef BOARD
4379ac61 58sinclude $(srctree)/board/$(BOARDDIR)/config.mk # include board specific rules
c4e5f52a
WD
59endif
60
b8450521
SG
61ifdef FTRACE
62PLATFORM_CPPFLAGS += -finstrument-functions -DFTRACE
63endif
64
c4e5f52a
WD
65#########################################################################
66
026f9cf2 67RELFLAGS := $(PLATFORM_RELFLAGS)
83b7e2a7 68
026f9cf2
MY
69PLATFORM_CPPFLAGS += $(RELFLAGS)
70PLATFORM_CPPFLAGS += -pipe
4a30f1e8 71
6dc1eceb 72LDFLAGS_FINAL += -Bstatic
026f9cf2
MY
73
74export PLATFORM_CPPFLAGS
75export RELFLAGS
76export LDFLAGS_FINAL
1d3b97c9 77export LDFLAGS_STANDALONE
026f9cf2 78export CONFIG_STANDALONE_LOAD_ADDR