1global-incdirs-y += include 2srcs-y += aes_impl.c 3srcs-y += aes_taf.c 4srcs-y += cryp_taf.c 5srcs-y += derive_key_taf.c 6srcs-y += sha2_impl.c 7srcs-y += sha2_taf.c 8srcs-$(CFG_SYSTEM_PTA) += seed_rng_taf.c 9srcs-y += ta_entry.c 10srcs-$(CFG_TA_MBEDTLS) += mbedtls_taf.c 11srcs-y += arith_taf.c 12srcs-y += handle.c 13 14CRYPT_FILE_TO_C_SCRIPT = ../../scripts/file_to_c.py 15CRYPT_CA_CRT = ../../certs/ca.crt 16CRYPT_MID_CRT = ../../certs/mid.crt 17CRYPT_MID_KEY = ../../certs/mid.key 18 19define crypt_embed_file 20# 1 prefix/name 21# 2 infile 22gensrcs-y += embed-file-$(1) 23produce-embed-file-$(1) = $(1).c 24depends-embed-file-$(1) := $(FILE_TO_C_SCRIPT) $(2) 25recipe-embed-file-$(1) := $(CRYPT_FILE_TO_C_SCRIPT) --inf $(2) --out $(sub-dir-out)/$(1).c --name $(1) 26cleanfiles += $(sub-dir-out)/$(1).c 27endef 28 29$(eval $(call crypt_embed_file,ca_crt,../../cert/ca.crt)) 30$(eval $(call crypt_embed_file,mid_crt,../../cert/mid.crt)) 31$(eval $(call crypt_embed_file,mid_key,../../cert/mid.key)) 32