blob: 8dde576ea483594e3f69bfdfd7dbc54b832c957e [file] [log] [blame]
Jerome Forissierf02a2212015-10-29 14:33:35 +01001LOCAL_PATH := $(call my-dir)
2
Yongqin Liu26b8aa82016-06-02 20:54:19 +08003## include variants like TA_DEV_KIT_DIR
4## and target of BUILD_OPTEE_OS
5INCLUDE_FOR_BUILD_TA := false
6include $(BUILD_OPTEE_MK)
7INCLUDE_FOR_BUILD_TA :=
8
Jerome Forissierf02a2212015-10-29 14:33:35 +01009VERSION = $(shell git describe --always --dirty=-dev 2>/dev/null || echo Unknown)
Jerome Forissierf02a2212015-10-29 14:33:35 +010010
Zoltan Kuscsik88b88c52016-10-20 09:15:56 +020011# TA_DEV_KIT_DIR must be set to non-empty value to
12# avoid the Android build scripts complaining about
13# includes pointing outside the Android source tree.
14# This var is expected to be set when OPTEE OS built.
15# We set the default value to an invalid path.
16TA_DEV_KIT_DIR ?= ../invalid_include_path
17
Jerome Forissierf02a2212015-10-29 14:33:35 +010018-include $(TA_DEV_KIT_DIR)/host_include/conf.mk
19
20include $(CLEAR_VARS)
21LOCAL_MODULE := xtest
Zoltan Kuscsikd3c5c2c2016-04-08 11:33:39 +020022LOCAL_SHARED_LIBRARIES := libteec
Jerome Forissierf02a2212015-10-29 14:33:35 +010023
24srcs := xtest_1000.c \
25 xtest_4000.c \
26 xtest_5000.c \
27 xtest_6000.c \
28 xtest_7000.c \
29 xtest_10000.c \
30 xtest_20000.c \
Jerome Forissier555b1372015-12-28 16:13:10 +010031 xtest_benchmark_1000.c \
Igor Opaniuka00eeb12016-09-28 15:57:58 -070032 xtest_benchmark_2000.c \
Jerome Forissierf02a2212015-10-29 14:33:35 +010033 xtest_helpers.c \
34 xtest_main.c \
35 xtest_test.c \
36 adbg/src/adbg_case.c \
37 adbg/src/adbg_enum.c \
38 adbg/src/adbg_expect.c \
39 adbg/src/adbg_log.c \
Jerome Forissierf02a2212015-10-29 14:33:35 +010040 adbg/src/adbg_run.c \
Jerome Forissierf02a2212015-10-29 14:33:35 +010041 adbg/src/security_utils_hex.c \
Igor Opaniuka00eeb12016-09-28 15:57:58 -070042 aes_perf.c \
43 sha_perf.c
Jerome Forissierf02a2212015-10-29 14:33:35 +010044
45LOCAL_SRC_FILES := $(patsubst %,host/xtest/%,$(srcs))
46
Zoltan Kuscsikc8186b32016-04-08 11:35:17 +020047LOCAL_C_INCLUDES += $(LOCAL_PATH)/host/xtest \
48 $(LOCAL_PATH)/host/xtest/adbg/include\
Zoltan Kuscsik56cee0b2016-04-13 09:39:42 +020049 $(LOCAL_PATH)/host/xtest/xml/include \
Zoltan Kuscsikc8186b32016-04-08 11:35:17 +020050 $(TA_DEV_KIT_DIR)/host_include \
51 $(LOCAL_PATH)/ta/concurrent/include \
Jens Wiklander70672972016-04-06 00:01:45 +020052 $(LOCAL_PATH)/ta/concurrent_large/include \
Zoltan Kuscsikc8186b32016-04-08 11:35:17 +020053 $(LOCAL_PATH)/ta/create_fail_test/include \
54 $(LOCAL_PATH)/ta/crypt/include \
55 $(LOCAL_PATH)/ta/enc_fs/include \
56 $(LOCAL_PATH)/ta/os_test/include \
57 $(LOCAL_PATH)/ta/rpc_test/include \
58 $(LOCAL_PATH)/ta/sims/include \
59 $(LOCAL_PATH)/ta/storage/include \
60 $(LOCAL_PATH)/ta/storage_benchmark/include \
Igor Opaniuka00eeb12016-09-28 15:57:58 -070061 $(LOCAL_PATH)/ta/sha_perf/include \
62 $(LOCAL_PATH)/ta/aes_perf/include
Jerome Forissierf02a2212015-10-29 14:33:35 +010063
Jerome Forissierf9b89252016-08-23 18:30:43 +020064# Include configuration file generated by OP-TEE OS (CFG_* macros)
65LOCAL_CFLAGS += -include conf.h
Jerome Forissierf02a2212015-10-29 14:33:35 +010066LOCAL_CFLAGS += -DTA_DIR=\"/system/lib/optee_armtz\"
67LOCAL_CFLAGS += -pthread
Jerome Forissiera8b78f12016-08-17 09:40:59 +020068LOCAL_CFLAGS += -g3
Jerome Forissierf02a2212015-10-29 14:33:35 +010069
Yongqin Liu26b8aa82016-06-02 20:54:19 +080070## target BUILD_OPTEE_OS is defined in the common ta build
71## mk file included before, and this BUILD_OPTEE_OS will
72## help to generate the header files under $(TA_DEV_KIT_DIR)/host_include
73LOCAL_ADDITIONAL_DEPENDENCIES := BUILD_OPTEE_OS
74
Jerome Forissierf02a2212015-10-29 14:33:35 +010075include $(BUILD_EXECUTABLE)
Zoltan Kuscsik21758dc2016-04-13 09:41:02 +020076
77include $(LOCAL_PATH)/ta/Android.mk