xref: /optee_os/core/sub.mk (revision 509a9802af4f69315d85baa0979a1d705ca5460e)
1b0104773SPascal Brandsubdirs-y += kernel
2b0104773SPascal Brandsubdirs-y += tee
3b0104773SPascal Brandsubdirs-y += drivers
4fca1e9e4SJens Wiklander
5ee664c19SJerome Forissierifeq ($(CFG_WITH_USER_TA)-$(CFG_REE_FS_TA),y-y)
6fca1e9e4SJens Wiklandergensrcs-y += ta_pub_key
7fca1e9e4SJens Wiklanderproduce-ta_pub_key = ta_pub_key.c
8f147124eSJerome Forissierdepends-ta_pub_key = $(TA_SIGN_KEY) scripts/pem_to_pub_c.py
9fca1e9e4SJens Wiklanderrecipe-ta_pub_key = scripts/pem_to_pub_c.py --prefix ta_pub_key \
10fca1e9e4SJens Wiklander		--key $(TA_SIGN_KEY) --out $(sub-dir-out)/ta_pub_key.c
119ac870c9SJerome Forissiercleanfiles += $(sub-dir-out)/ta_pub_key.c
12ee664c19SJerome Forissierendif
13d0c63614SJerome Forissier
14d0c63614SJerome Forissierifeq ($(CFG_WITH_USER_TA)-$(CFG_EARLY_TA),y-y)
15d0c63614SJerome Forissierdefine process_early_ta
16d0c63614SJerome Forissierearly-ta-$1-uuid := $(firstword $(subst ., ,$(notdir $1)))
17d0c63614SJerome Forissiergensrcs-y += early-ta-$1
18d0c63614SJerome Forissierproduce-early-ta-$1 = early_ta_$$(early-ta-$1-uuid).c
19d0c63614SJerome Forissierdepends-early-ta-$1 = $1 scripts/ta_bin_to_c.py
20*509a9802SJerome Forissierrecipe-early-ta-$1 = scripts/ta_bin_to_c.py --compress --ta $1 \
21d0c63614SJerome Forissier		--out $(sub-dir-out)/early_ta_$$(early-ta-$1-uuid).c
22d0c63614SJerome Forissiercleanfiles += $(sub-dir-out)/early_ta_$$(early-ta-$1-uuid).c
23d0c63614SJerome Forissierendef
24d0c63614SJerome Forissier$(foreach f, $(EARLY_TA_PATHS), $(eval $(call process_early_ta,$(f))))
25d0c63614SJerome Forissierendif
26