build/stlport/Android.mk

changeset 0
6474c204b198
     1.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     1.2 +++ b/build/stlport/Android.mk	Wed Dec 31 06:09:35 2014 +0100
     1.3 @@ -0,0 +1,115 @@
     1.4 +LOCAL_PATH := $(call my-dir)
     1.5 +
     1.6 +# Normally, we distribute the NDK with prebuilt binaries of STLport
     1.7 +# in $LOCAL_PATH/<abi>/. However,
     1.8 +#
     1.9 +
    1.10 +STLPORT_FORCE_REBUILD := $(strip $(STLPORT_FORCE_REBUILD))
    1.11 +ifndef STLPORT_FORCE_REBUILD
    1.12 +  ifeq (,$(strip $(wildcard $(LOCAL_PATH)/libs/$(TARGET_ARCH_ABI)/libstlport_static.a)))
    1.13 +    $(call __ndk_info,WARNING: Rebuilding STLport libraries from sources!)
    1.14 +    $(call __ndk_info,You might want to use $$NDK/build/tools/build-stlport.sh)
    1.15 +    $(call __ndk_info,in order to build prebuilt versions to speed up your builds!)
    1.16 +    STLPORT_FORCE_REBUILD := true
    1.17 +  endif
    1.18 +endif
    1.19 +
    1.20 +libstlport_path := $(LOCAL_PATH)
    1.21 +
    1.22 +libstlport_src_files := \
    1.23 +        src/dll_main.cpp \
    1.24 +        src/fstream.cpp \
    1.25 +        src/strstream.cpp \
    1.26 +        src/sstream.cpp \
    1.27 +        src/ios.cpp \
    1.28 +        src/stdio_streambuf.cpp \
    1.29 +        src/istream.cpp \
    1.30 +        src/ostream.cpp \
    1.31 +        src/iostream.cpp \
    1.32 +        src/codecvt.cpp \
    1.33 +        src/collate.cpp \
    1.34 +        src/ctype.cpp \
    1.35 +        src/monetary.cpp \
    1.36 +        src/num_get.cpp \
    1.37 +        src/num_put.cpp \
    1.38 +        src/num_get_float.cpp \
    1.39 +        src/num_put_float.cpp \
    1.40 +        src/numpunct.cpp \
    1.41 +        src/time_facets.cpp \
    1.42 +        src/messages.cpp \
    1.43 +        src/locale.cpp \
    1.44 +        src/locale_impl.cpp \
    1.45 +        src/locale_catalog.cpp \
    1.46 +        src/facets_byname.cpp \
    1.47 +        src/complex.cpp \
    1.48 +        src/complex_io.cpp \
    1.49 +        src/complex_trig.cpp \
    1.50 +        src/string.cpp \
    1.51 +        src/bitset.cpp \
    1.52 +        src/allocators.cpp \
    1.53 +        src/c_locale.c \
    1.54 +        src/cxa.c \
    1.55 +
    1.56 +libstlport_cflags := -D_GNU_SOURCE
    1.57 +libstlport_cppflags := -fuse-cxa-atexit
    1.58 +libstlport_c_includes := $(libstlport_path)/stlport
    1.59 +
    1.60 +#It is much more practical to include the sources of GAbi++ in our builds
    1.61 +# of STLport. This is similar to what the GNU libstdc++ does (it includes
    1.62 +# its own copy of libsupc++)
    1.63 +#
    1.64 +# This simplifies usage, since you only have to list a single library
    1.65 +# as a dependency, instead of two, especially when using the standalone
    1.66 +# toolchain.
    1.67 +#
    1.68 +include $(dir $(LOCAL_PATH))/gabi++/sources.mk
    1.69 +
    1.70 +libstlport_c_includes += $(libgabi++_c_includes)
    1.71 +
    1.72 +ifneq ($(STLPORT_FORCE_REBUILD),true)
    1.73 +
    1.74 +$(call ndk_log,Using prebuilt STLport libraries)
    1.75 +
    1.76 +include $(CLEAR_VARS)
    1.77 +LOCAL_MODULE := stlport_static
    1.78 +LOCAL_SRC_FILES := libs/$(TARGET_ARCH_ABI)/lib$(LOCAL_MODULE).a
    1.79 +LOCAL_EXPORT_C_INCLUDES := $(libstlport_c_includes)
    1.80 +LOCAL_CPP_FEATURES := rtti
    1.81 +include $(PREBUILT_STATIC_LIBRARY)
    1.82 +
    1.83 +include $(CLEAR_VARS)
    1.84 +LOCAL_MODULE := stlport_shared
    1.85 +LOCAL_SRC_FILES := libs/$(TARGET_ARCH_ABI)/lib$(LOCAL_MODULE).so
    1.86 +LOCAL_EXPORT_C_INCLUDES := $(libstlport_c_includes)
    1.87 +LOCAL_CPP_FEATURES := rtti
    1.88 +include $(PREBUILT_SHARED_LIBRARY)
    1.89 +
    1.90 +else # STLPORT_FORCE_REBUILD == true
    1.91 +
    1.92 +$(call ndk_log,Rebuilding STLport libraries from sources)
    1.93 +
    1.94 +include $(CLEAR_VARS)
    1.95 +LOCAL_MODULE := stlport_static
    1.96 +LOCAL_CPP_EXTENSION := .cpp .cc
    1.97 +LOCAL_SRC_FILES := $(libstlport_src_files)
    1.98 +LOCAL_SRC_FILES += $(libgabi++_src_files:%=../gabi++/%)
    1.99 +LOCAL_CFLAGS := $(libstlport_cflags)
   1.100 +LOCAL_CPPFLAGS := $(libstlport_cppflags)
   1.101 +LOCAL_C_INCLUDES := $(libstlport_c_includes)
   1.102 +LOCAL_EXPORT_C_INCLUDES := $(libstlport_c_includes)
   1.103 +LOCAL_CPP_FEATURES := rtti exceptions
   1.104 +include $(BUILD_STATIC_LIBRARY)
   1.105 +
   1.106 +include $(CLEAR_VARS)
   1.107 +LOCAL_MODULE := stlport_shared
   1.108 +LOCAL_CPP_EXTENSION := .cpp .cc
   1.109 +LOCAL_SRC_FILES := $(libstlport_src_files)
   1.110 +LOCAL_SRC_FILES += $(libgabi++_src_files:%=../gabi++/%)
   1.111 +LOCAL_CFLAGS := $(libstlport_cflags)
   1.112 +LOCAL_CPPFLAGS := $(libstlport_cppflags)
   1.113 +LOCAL_C_INCLUDES := $(libstlport_c_includes)
   1.114 +LOCAL_EXPORT_C_INCLUDES := $(libstlport_c_includes)
   1.115 +LOCAL_CPP_FEATURES := rtti exceptions
   1.116 +include $(BUILD_SHARED_LIBRARY)
   1.117 +
   1.118 +endif # STLPORT_FORCE_REBUILD == true

mercurial