mirror of
https://github.com/Such-Software/hash-wallet.git
synced 2026-10-26 06:08:40 +01:00
57 lines
1.8 KiB
Bash
Executable File
57 lines
1.8 KiB
Bash
Executable File
#!/bin/bash
|
|
source "$(cd "$(dirname "${BASH_SOURCE[0]}")/.." && pwd)/functions.sh"
|
|
|
|
# Usage: env USE_DOCKER= ./build_all.sh
|
|
|
|
set -x -e
|
|
|
|
cd "$(dirname "$0")"
|
|
|
|
../prepare_moneroc.sh
|
|
|
|
if [[ -n "${COIN:-}" ]]; then
|
|
COINS=("$COIN")
|
|
else
|
|
COINS=(monero wownero zano)
|
|
fi
|
|
|
|
if [[ -n "${TARGET:-}" ]]; then
|
|
TARGETS=("$TARGET")
|
|
else
|
|
TARGETS=(x86_64-linux-android aarch64-linux-android armv7a-linux-androideabi)
|
|
fi
|
|
|
|
for COIN in "${COINS[@]}";
|
|
do
|
|
pushd ../monero_c
|
|
monero_c_tag=$(git describe --tags)
|
|
for target in "${TARGETS[@]}"
|
|
do
|
|
if [[ -f "release/${monero_c_tag}/${target}/${COIN}_libwallet2_api_c.so" ]];
|
|
then
|
|
echo "file exist, not building monero_c for ${COIN}/$target.";
|
|
else
|
|
./build_single.sh ${COIN} $target -j$MAKE_JOB_COUNT
|
|
fi
|
|
|
|
case $target in
|
|
x86_64-linux-android)
|
|
mkdir -p ../../android/app/src/main/jniLibs/x86_64 || true
|
|
cp ../monero_c/release/${monero_c_tag}/${target}/lib${COIN}_wallet2_api_c.so ../../android/app/src/main/jniLibs/x86_64/
|
|
;;
|
|
armv7a-linux-androideabi)
|
|
mkdir -p ../../android/app/src/main/jniLibs/armeabi-v7a || true
|
|
cp ../monero_c/release/${monero_c_tag}/${target}/lib${COIN}_wallet2_api_c.so ../../android/app/src/main/jniLibs/armeabi-v7a/
|
|
;;
|
|
aarch64-linux-android)
|
|
mkdir -p ../../android/app/src/main/jniLibs/arm64-v8a || true
|
|
cp ../monero_c/release/${monero_c_tag}/${target}/lib${COIN}_wallet2_api_c.so ../../android/app/src/main/jniLibs/arm64-v8a/
|
|
;;
|
|
*)
|
|
echo "Unsupported target: $target"
|
|
exit 1;
|
|
esac
|
|
done
|
|
popd
|
|
done
|