38 lines
1.2 KiB
Makefile
38 lines
1.2 KiB
Makefile
|
|
# SPDX-License-Identifier: GPL-2.0+ OR BSD-3-Clause
|
||
|
|
#
|
||
|
|
# Copyright (c) 2020, ArtInChip Technology Co., Ltd
|
||
|
|
#
|
||
|
|
|
||
|
|
ifndef CONFIG_SPL_BUILD
|
||
|
|
INPUTS-y += u-boot.its
|
||
|
|
endif
|
||
|
|
|
||
|
|
AIC_UBOOT_ITS :=
|
||
|
|
ifeq ($(wildcard $(AIC_UBOOT_ITS)),)
|
||
|
|
AIC_UBOOT_ITS := $(srctree)/arch/$(ARCH)/dts/u-boot.its.dtsi
|
||
|
|
endif
|
||
|
|
ifeq ($(wildcard $(AIC_UBOOT_ITS)),)
|
||
|
|
$(AIC_UBOOT_ITS):
|
||
|
|
@echo "could not find u-boot.its.dtsi"
|
||
|
|
@exit 1
|
||
|
|
endif
|
||
|
|
|
||
|
|
# Pre-Process and generate AIC u-boot.its
|
||
|
|
aicdtc_cpp_flags = -Wp,-MD,$(depfile).pre.tmp -nostdinc \
|
||
|
|
-I$(srctree)/arch/$(ARCH)/dts \
|
||
|
|
-I$(srctree)/arch/$(ARCH)/dts/include \
|
||
|
|
-Iinclude \
|
||
|
|
-I$(srctree)/include \
|
||
|
|
-I$(srctree)/arch/$(ARCH)/include \
|
||
|
|
-include $(srctree)/include/linux/kconfig.h \
|
||
|
|
-D__ASSEMBLY__ \
|
||
|
|
-undef -D__DTS__
|
||
|
|
|
||
|
|
quiet_cmd_cpp_its = ITS $@
|
||
|
|
cmd_cpp_its = $(HOSTCC) -E $(aicdtc_cpp_flags) -x assembler-with-cpp -o $(depfile).tmp $< ; \
|
||
|
|
sed '/\# /d' $(depfile).tmp > $@
|
||
|
|
|
||
|
|
$(obj)/u-boot.its: $(AIC_UBOOT_ITS) FORCE
|
||
|
|
$(call if_changed,cpp_its)
|
||
|
|
|