Our last sync with the kernel was 5.1. We are so out of sync now, that tracking the patches and backporting them one by one makes little sense and it's going to take ages. This is an attempt to sync up Makefiles to 6.1. Unfortunately due to sheer amount of patches this is not easy to review, but that's what we decided during a community call for the bump to 5.1, so we are following the same guidelines here. Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org> Signed-off-by: Ilias Apalodimas <ilias.apalodimas@linaro.org>a #rebased on -next
48 lines
1.3 KiB
Plaintext
48 lines
1.3 KiB
Plaintext
# SPDX-License-Identifier: GPL-2.0
|
|
####
|
|
# kbuild.uboot: U-Boot specific kbuild definitions
|
|
|
|
include $(srctree)/scripts/Kbuild.include
|
|
|
|
# Prefix -I with $(srctree) if it is not an absolute path.
|
|
# skip if -I has no parameter
|
|
addtree = $(if $(patsubst -I%,%,$(1)), \
|
|
$(if $(filter-out -I/% -I./% -I../%,$(1)),$(patsubst -I%,-I$(srctree)/%,$(1)),$(1)),$(1))
|
|
|
|
# Find all -I options and call addtree
|
|
flags = $(foreach o,$($(1)),$(if $(filter -I%,$(o)),$(call addtree,$(o)),$(o)))
|
|
|
|
# Add $(obj)/ for paths that are not absolute
|
|
objectify = $(foreach o,$(1),$(if $(filter /%,$(o)),$(o),$(obj)/$(o)))
|
|
|
|
# echo command.
|
|
# Short version is used, if $(quiet) equals `quiet_', otherwise full one.
|
|
echo-cmd = $(if $($(quiet)cmd_$(1)),\
|
|
echo ' $(call escsq,$($(quiet)cmd_$(1)))$(why)';)
|
|
|
|
# added for U-Boot
|
|
|
|
# cc-name
|
|
# Expands to either gcc or clang
|
|
cc-name = $(shell $(CC) -v 2>&1 | grep -q "clang version" && echo clang || echo gcc)
|
|
|
|
# cc-version
|
|
cc-version = $(shell $(CONFIG_SHELL) $(srctree)/scripts/gcc-version.sh $(CC))
|
|
|
|
binutils-version = $(shell $(CONFIG_SHELL) $(srctree)/scripts/binutils-version.sh $(AS))
|
|
dtc-version = $(shell $(CONFIG_SHELL) $(srctree)/scripts/dtc-version.sh $(DTC))
|
|
|
|
ifeq ($(CONFIG_SPL_BUILD),y)
|
|
PHASE_ := SPL_
|
|
else
|
|
ifeq ($(CONFIG_VPL_BUILD),y)
|
|
PHASE_ := VPL_
|
|
else
|
|
ifeq ($(CONFIG_TPL_BUILD),y)
|
|
PHASE_ := TPL_
|
|
else
|
|
PHASE_ :=
|
|
endif
|
|
endif
|
|
endif
|