diff --git a/script/build-external-libs/fetch-boost.sh b/script/build-external-libs/fetch-boost.sh index be6b911..a142b4d 100755 --- a/script/build-external-libs/fetch-boost.sh +++ b/script/build-external-libs/fetch-boost.sh @@ -7,7 +7,8 @@ source script/build-external-libs/env.sh cd $EXTERNAL_LIBS_BUILD_ROOT version=1_67_0 +dot_version=1.67.0 rm -rf boost_${version} -wget https://dl.bintray.com/boostorg/release/1.67.0/source/boost_${version}.tar.gz +wget https://dl.bintray.com/boostorg/release/${dot_version}/source/boost_${version}.tar.gz tar xfz boost_${version}.tar.gz diff --git a/script/build-external-libs/wownero/build-all-arch.sh b/script/build-external-libs/wownero/build-all-arch.sh index 236c3fb..d80af98 100755 --- a/script/build-external-libs/wownero/build-all-arch.sh +++ b/script/build-external-libs/wownero/build-all-arch.sh @@ -1,6 +1,4 @@ #!/bin/bash -# -# -D BOOST_ROOT=$build_root/boost_1_58_0 set -e @@ -13,50 +11,65 @@ build_type=release # or debug archs=(arm arm64 x86 x86_64) for arch in ${archs[@]}; do - ldflags="" + ldflags="" + extra_cmake_flags="" case ${arch} in "arm") - target_host=arm-linux-androideabi - ldflags="-march=armv7-a -Wl,--fix-cortex-a8" - xarch=armv7-a - sixtyfour=OFF - ;; + target_host=arm-linux-androideabi + ldflags="-march=armv7-a -Wl,--fix-cortex-a8" + xarch=armv7-a + sixtyfour=OFF + extra_cmake_flags="-D NO_AES=true" + ;; "arm64") - target_host=aarch64-linux-android - xarch="armv8-a" - sixtyfour=ON + target_host=aarch64-linux-android + xarch="armv8-a" + sixtyfour=ON ;; "x86") - target_host=i686-linux-android - xarch="i686" + target_host=i686-linux-android + xarch="i686" + sixtyfour=OFF ;; "x86_64") - target_host=x86_64-linux-android - xarch="x86-64" - sixtyfour=ON + target_host=x86_64-linux-android + xarch="x86-64" + sixtyfour=ON ;; *) - exit 16 + exit 16 ;; esac - OUTPUT_DIR=$base_dir/build/$build_type.$arch + OUTPUT_DIR=$base_dir/build/$build_type.$arch - mkdir -p $OUTPUT_DIR - cd $OUTPUT_DIR + mkdir -p $OUTPUT_DIR + cd $OUTPUT_DIR - PATH=$build_root/tool/$arch/$target_host/bin:$build_root/tool/$arch/bin:$PATH \ - CC=clang CXX=clang++ cmake -D \ - BUILD_GUI_DEPS=1 -D BUILD_TESTS=OFF -D ARCH="$xarch" -D STATIC=ON -D BUILD_64=$sixtyfour -D \ - CMAKE_BUILD_TYPE=$build_type -D ANDROID=true -D BUILD_TAG="android" -D \ - BOOST_ROOT=$build_root/build/boost/$arch -D BOOST_LIBRARYDIR=$build_root/build/boost/$arch/lib -D \ - OPENSSL_ROOT_DIR=$build_root/build/openssl/$arch -D \ - OPENSSL_INCLUDE_DIR=$build_root/build/openssl/$arch/include -D \ - OPENSSL_CRYPTO_LIBRARY=$build_root/build/openssl/$arch/lib/libcrypto.so -D \ - OPENSSL_SSL_LIBRARY=$build_root/build/openssl/$arch/lib/libssl.so -D \ - CMAKE_POSITION_INDEPENDENT_CODE:BOOL=true ../.. - make -j4 wallet_api - find . -path ./lib -prune -o -name '*.a' -exec cp '{}' lib \; + PATH=$build_root/tool/$arch/$target_host/bin:$build_root/tool/$arch/bin:$PATH \ + CC=clang CXX=clang++ \ + cmake \ + -D ANDROID=true \ + -D ARCH="$xarch" \ + -D BOOST_LIBRARYDIR=$build_root/build/boost/$arch/lib \ + -D BOOST_ROOT=$build_root/build/boost/$arch \ + -D BUILD_64=$sixtyfour \ + -D BUILD_GUI_DEPS=1 \ + -D BUILD_TAG="android" \ + -D BUILD_TESTS=OFF \ + -D CMAKE_BUILD_TYPE=$build_type \ + -D CMAKE_POSITION_INDEPENDENT_CODE:BOOL=true \ + -D FORCE_USE_HEAP=1 \ + -D OPENSSL_CRYPTO_LIBRARY=$build_root/build/openssl/$arch/lib/libcrypto.so \ + -D OPENSSL_INCLUDE_DIR=$build_root/build/openssl/$arch/include \ + -D OPENSSL_ROOT_DIR=$build_root/build/openssl/$arch \ + -D OPENSSL_SSL_LIBRARY=$build_root/build/openssl/$arch/lib/libssl.so \ + -D STATIC=ON \ + $extra_cmake_flags \ + ../.. + + make -j wallet_api + find . -path ./lib -prune -o -name '*.a' -exec cp '{}' lib \; TARGET_LIB_DIR=$build_root/build/monero/$arch/lib rm -rf $TARGET_LIB_DIR @@ -66,8 +79,9 @@ for arch in ${archs[@]}; do TARGET_INC_DIR=$build_root/build/monero/include rm -rf $TARGET_INC_DIR mkdir -p $TARGET_INC_DIR - cp -a ../../src/wallet/api/wallet2_api.h $TARGET_INC_DIR + cp -a ../../src/wallet/api/wallet2_api.h $TARGET_INC_DIR - cd $base_dir + cd $base_dir done + exit 0