mirror of
https://github.com/cake-tech/cake_wallet.git
synced 2024-12-22 19:49:22 +00:00
android: build: allow configuring build threads (#313)
This commit is contained in:
parent
5c78fd01a8
commit
3046581a91
8 changed files with 8 additions and 7 deletions
|
@ -62,7 +62,7 @@ mkdir -p ./build/release
|
||||||
cd ./build/release
|
cd ./build/release
|
||||||
CC=${CLANG} CXX=${CXXLANG} cmake -D USE_DEVICE_TREZOR=OFF -D BUILD_GUI_DEPS=1 -D BUILD_TESTS=OFF -D ARCH=${ARCH} -D STATIC=ON -D BUILD_64=${BUILD_64} -D CMAKE_BUILD_TYPE=release -D ANDROID=true -D INSTALL_VENDORED_LIBUNBOUND=ON -D BUILD_TAG=${TAG} -D CMAKE_SYSTEM_NAME="Android" -D CMAKE_ANDROID_STANDALONE_TOOLCHAIN="${ANDROID_STANDALONE_TOOLCHAIN_PATH}" -D CMAKE_ANDROID_ARCH_ABI=${ARCH_ABI} $FLAGS ../..
|
CC=${CLANG} CXX=${CXXLANG} cmake -D USE_DEVICE_TREZOR=OFF -D BUILD_GUI_DEPS=1 -D BUILD_TESTS=OFF -D ARCH=${ARCH} -D STATIC=ON -D BUILD_64=${BUILD_64} -D CMAKE_BUILD_TYPE=release -D ANDROID=true -D INSTALL_VENDORED_LIBUNBOUND=ON -D BUILD_TAG=${TAG} -D CMAKE_SYSTEM_NAME="Android" -D CMAKE_ANDROID_STANDALONE_TOOLCHAIN="${ANDROID_STANDALONE_TOOLCHAIN_PATH}" -D CMAKE_ANDROID_ARCH_ABI=${ARCH_ABI} $FLAGS ../..
|
||||||
|
|
||||||
make wallet_api -j4
|
make wallet_api -j$THREADS
|
||||||
find . -path ./lib -prune -o -name '*.a' -exec cp '{}' lib \;
|
find . -path ./lib -prune -o -name '*.a' -exec cp '{}' lib \;
|
||||||
|
|
||||||
cp -r ./lib/* $DEST_LIB_DIR
|
cp -r ./lib/* $DEST_LIB_DIR
|
||||||
|
|
|
@ -31,7 +31,7 @@ rm -rf $ICONV_SRC_DIR
|
||||||
tar -xzf $ICONV_FILE_PATH -C $WORKDIR
|
tar -xzf $ICONV_FILE_PATH -C $WORKDIR
|
||||||
cd $ICONV_SRC_DIR
|
cd $ICONV_SRC_DIR
|
||||||
CC=${CLANG} CXX=${CXXLANG} ./configure --build=x86_64-linux-gnu --host=${HOST} --prefix=${PREFIX} --disable-rpath
|
CC=${CLANG} CXX=${CXXLANG} ./configure --build=x86_64-linux-gnu --host=${HOST} --prefix=${PREFIX} --disable-rpath
|
||||||
make
|
make -j$THREADS
|
||||||
make install
|
make install
|
||||||
|
|
||||||
done
|
done
|
||||||
|
|
|
@ -61,7 +61,7 @@ mkdir -p ./build/release
|
||||||
cd ./build/release
|
cd ./build/release
|
||||||
CC=${CLANG} CXX=${CXXLANG} cmake -D USE_DEVICE_TREZOR=OFF -D BUILD_GUI_DEPS=1 -D BUILD_TESTS=OFF -D ARCH=${ARCH} -D STATIC=ON -D BUILD_64=${BUILD_64} -D CMAKE_BUILD_TYPE=release -D ANDROID=true -D INSTALL_VENDORED_LIBUNBOUND=ON -D BUILD_TAG=${TAG} -D CMAKE_SYSTEM_NAME="Android" -D CMAKE_ANDROID_STANDALONE_TOOLCHAIN="${ANDROID_STANDALONE_TOOLCHAIN_PATH}" -D CMAKE_ANDROID_ARCH_ABI=${ARCH_ABI} $FLAGS ../..
|
CC=${CLANG} CXX=${CXXLANG} cmake -D USE_DEVICE_TREZOR=OFF -D BUILD_GUI_DEPS=1 -D BUILD_TESTS=OFF -D ARCH=${ARCH} -D STATIC=ON -D BUILD_64=${BUILD_64} -D CMAKE_BUILD_TYPE=release -D ANDROID=true -D INSTALL_VENDORED_LIBUNBOUND=ON -D BUILD_TAG=${TAG} -D CMAKE_SYSTEM_NAME="Android" -D CMAKE_ANDROID_STANDALONE_TOOLCHAIN="${ANDROID_STANDALONE_TOOLCHAIN_PATH}" -D CMAKE_ANDROID_ARCH_ABI=${ARCH_ABI} $FLAGS ../..
|
||||||
|
|
||||||
make wallet_api -j4
|
make wallet_api -j$THREADS
|
||||||
find . -path ./lib -prune -o -name '*.a' -exec cp '{}' lib \;
|
find . -path ./lib -prune -o -name '*.a' -exec cp '{}' lib \;
|
||||||
|
|
||||||
cp -r ./lib/* $DEST_LIB_DIR
|
cp -r ./lib/* $DEST_LIB_DIR
|
||||||
|
|
|
@ -49,7 +49,7 @@ CC=clang ANDROID_NDK=$TOOLCHAIN \
|
||||||
--prefix=${PREFIX} \
|
--prefix=${PREFIX} \
|
||||||
--openssldir=${PREFIX} \
|
--openssldir=${PREFIX} \
|
||||||
-D__ANDROID_API__=$API
|
-D__ANDROID_API__=$API
|
||||||
make -j4
|
make -j$THREADS
|
||||||
make install
|
make install
|
||||||
|
|
||||||
done
|
done
|
||||||
|
|
|
@ -23,7 +23,7 @@ git clone https://github.com/jedisct1/libsodium.git $SODIUM_SRC_DIR -b $SODIUM_B
|
||||||
cd $SODIUM_SRC_DIR
|
cd $SODIUM_SRC_DIR
|
||||||
./autogen.sh
|
./autogen.sh
|
||||||
CC=clang CXX=clang++ ./configure --prefix=${PREFIX} --host=${HOST} --enable-static --disable-shared
|
CC=clang CXX=clang++ ./configure --prefix=${PREFIX} --host=${HOST} --enable-static --disable-shared
|
||||||
make
|
make -j$THREADS
|
||||||
make install
|
make install
|
||||||
|
|
||||||
done
|
done
|
||||||
|
|
|
@ -26,7 +26,7 @@ cd $ZMQ_SRC_DIR
|
||||||
git checkout ${ZMQ_COMMIT_HASH}
|
git checkout ${ZMQ_COMMIT_HASH}
|
||||||
./autogen.sh
|
./autogen.sh
|
||||||
CC=clang CXX=clang++ ./configure --prefix=${PREFIX} --host=${HOST} --enable-static --disable-shared
|
CC=clang CXX=clang++ ./configure --prefix=${PREFIX} --host=${HOST} --enable-static --disable-shared
|
||||||
make
|
make -j$THREADS
|
||||||
make install
|
make install
|
||||||
|
|
||||||
done
|
done
|
||||||
|
|
|
@ -8,3 +8,4 @@ export ANDROID_NDK_HOME=$ANDROID_NDK_ROOT
|
||||||
export TOOLCHAIN_DIR="${WORKDIR}/toolchain"
|
export TOOLCHAIN_DIR="${WORKDIR}/toolchain"
|
||||||
export TOOLCHAIN_BASE_DIR=$TOOLCHAIN_DIR
|
export TOOLCHAIN_BASE_DIR=$TOOLCHAIN_DIR
|
||||||
export ORIGINAL_PATH=$PATH
|
export ORIGINAL_PATH=$PATH
|
||||||
|
export THREADS=4
|
||||||
|
|
|
@ -6,4 +6,4 @@ BOOST_SRC_DIR=$3
|
||||||
|
|
||||||
cd $BOOST_SRC_DIR
|
cd $BOOST_SRC_DIR
|
||||||
|
|
||||||
./b2 --build-type=minimal link=static runtime-link=static --with-chrono --with-date_time --with-filesystem --with-program_options --with-regex --with-serialization --with-system --with-thread --with-locale --build-dir=android --stagedir=android toolset=clang threading=multi threadapi=pthread target-os=android -sICONV_PATH=${PREFIX} install
|
./b2 --build-type=minimal link=static runtime-link=static --with-chrono --with-date_time --with-filesystem --with-program_options --with-regex --with-serialization --with-system --with-thread --with-locale --build-dir=android --stagedir=android toolset=clang threading=multi threadapi=pthread target-os=android -sICONV_PATH=${PREFIX} -j$THREADS install
|
||||||
|
|
Loading…
Reference in a new issue