optee-examples.mk 1.1 KB

12345678910111213141516171819202122232425262728293031
  1. ################################################################################
  2. #
  3. # optee-examples
  4. #
  5. ################################################################################
  6. OPTEE_EXAMPLES_VERSION = 3.11.0
  7. OPTEE_EXAMPLES_SITE = $(call github,linaro-swg,optee_examples,$(OPTEE_EXAMPLES_VERSION))
  8. OPTEE_EXAMPLES_LICENSE = BSD-2-Clause
  9. OPTEE_EXAMPLES_LICENSE_FILES = LICENSE
  10. OPTEE_EXAMPLES_DEPENDENCIES = optee-client optee-os
  11. # Trusted Application are not built from CMake due to ta_dev_kit dependencies.
  12. # We must build and install them on target.
  13. define OPTEE_EXAMPLES_BUILD_TAS
  14. $(foreach f,$(wildcard $(@D)/*/ta/Makefile), \
  15. $(TARGET_CONFIGURE_OPTS) \
  16. $(MAKE) CROSS_COMPILE=$(TARGET_CROSS) \
  17. TA_DEV_KIT_DIR=$(OPTEE_OS_SDK) \
  18. O=out -C $(dir $f) all
  19. )
  20. endef
  21. define OPTEE_EXAMPLES_INSTALL_TAS
  22. @mkdir -p $(TARGET_DIR)/lib/optee_armtz
  23. @$(INSTALL) -D -m 444 -t $(TARGET_DIR)/lib/optee_armtz $(@D)/*/ta/out/*.ta
  24. endef
  25. OPTEE_EXAMPLES_POST_BUILD_HOOKS += OPTEE_EXAMPLES_BUILD_TAS
  26. OPTEE_EXAMPLES_POST_INSTALL_TARGET_HOOKS += OPTEE_EXAMPLES_INSTALL_TAS
  27. $(eval $(cmake-package))