build: create a standalone build script for libsecp256k1
heavily based on Electron-Cash/Electron-Cash@eda015908e
This commit is contained in:
@@ -2,16 +2,19 @@
|
||||
|
||||
set -e
|
||||
|
||||
# Lucky number
|
||||
export PYTHONHASHSEED=22
|
||||
|
||||
here="$(dirname "$(readlink -e "$0")")"
|
||||
test -n "$here" -a -d "$here" || exit
|
||||
|
||||
export CONTRIB="$here/.."
|
||||
export PROJECT_ROOT="$CONTRIB/.."
|
||||
export CACHEDIR="$here/.cache"
|
||||
export PIP_CACHE_DIR="$CACHEDIR/pip_cache"
|
||||
|
||||
export BUILD_TYPE="wine"
|
||||
export GCC_TRIPLET_HOST="i686-w64-mingw32"
|
||||
export GCC_TRIPLET_BUILD="x86_64-pc-linux-gnu"
|
||||
export GCC_STRIP_BINARIES="1"
|
||||
|
||||
. "$CONTRIB"/build_tools_util.sh
|
||||
|
||||
info "Clearing $here/build and $here/dist..."
|
||||
@@ -20,7 +23,11 @@ rm "$here"/dist/* -rf
|
||||
|
||||
mkdir -p "$CACHEDIR" "$PIP_CACHE_DIR"
|
||||
|
||||
$here/build-secp256k1.sh || fail "build-secp256k1 failed"
|
||||
if [ -f "$PROJECT_ROOT/electrum/libsecp256k1-0.dll" ]; then
|
||||
info "libsecp256k1 already built, skipping"
|
||||
else
|
||||
"$CONTRIB"/make_libsecp256k1.sh || fail "Could not build libsecp"
|
||||
fi
|
||||
|
||||
$here/prepare-wine.sh || fail "prepare-wine failed"
|
||||
|
||||
|
||||
Reference in New Issue
Block a user