1####################################################### 2## Shared definitions for all target test compilations. 3####################################################### 4 5ifeq ($(LOCAL_GTEST),true) 6 LOCAL_CFLAGS += -DGTEST_OS_LINUX_ANDROID -DGTEST_HAS_STD_STRING 7 8 ifndef LOCAL_SDK_VERSION 9 LOCAL_STATIC_LIBRARIES += libgtest_main libgtest 10 else 11 ifneq (,$(filter c++_%,$(LOCAL_NDK_STL_VARIANT))) 12 my_ndk_gtest_suffix := _c++ 13 else ifneq ($(filter stlport_,$(LOCAL_NDK_STL_VARIANT)),) 14 my_ndk_gtest_suffix := _stlport 15 else ifneq ($(filter gnustl_,$(LOCAL_NDK_STL_VARIANT)),) 16 my_ndk_gtest_suffix := _gnustl 17 else # system STL, use stlport 18 my_ndk_gtest_suffix := _stlport 19 endif 20 LOCAL_STATIC_LIBRARIES += \ 21 libgtest_main_ndk$(my_ndk_gtest_suffix) \ 22 libgtest_ndk$(my_ndk_gtest_suffix) 23 endif 24endif 25 26ifdef LOCAL_MODULE_PATH 27$(error $(LOCAL_PATH): Do not set LOCAL_MODULE_PATH when building test $(LOCAL_MODULE)) 28endif 29 30ifdef LOCAL_MODULE_PATH_32 31$(error $(LOCAL_PATH): Do not set LOCAL_MODULE_PATH_32 when building test $(LOCAL_MODULE)) 32endif 33 34ifdef LOCAL_MODULE_PATH_64 35$(error $(LOCAL_PATH): Do not set LOCAL_MODULE_PATH_64 when building test $(LOCAL_MODULE)) 36endif 37 38ifndef LOCAL_MODULE_RELATIVE_PATH 39LOCAL_MODULE_RELATIVE_PATH := $(LOCAL_MODULE) 40endif 41