blob: 70adc69f49c6a28676443ebbe758f23b67fa3027 [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
Jens Wiklander02389a92016-12-16 11:13:38 +010024srcs := xtest_1000.c
25
26ifeq ($(CFG_GP_SOCKETS),y)
27srcs += xtest_2000.c \
28 sock_server.c \
29 rand_stream.c
30endif
31
32srcs += xtest_4000.c \
Jerome Forissierf02a2212015-10-29 14:33:35 +010033 xtest_5000.c \
34 xtest_6000.c \
35 xtest_7000.c \
36 xtest_10000.c \
37 xtest_20000.c \
Jerome Forissier555b1372015-12-28 16:13:10 +010038 xtest_benchmark_1000.c \
Igor Opaniuka00eeb12016-09-28 15:57:58 -070039 xtest_benchmark_2000.c \
Jerome Forissierf02a2212015-10-29 14:33:35 +010040 xtest_helpers.c \
41 xtest_main.c \
42 xtest_test.c \
43 adbg/src/adbg_case.c \
44 adbg/src/adbg_enum.c \
45 adbg/src/adbg_expect.c \
46 adbg/src/adbg_log.c \
Jerome Forissierf02a2212015-10-29 14:33:35 +010047 adbg/src/adbg_run.c \
Jerome Forissierf02a2212015-10-29 14:33:35 +010048 adbg/src/security_utils_hex.c \
Igor Opaniuka00eeb12016-09-28 15:57:58 -070049 aes_perf.c \
50 sha_perf.c
Jerome Forissierf02a2212015-10-29 14:33:35 +010051
52LOCAL_SRC_FILES := $(patsubst %,host/xtest/%,$(srcs))
53
Zoltan Kuscsikc8186b32016-04-08 11:35:17 +020054LOCAL_C_INCLUDES += $(LOCAL_PATH)/host/xtest \
55 $(LOCAL_PATH)/host/xtest/adbg/include\
Zoltan Kuscsik56cee0b2016-04-13 09:39:42 +020056 $(LOCAL_PATH)/host/xtest/xml/include \
Zoltan Kuscsikc8186b32016-04-08 11:35:17 +020057 $(TA_DEV_KIT_DIR)/host_include \
58 $(LOCAL_PATH)/ta/concurrent/include \
Jens Wiklander70672972016-04-06 00:01:45 +020059 $(LOCAL_PATH)/ta/concurrent_large/include \
Zoltan Kuscsikc8186b32016-04-08 11:35:17 +020060 $(LOCAL_PATH)/ta/create_fail_test/include \
61 $(LOCAL_PATH)/ta/crypt/include \
62 $(LOCAL_PATH)/ta/enc_fs/include \
63 $(LOCAL_PATH)/ta/os_test/include \
64 $(LOCAL_PATH)/ta/rpc_test/include \
65 $(LOCAL_PATH)/ta/sims/include \
66 $(LOCAL_PATH)/ta/storage/include \
67 $(LOCAL_PATH)/ta/storage_benchmark/include \
Igor Opaniuka00eeb12016-09-28 15:57:58 -070068 $(LOCAL_PATH)/ta/sha_perf/include \
Victor Chong23139a32017-03-01 05:00:54 +000069 $(LOCAL_PATH)/ta/aes_perf/include \
70 $(LOCAL_PATH)/ta/socket/include
Jerome Forissierf02a2212015-10-29 14:33:35 +010071
Jerome Forissierf9b89252016-08-23 18:30:43 +020072# Include configuration file generated by OP-TEE OS (CFG_* macros)
73LOCAL_CFLAGS += -include conf.h
Jerome Forissierf02a2212015-10-29 14:33:35 +010074LOCAL_CFLAGS += -DTA_DIR=\"/system/lib/optee_armtz\"
75LOCAL_CFLAGS += -pthread
Jerome Forissiera8b78f12016-08-17 09:40:59 +020076LOCAL_CFLAGS += -g3
Jerome Forissierf02a2212015-10-29 14:33:35 +010077
Yongqin Liu26b8aa82016-06-02 20:54:19 +080078## target BUILD_OPTEE_OS is defined in the common ta build
79## mk file included before, and this BUILD_OPTEE_OS will
80## help to generate the header files under $(TA_DEV_KIT_DIR)/host_include
81LOCAL_ADDITIONAL_DEPENDENCIES := BUILD_OPTEE_OS
82
Jerome Forissierf02a2212015-10-29 14:33:35 +010083include $(BUILD_EXECUTABLE)
Zoltan Kuscsik21758dc2016-04-13 09:41:02 +020084
85include $(LOCAL_PATH)/ta/Android.mk