aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorUlas Kirazci <ulas@google.com>2012-09-26 16:58:37 -0700
committerUlas Kirazci <ulas@google.com>2012-09-26 16:58:37 -0700
commitdac6030289c87010b31bad60b769399b387ef15c (patch)
tree67319e7107e948861347dadf6bd5bc1ea2184cc5
parente7520b618642d25d01bac09d7dc442381af6cf71 (diff)
downloadgtest-dac6030289c87010b31bad60b769399b387ef15c.tar.gz
Build gtest against NDK.
Change-Id: If1c9ee7be65d7357b45feb05a849f9b5ca1b22d8
-rw-r--r--src/Android.mk28
1 files changed, 18 insertions, 10 deletions
diff --git a/src/Android.mk b/src/Android.mk
index dbbf779..52c8a0a 100644
--- a/src/Android.mk
+++ b/src/Android.mk
@@ -29,8 +29,6 @@
LOCAL_PATH := $(call my-dir)
libgtest_target_includes := \
- bionic/libstdc++/include \
- external/stlport/stlport \
$(LOCAL_PATH)/.. \
$(LOCAL_PATH)/../include
@@ -77,16 +75,21 @@ include $(BUILD_HOST_STATIC_LIBRARY)
include $(CLEAR_VARS)
+ifeq ($(TARGET_ARCH), arm)
+ LOCAL_SDK_VERSION := 8
+else
+# NDK support of other archs (ie. x86 and mips) are only available after android-9
+ LOCAL_SDK_VERSION := 9
+endif
+
+LOCAL_NDK_STL_VARIANT := stlport_static
+
LOCAL_CPP_EXTENSION := .cc
LOCAL_SRC_FILES := gtest-all.cc
LOCAL_C_INCLUDES := $(libgtest_target_includes)
-ifneq ($(BUILD_WITH_ASTL),true)
-include external/stlport/libstlport.mk
-endif
-
LOCAL_MODULE := libgtest
include $(BUILD_STATIC_LIBRARY)
@@ -96,16 +99,21 @@ include $(BUILD_STATIC_LIBRARY)
include $(CLEAR_VARS)
+ifeq ($(TARGET_ARCH), arm)
+ LOCAL_SDK_VERSION := 8
+else
+# NDK support of other archs (ie. x86 and mips) are only available after android-9
+ LOCAL_SDK_VERSION := 9
+endif
+
+LOCAL_NDK_STL_VARIANT := stlport_static
+
LOCAL_CPP_EXTENSION := .cc
LOCAL_SRC_FILES := gtest_main.cc
LOCAL_C_INCLUDES := $(libgtest_target_includes)
-ifneq ($(BUILD_WITH_ASTL),true)
-include external/stlport/libstlport.mk
-endif
-
LOCAL_MODULE := libgtest_main
include $(BUILD_STATIC_LIBRARY)