diff --git a/binary/jni/Android.mk b/binary/jni/Android.mk index 4278420..3eb94d5 100644 --- a/binary/jni/Android.mk +++ b/binary/jni/Android.mk @@ -4,9 +4,6 @@ LOCAL_MODULE := i2pd LOCAL_CPP_FEATURES := rtti exceptions LOCAL_C_INCLUDES += $(IFADDRS_PATH) $(LIB_SRC_PATH) $(LIB_CLIENT_SRC_PATH) $(LANG_SRC_PATH) $(DAEMON_SRC_PATH) LOCAL_STATIC_LIBRARIES := \ - boost_system \ - boost_date_time \ - boost_filesystem \ boost_program_options \ crypto \ ssl \ @@ -29,27 +26,6 @@ LOCAL_SRC_FILES := \ include $(BUILD_EXECUTABLE) -LOCAL_PATH := $(call my-dir) -include $(CLEAR_VARS) -LOCAL_MODULE := boost_system -LOCAL_SRC_FILES := $(BOOST_PATH)/build/out/$(TARGET_ARCH_ABI)/lib/libboost_system.a -LOCAL_EXPORT_C_INCLUDES := $(BOOST_PATH)/build/out/$(TARGET_ARCH_ABI)/include -include $(PREBUILT_STATIC_LIBRARY) - -LOCAL_PATH := $(call my-dir) -include $(CLEAR_VARS) -LOCAL_MODULE := boost_date_time -LOCAL_SRC_FILES := $(BOOST_PATH)/build/out/$(TARGET_ARCH_ABI)/lib/libboost_date_time.a -LOCAL_EXPORT_C_INCLUDES := $(BOOST_PATH)/build/out/$(TARGET_ARCH_ABI)/include -include $(PREBUILT_STATIC_LIBRARY) - -LOCAL_PATH := $(call my-dir) -include $(CLEAR_VARS) -LOCAL_MODULE := boost_filesystem -LOCAL_SRC_FILES := $(BOOST_PATH)/build/out/$(TARGET_ARCH_ABI)/lib/libboost_filesystem.a -LOCAL_EXPORT_C_INCLUDES := $(BOOST_PATH)/build/out/$(TARGET_ARCH_ABI)/include -include $(PREBUILT_STATIC_LIBRARY) - LOCAL_PATH := $(call my-dir) include $(CLEAR_VARS) LOCAL_MODULE := boost_program_options diff --git a/binary/jni/boost b/binary/jni/boost index 7daeea9..2335700 160000 --- a/binary/jni/boost +++ b/binary/jni/boost @@ -1 +1 @@ -Subproject commit 7daeea97271a4067386254dc491d49db2b13ae65 +Subproject commit 2335700042dc9882c5d03e210f9f58ab3ac83b58 diff --git a/binary/jni/build.sh b/binary/jni/build.sh index 4b2edfb..b8f3328 100755 --- a/binary/jni/build.sh +++ b/binary/jni/build.sh @@ -23,7 +23,7 @@ fi _NDK_OPTS="-j `nproc` NDK_MODULE_PATH=$DIR" -help() +_help() { echo "Syntax: $(basename "$SOURCE") [-m|d|s|h|v]" echo "Options:" @@ -36,6 +36,12 @@ help() echo } +_failed() +{ + echo "Compilation failed"; + exit 1; +} + while getopts ":dbsvxh" option; do case $option in d) # debug build @@ -54,7 +60,7 @@ while getopts ":dbsvxh" option; do _NDK_OPTS="$_NDK_OPTS V=1 NDK_LOG=1" ;; h) # display help - help + _help exit;; \?) # Invalid option echo "Error: Invalid option. Use $(basename "$SOURCE") -h for help" @@ -66,12 +72,15 @@ done if [ -z "$_SKIP_LIBS" ]; then echo "Building boost..." ./build_boost.sh + [ $? -ne 0 ] && _failed echo "Building openssl..." ./build_openssl.sh + [ $? -ne 0 ] && _failed echo "Building miniupnpc..." ./build_miniupnpc.sh + [ $? -ne 0 ] && _failed fi if [ ! -z "$_BINARY" ]; then diff --git a/binary/jni/build_boost.sh b/binary/jni/build_boost.sh index 92c345f..1bb1052 100755 --- a/binary/jni/build_boost.sh +++ b/binary/jni/build_boost.sh @@ -2,8 +2,8 @@ set -e -BOOST_VERSION=1.78.0 -BOOST_LIBS=date_time,filesystem,program_options,system +BOOST_VERSION=1.84.0 +BOOST_LIBS=program_options function build_one { echo "Configuring and building..."