xref: /optee_os/core/sub.mk (revision d0c636148b3a9392de97309546304bf9abb1d933)
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
13*d0c63614SJerome Forissier
14*d0c63614SJerome Forissierifeq ($(CFG_WITH_USER_TA)-$(CFG_EARLY_TA),y-y)
15*d0c63614SJerome Forissierdefine process_early_ta
16*d0c63614SJerome Forissierearly-ta-$1-uuid := $(firstword $(subst ., ,$(notdir $1)))
17*d0c63614SJerome Forissiergensrcs-y += early-ta-$1
18*d0c63614SJerome Forissierproduce-early-ta-$1 = early_ta_$$(early-ta-$1-uuid).c
19*d0c63614SJerome Forissierdepends-early-ta-$1 = $1 scripts/ta_bin_to_c.py
20*d0c63614SJerome Forissierrecipe-early-ta-$1 = scripts/ta_bin_to_c.py --ta $1 \
21*d0c63614SJerome Forissier		--out $(sub-dir-out)/early_ta_$$(early-ta-$1-uuid).c
22*d0c63614SJerome Forissiercleanfiles += $(sub-dir-out)/early_ta_$$(early-ta-$1-uuid).c
23*d0c63614SJerome Forissierendef
24*d0c63614SJerome Forissier$(foreach f, $(EARLY_TA_PATHS), $(eval $(call process_early_ta,$(f))))
25*d0c63614SJerome Forissierendif
26