xref: /aosp_15_r20/external/coreboot/payloads/external/tint/Makefile (revision b9411a12aaaa7e1e6a6fb7c5e057f44ee179a49c)
1#
2# TINT build system - helps to securely download TINT with a checksum verification and build it.
3#
4
5#
6# Properties of the current TINT version
7#
8
9TINT_VERSION=0.07
10TINT_BASE_URL="https://mirror.fsf.org/trisquel/pool/main/t/tint"
11TINT_ARCHIVE="tint_${TINT_VERSION}.tar.xz"
12TINT_DIR="tint-${TINT_VERSION}"
13TINT_SHA1SUM="a7ec9355b9ea9d47576757219e9b1f4e51ac93a7"
14
15#
16# Locations of the input/output scripts
17#
18
19buildgcc="./../../../util/crossgcc/buildgcc"
20corescript="./core.sh"
21tintified="./tint.sh"
22
23unexport KCONFIG_AUTOHEADER
24unexport KCONFIG_AUTOCONFIG
25unexport KCONFIG_DEPENDENCIES
26unexport KCONFIG_SPLITCONFIG
27unexport KCONFIG_TRISTATE
28unexport KCONFIG_NEGATIVES
29
30all: tint
31
32################################################################################
33#
34# Three stages of TINT build system:
35#
36# 1) generate_core.sh extracts the core part from buildgcc script,
37#     most importantly the checksum calculation/verification functions.
38#
39# 2) tintify_core.sh adds the TINT-specific footer/header to the core,
40#     such as the properties of current version including its checksum.
41#
42# 3) tint.sh - generated and "tintified" core script - builds a TINT.
43#
44################################################################################
45
46tint:
47	if [ ! -f ${tintified} ]; then \
48		chmod +x "./generate_core.sh" ; \
49		"./generate_core.sh" ${buildgcc} ${corescript} "prepare_before_patch" ; \
50		chmod +x "./tintify_core.sh" ; \
51		"./tintify_core.sh" ${corescript} ${tintified} \
52			${TINT_BASE_URL} ${TINT_ARCHIVE} ${TINT_DIR} ${TINT_SHA1SUM} ; \
53	fi ; \
54	chmod +x ${tintified}
55	${tintified}
56
57clean:
58	test -d "./tint/" && $(MAKE) -C "./tint/" clean || exit 0
59
60distclean:
61	rm -rf "./tint/"
62	rm -f ${corescript}
63	rm -f ${tintified}
64
65.PHONY: tint clean distclean
66
67#
68