Thu, 22 Jan 2015 13:21:57 +0100
Incorporate requested changes from Mozilla in review:
https://bugzilla.mozilla.org/show_bug.cgi?id=1123480#c6
michael@0 | 1 | LOCAL_PATH := $(call my-dir) |
michael@0 | 2 | |
michael@0 | 3 | # Normally, we distribute the NDK with prebuilt binaries of STLport |
michael@0 | 4 | # in $LOCAL_PATH/<abi>/. However, |
michael@0 | 5 | # |
michael@0 | 6 | |
michael@0 | 7 | STLPORT_FORCE_REBUILD := $(strip $(STLPORT_FORCE_REBUILD)) |
michael@0 | 8 | ifndef STLPORT_FORCE_REBUILD |
michael@0 | 9 | ifeq (,$(strip $(wildcard $(LOCAL_PATH)/libs/$(TARGET_ARCH_ABI)/libstlport_static.a))) |
michael@0 | 10 | $(call __ndk_info,WARNING: Rebuilding STLport libraries from sources!) |
michael@0 | 11 | $(call __ndk_info,You might want to use $$NDK/build/tools/build-stlport.sh) |
michael@0 | 12 | $(call __ndk_info,in order to build prebuilt versions to speed up your builds!) |
michael@0 | 13 | STLPORT_FORCE_REBUILD := true |
michael@0 | 14 | endif |
michael@0 | 15 | endif |
michael@0 | 16 | |
michael@0 | 17 | libstlport_path := $(LOCAL_PATH) |
michael@0 | 18 | |
michael@0 | 19 | libstlport_src_files := \ |
michael@0 | 20 | src/dll_main.cpp \ |
michael@0 | 21 | src/fstream.cpp \ |
michael@0 | 22 | src/strstream.cpp \ |
michael@0 | 23 | src/sstream.cpp \ |
michael@0 | 24 | src/ios.cpp \ |
michael@0 | 25 | src/stdio_streambuf.cpp \ |
michael@0 | 26 | src/istream.cpp \ |
michael@0 | 27 | src/ostream.cpp \ |
michael@0 | 28 | src/iostream.cpp \ |
michael@0 | 29 | src/codecvt.cpp \ |
michael@0 | 30 | src/collate.cpp \ |
michael@0 | 31 | src/ctype.cpp \ |
michael@0 | 32 | src/monetary.cpp \ |
michael@0 | 33 | src/num_get.cpp \ |
michael@0 | 34 | src/num_put.cpp \ |
michael@0 | 35 | src/num_get_float.cpp \ |
michael@0 | 36 | src/num_put_float.cpp \ |
michael@0 | 37 | src/numpunct.cpp \ |
michael@0 | 38 | src/time_facets.cpp \ |
michael@0 | 39 | src/messages.cpp \ |
michael@0 | 40 | src/locale.cpp \ |
michael@0 | 41 | src/locale_impl.cpp \ |
michael@0 | 42 | src/locale_catalog.cpp \ |
michael@0 | 43 | src/facets_byname.cpp \ |
michael@0 | 44 | src/complex.cpp \ |
michael@0 | 45 | src/complex_io.cpp \ |
michael@0 | 46 | src/complex_trig.cpp \ |
michael@0 | 47 | src/string.cpp \ |
michael@0 | 48 | src/bitset.cpp \ |
michael@0 | 49 | src/allocators.cpp \ |
michael@0 | 50 | src/c_locale.c \ |
michael@0 | 51 | src/cxa.c \ |
michael@0 | 52 | |
michael@0 | 53 | libstlport_cflags := -D_GNU_SOURCE |
michael@0 | 54 | libstlport_cppflags := -fuse-cxa-atexit |
michael@0 | 55 | libstlport_c_includes := $(libstlport_path)/stlport |
michael@0 | 56 | |
michael@0 | 57 | #It is much more practical to include the sources of GAbi++ in our builds |
michael@0 | 58 | # of STLport. This is similar to what the GNU libstdc++ does (it includes |
michael@0 | 59 | # its own copy of libsupc++) |
michael@0 | 60 | # |
michael@0 | 61 | # This simplifies usage, since you only have to list a single library |
michael@0 | 62 | # as a dependency, instead of two, especially when using the standalone |
michael@0 | 63 | # toolchain. |
michael@0 | 64 | # |
michael@0 | 65 | include $(dir $(LOCAL_PATH))/gabi++/sources.mk |
michael@0 | 66 | |
michael@0 | 67 | libstlport_c_includes += $(libgabi++_c_includes) |
michael@0 | 68 | |
michael@0 | 69 | ifneq ($(STLPORT_FORCE_REBUILD),true) |
michael@0 | 70 | |
michael@0 | 71 | $(call ndk_log,Using prebuilt STLport libraries) |
michael@0 | 72 | |
michael@0 | 73 | include $(CLEAR_VARS) |
michael@0 | 74 | LOCAL_MODULE := stlport_static |
michael@0 | 75 | LOCAL_SRC_FILES := libs/$(TARGET_ARCH_ABI)/lib$(LOCAL_MODULE).a |
michael@0 | 76 | LOCAL_EXPORT_C_INCLUDES := $(libstlport_c_includes) |
michael@0 | 77 | LOCAL_CPP_FEATURES := rtti |
michael@0 | 78 | include $(PREBUILT_STATIC_LIBRARY) |
michael@0 | 79 | |
michael@0 | 80 | include $(CLEAR_VARS) |
michael@0 | 81 | LOCAL_MODULE := stlport_shared |
michael@0 | 82 | LOCAL_SRC_FILES := libs/$(TARGET_ARCH_ABI)/lib$(LOCAL_MODULE).so |
michael@0 | 83 | LOCAL_EXPORT_C_INCLUDES := $(libstlport_c_includes) |
michael@0 | 84 | LOCAL_CPP_FEATURES := rtti |
michael@0 | 85 | include $(PREBUILT_SHARED_LIBRARY) |
michael@0 | 86 | |
michael@0 | 87 | else # STLPORT_FORCE_REBUILD == true |
michael@0 | 88 | |
michael@0 | 89 | $(call ndk_log,Rebuilding STLport libraries from sources) |
michael@0 | 90 | |
michael@0 | 91 | include $(CLEAR_VARS) |
michael@0 | 92 | LOCAL_MODULE := stlport_static |
michael@0 | 93 | LOCAL_CPP_EXTENSION := .cpp .cc |
michael@0 | 94 | LOCAL_SRC_FILES := $(libstlport_src_files) |
michael@0 | 95 | LOCAL_SRC_FILES += $(libgabi++_src_files:%=../gabi++/%) |
michael@0 | 96 | LOCAL_CFLAGS := $(libstlport_cflags) |
michael@0 | 97 | LOCAL_CPPFLAGS := $(libstlport_cppflags) |
michael@0 | 98 | LOCAL_C_INCLUDES := $(libstlport_c_includes) |
michael@0 | 99 | LOCAL_EXPORT_C_INCLUDES := $(libstlport_c_includes) |
michael@0 | 100 | LOCAL_CPP_FEATURES := rtti exceptions |
michael@0 | 101 | include $(BUILD_STATIC_LIBRARY) |
michael@0 | 102 | |
michael@0 | 103 | include $(CLEAR_VARS) |
michael@0 | 104 | LOCAL_MODULE := stlport_shared |
michael@0 | 105 | LOCAL_CPP_EXTENSION := .cpp .cc |
michael@0 | 106 | LOCAL_SRC_FILES := $(libstlport_src_files) |
michael@0 | 107 | LOCAL_SRC_FILES += $(libgabi++_src_files:%=../gabi++/%) |
michael@0 | 108 | LOCAL_CFLAGS := $(libstlport_cflags) |
michael@0 | 109 | LOCAL_CPPFLAGS := $(libstlport_cppflags) |
michael@0 | 110 | LOCAL_C_INCLUDES := $(libstlport_c_includes) |
michael@0 | 111 | LOCAL_EXPORT_C_INCLUDES := $(libstlport_c_includes) |
michael@0 | 112 | LOCAL_CPP_FEATURES := rtti exceptions |
michael@0 | 113 | include $(BUILD_SHARED_LIBRARY) |
michael@0 | 114 | |
michael@0 | 115 | endif # STLPORT_FORCE_REBUILD == true |