Pascal Brand | c639ac8 | 2015-07-02 08:53:34 +0200 | [diff] [blame] | 1 | # Normally this makefile shouldn't be called directly and we expect the output |
| 2 | # path to be on a certain location to fit together with the other OP-TEE |
| 3 | # gits and helper scripts. |
Etienne Carriere | 3ddc362 | 2017-03-13 15:31:15 +0100 | [diff] [blame] | 4 | |
| 5 | include ../scripts/common.mk |
| 6 | out-dir := $(call strip-trailing-slashes-and-dots,$(O)) |
| 7 | ifeq ($(out-dir),) |
| 8 | $(error invalid output directory (O=$(O))) |
Pascal Brand | c639ac8 | 2015-07-02 08:53:34 +0200 | [diff] [blame] | 9 | endif |
| 10 | |
Jens Wiklander | d244a2a | 2018-04-20 13:03:26 +0200 | [diff] [blame] | 11 | include $(TA_DEV_KIT_DIR)/mk/conf.mk |
Jerome Forissier | d701b29 | 2017-03-23 18:03:12 +0100 | [diff] [blame] | 12 | |
Sumit Garg | 0e00914 | 2015-11-04 15:34:07 -0500 | [diff] [blame] | 13 | # Prevent use of LDFLAGS from the environment. For example, yocto exports |
| 14 | # LDFLAGS that are suitable for the client applications, not for TAs |
| 15 | LDFLAGS= |
| 16 | |
Pascal Brand | c639ac8 | 2015-07-02 08:53:34 +0200 | [diff] [blame] | 17 | TA_DIRS := create_fail_test \ |
| 18 | crypt \ |
Jerome Forissier | 28a7be9 | 2020-06-17 17:55:00 +0200 | [diff] [blame] | 19 | os_test_lib \ |
Jerome Forissier | a9ab5d0 | 2019-03-17 21:14:06 +0100 | [diff] [blame] | 20 | os_test_lib_dl \ |
Pascal Brand | c639ac8 | 2015-07-02 08:53:34 +0200 | [diff] [blame] | 21 | os_test \ |
| 22 | rpc_test \ |
| 23 | sims \ |
Ovidiu Mihalachi | 15cecff | 2019-04-02 16:36:31 +0300 | [diff] [blame] | 24 | miss \ |
| 25 | sims_keepalive \ |
Jens Wiklander | ac27ec1 | 2015-07-15 15:23:14 +0200 | [diff] [blame] | 26 | storage \ |
Jerome Forissier | e385416 | 2016-08-12 12:40:12 +0200 | [diff] [blame] | 27 | storage2 \ |
James Kung | df1e6cf | 2015-09-14 22:42:24 +0800 | [diff] [blame] | 28 | concurrent \ |
Jens Wiklander | 7067297 | 2016-04-06 00:01:45 +0200 | [diff] [blame] | 29 | concurrent_large \ |
Igor Opaniuk | 136644a | 2016-09-13 13:40:56 +0300 | [diff] [blame] | 30 | storage_benchmark \ |
Igor Opaniuk | 44aff4b | 2016-09-16 10:18:00 +0300 | [diff] [blame] | 31 | sha_perf \ |
Jens Wiklander | 02389a9 | 2016-12-16 11:13:38 +0100 | [diff] [blame] | 32 | aes_perf \ |
| 33 | socket |
Pascal Brand | c639ac8 | 2015-07-02 08:53:34 +0200 | [diff] [blame] | 34 | |
Etienne Carriere | 41343db | 2017-03-17 15:38:52 +0100 | [diff] [blame] | 35 | ifeq ($(CFG_SECURE_DATA_PATH),y) |
| 36 | TA_DIRS += sdp_basic |
| 37 | endif |
| 38 | |
Jerome Forissier | e368834 | 2015-09-24 10:45:17 -0700 | [diff] [blame] | 39 | ifdef CFG_GP_PACKAGE_PATH |
Pascal Brand | c639ac8 | 2015-07-02 08:53:34 +0200 | [diff] [blame] | 40 | TA_DIRS += GP_TTA_Arithmetical \ |
| 41 | GP_TTA_Crypto \ |
| 42 | GP_TTA_DS \ |
| 43 | GP_TTA_TCF \ |
| 44 | GP_TTA_TCF_ICA \ |
| 45 | GP_TTA_TCF_ICA2 \ |
| 46 | GP_TTA_TCF_MultipleInstanceTA \ |
| 47 | GP_TTA_TCF_SingleInstanceTA \ |
| 48 | GP_TTA_Time \ |
| 49 | GP_TTA_answerErrorTo_Invoke \ |
| 50 | GP_TTA_answerErrorTo_OpenSession \ |
| 51 | GP_TTA_answerSuccessTo_OpenSession_Invoke \ |
| 52 | GP_TTA_check_OpenSession_with_4_parameters \ |
| 53 | GP_TTA_testingClientAPI |
| 54 | endif |
| 55 | |
| 56 | .PHONY: all |
| 57 | all: ta |
| 58 | |
| 59 | .PHONY: ta |
| 60 | ta: |
Etienne Carriere | 3ddc362 | 2017-03-13 15:31:15 +0100 | [diff] [blame] | 61 | $(q)$(foreach dir,$(TA_DIRS), $(MAKE) -C $(dir) O=$(out-dir)/ta/$(dir) &&) true |
| 62 | |
| 63 | # remove build directories including ta/<ta-name>/ directories. |
| 64 | # Note: $(out-dir) may be a relative path. |
| 65 | RMDIR := rmdir --ignore-fail-on-non-empty |
| 66 | define rm-build-subdir |
| 67 | echo `[ -d $1 ] && { cd $1; $(RMDIR) $(out-dir)/ta $(out-dir) 2> /dev/null; true; }` > /dev/null |
| 68 | endef |
Pascal Brand | c639ac8 | 2015-07-02 08:53:34 +0200 | [diff] [blame] | 69 | |
| 70 | .PHONY: clean |
| 71 | clean: |
Etienne Carriere | 8a6ed86 | 2017-03-13 15:30:54 +0100 | [diff] [blame] | 72 | $(q)$(foreach dir,$(TA_DIRS), [ ! -d $(dir) ] || $(MAKE) -C $(dir) O=$(out-dir)/ta/$(dir) $@ &&) true |
Etienne Carriere | 3ddc362 | 2017-03-13 15:31:15 +0100 | [diff] [blame] | 73 | $(q)$(foreach dir,$(TA_DIRS), $(call rm-build-subdir,$(dir));) |