blob: 20f22e6e402337dbadd0dd084a1d7e4f1298e2c6 [file] [log] [blame]
Pascal Brandc639ac82015-07-02 08:53:34 +02001# 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 Carriere3ddc3622017-03-13 15:31:15 +01004
5include ../scripts/common.mk
6out-dir := $(call strip-trailing-slashes-and-dots,$(O))
7ifeq ($(out-dir),)
8$(error invalid output directory (O=$(O)))
Pascal Brandc639ac82015-07-02 08:53:34 +02009endif
10
Jens Wiklanderd244a2a2018-04-20 13:03:26 +020011include $(TA_DEV_KIT_DIR)/mk/conf.mk
Jerome Forissierd701b292017-03-23 18:03:12 +010012
Sumit Garg0e009142015-11-04 15:34:07 -050013# Prevent use of LDFLAGS from the environment. For example, yocto exports
14# LDFLAGS that are suitable for the client applications, not for TAs
15LDFLAGS=
16
Pascal Brandc639ac82015-07-02 08:53:34 +020017TA_DIRS := create_fail_test \
18 crypt \
Jerome Forissier28a7be92020-06-17 17:55:00 +020019 os_test_lib \
Jerome Forissiera9ab5d02019-03-17 21:14:06 +010020 os_test_lib_dl \
Pascal Brandc639ac82015-07-02 08:53:34 +020021 os_test \
22 rpc_test \
23 sims \
Ovidiu Mihalachi15cecff2019-04-02 16:36:31 +030024 miss \
25 sims_keepalive \
Jens Wiklanderac27ec12015-07-15 15:23:14 +020026 storage \
Jerome Forissiere3854162016-08-12 12:40:12 +020027 storage2 \
James Kungdf1e6cf2015-09-14 22:42:24 +080028 concurrent \
Jens Wiklander70672972016-04-06 00:01:45 +020029 concurrent_large \
Igor Opaniuk136644a2016-09-13 13:40:56 +030030 storage_benchmark \
Igor Opaniuk44aff4b2016-09-16 10:18:00 +030031 sha_perf \
Jens Wiklander02389a92016-12-16 11:13:38 +010032 aes_perf \
Aleksandr Anisimov01f6f062021-01-19 11:02:25 +030033 socket \
Etienne Carriere28f70202021-06-21 12:19:28 +020034 supp_plugin \
35 large
Pascal Brandc639ac82015-07-02 08:53:34 +020036
Etienne Carriere41343db2017-03-17 15:38:52 +010037ifeq ($(CFG_SECURE_DATA_PATH),y)
38TA_DIRS += sdp_basic
39endif
40
Ruchika Guptaafc38f82021-12-01 10:44:14 +053041ifeq ($(CFG_TA_BTI),y)
42TA_DIRS += bti_test
43endif
44
Pascal Brandc639ac82015-07-02 08:53:34 +020045.PHONY: all
46all: ta
47
48.PHONY: ta
49ta:
Etienne Carriere3ddc3622017-03-13 15:31:15 +010050 $(q)$(foreach dir,$(TA_DIRS), $(MAKE) -C $(dir) O=$(out-dir)/ta/$(dir) &&) true
51
52# remove build directories including ta/<ta-name>/ directories.
53# Note: $(out-dir) may be a relative path.
54RMDIR := rmdir --ignore-fail-on-non-empty
55define rm-build-subdir
56echo `[ -d $1 ] && { cd $1; $(RMDIR) $(out-dir)/ta $(out-dir) 2> /dev/null; true; }` > /dev/null
57endef
Pascal Brandc639ac82015-07-02 08:53:34 +020058
59.PHONY: clean
60clean:
Etienne Carriere8a6ed862017-03-13 15:30:54 +010061 $(q)$(foreach dir,$(TA_DIRS), [ ! -d $(dir) ] || $(MAKE) -C $(dir) O=$(out-dir)/ta/$(dir) $@ &&) true
Etienne Carriere3ddc3622017-03-13 15:31:15 +010062 $(q)$(foreach dir,$(TA_DIRS), $(call rm-build-subdir,$(dir));)