1cppflags-$(CFG_TA_FLOAT_SUPPORT) += -DCFG_TA_FLOAT_SUPPORT=1
2cppflags-$(WITH_TLS_TESTS) += -DWITH_TLS_TESTS=1
3cppflags-$(WITH_CXX_TESTS) += -DWITH_CXX_TESTS=1
4
5global-incdirs-y += include
6global-incdirs-y += ../crypt/include
7global-incdirs-y += ../os_test_lib/include
8cflags-y += -Wno-float-equal
9srcs-y += init.c
10srcs-y += os_test.c
11srcs-y += ta_entry.c
12srcs-$(CFG_TA_FLOAT_SUPPORT) += test_float_subj.c
13ifeq ($(WITH_CXX_TESTS),y)
14# Profiling (-pg) is disabled for C++ tests because in case it is used for
15# function tracing (CFG_FTRACE_SUPPORT=y) then the exception handling code in
16# the C++ runtime won't be able to unwind the (modified) stack.
17# https://github.com/OP-TEE/optee_os/issues/4022
18srcs-y += cxx_tests.cpp
19cxxflags-remove-cxx_tests.cpp-y += -pg
20srcs-y += cxx_tests_c.c
21cflags-remove-cxx_tests_c.c-y += -pg
22endif
23