kumquat-buildroot/package/optee-examples/optee-examples.mk
Etienne Carriere 24ac0fef4a package/optee-examples: use the OPTEE_OS_SDK variable
The optee-os package was recently changed to provide the OPTEE_OS_SDK
to allow other packages to locate the OP-TEE Trusted Application SDK,
so let's use this new variable in the optee-examples package.

Signed-off-by: Etienne Carriere <etienne.carriere@linaro.org>
[Thomas: use the new variable name, rework commit log]
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
2019-03-05 21:54:32 +01:00

32 lines
1.1 KiB
Makefile

################################################################################
#
# optee-examples
#
################################################################################
OPTEE_EXAMPLES_VERSION = 3.4.0
OPTEE_EXAMPLES_SITE = $(call github,linaro-swg,optee_examples,$(OPTEE_EXAMPLES_VERSION))
OPTEE_EXAMPLES_LICENSE = BSD-2-Clause
OPTEE_EXAMPLES_LICENSE_FILES = LICENSE
OPTEE_EXAMPLES_DEPENDENCIES = optee-client optee-os
# Trusted Application are not built from CMake due to ta_dev_kit dependencies.
# We must build and install them on target.
define OPTEE_EXAMPLES_BUILD_TAS
$(foreach f,$(wildcard $(@D)/*/ta/Makefile), \
$(TARGET_CONFIGURE_OPTS) \
$(MAKE) CROSS_COMPILE=$(TARGET_CROSS) \
TA_DEV_KIT_DIR=$(OPTEE_OS_SDK) \
O=out -C $(dir $f) all
)
endef
define OPTEE_EXAMPLES_INSTALL_TAS
@mkdir -p $(TARGET_DIR)/lib/optee_armtz
@$(INSTALL) -D -m 444 -t $(TARGET_DIR)/lib/optee_armtz $(@D)/*/ta/out/*.ta
endef
OPTEE_EXAMPLES_POST_BUILD_HOOKS += OPTEE_EXAMPLES_BUILD_TAS
OPTEE_EXAMPLES_POST_INSTALL_TARGET_HOOKS += OPTEE_EXAMPLES_INSTALL_TAS
$(eval $(cmake-package))