Permalink
Browse files

am f581c1e: Unbundle libstlport with NDK r4.

Merge commit 'f581c1eaf398e25de8ecae69c46c698604b288f0' into gingerbread

* commit 'f581c1eaf398e25de8ecae69c46c698604b288f0':
  Unbundle libstlport with NDK r4.
  • Loading branch information...
2 parents f4c9fc3 + f581c1e commit 0ec050af98e7e3e60d0b5a2a98a5b1c381b7f77c @wangying1015 wangying1015 committed with Android Git Automerger Jul 26, 2010
Showing with 26 additions and 0 deletions.
  1. +3 −0 Android.mk
  2. +10 −0 libstlport.mk
  3. +13 −0 stlport/stl/config/_android.h
View
@@ -45,6 +45,9 @@ LOCAL_MODULE := libstlport
LOCAL_CFLAGS := -D_GNU_SOURCE
LOCAL_CPPFLAGS := -fuse-cxa-atexit
+LOCAL_NDK_VERSION := 4
+LOCAL_SDK_VERSION := 8
+
include $(LOCAL_PATH)/libstlport.mk
include $(BUILD_SHARED_LIBRARY)
View
@@ -5,8 +5,18 @@ ifeq ($(TARGET_SIMULATOR),true)
$(error STLPort not suitable for the simulator! $(LOCAL_PATH))
endif
+ifdef LOCAL_NDK_VERSION
+stlport_NDK_VERSION_ROOT := $(HISTORICAL_NDK_VERSIONS_ROOT)/android-ndk-r$(LOCAL_NDK_VERSION)/$(BUILD_OS)/platforms/android-$(LOCAL_SDK_VERSION)/arch-$(TARGET_ARCH)
+LOCAL_C_INCLUDES := \
+ $(stlport_NDK_VERSION_ROOT) \
+ external/stlport/stlport \
+ $(LOCAL_C_INCLUDES)
+
+LOCAL_CFLAGS += -DBUILD_WITH_NDK=1
+else
# Make sure bionic is first so we can include system headers.
LOCAL_C_INCLUDES := \
bionic \
external/stlport/stlport \
$(LOCAL_C_INCLUDES)
+endif
@@ -54,13 +54,26 @@
#define _STLP_NO_VENDOR_MATH_L 1
// Define how to include our native headers.
+#ifdef BUILD_WITH_NDK
+
+#define _STLP_NATIVE_HEADER(header) <usr/include/header>
+#define _STLP_NATIVE_C_HEADER(header) <../include/header>
+#define _STLP_NATIVE_CPP_C_HEADER(header) <usr/include/header>
+#define _STLP_NATIVE_CPP_RUNTIME_HEADER(header) <usr/include/header>
+#define _STLP_NATIVE_OLD_STREAMS_HEADER(header) <usr/include/header>
+#define _STLP_NATIVE_CPP_RUNTIME_HEADER(header) <usr/include/header>
+
+#else
+
#define _STLP_NATIVE_HEADER(header) <libstdc++/include/header>
#define _STLP_NATIVE_C_HEADER(header) <../include/header>
#define _STLP_NATIVE_CPP_C_HEADER(header) <libstdc++/include/header>
#define _STLP_NATIVE_CPP_RUNTIME_HEADER(header) <libstdc++/include/header>
#define _STLP_NATIVE_OLD_STREAMS_HEADER(header) <libstdc++/include/header>
#define _STLP_NATIVE_CPP_RUNTIME_HEADER(header) <libstdc++/include/header>
+#endif
+
// Include most of the gcc settings.
#include <stl/config/_gcc.h>

0 comments on commit 0ec050a

Please sign in to comment.