From e417cd42730df0fe257a62e95dbac762385e1840 Mon Sep 17 00:00:00 2001 From: Benjamin Burns Date: Mon, 13 Apr 2020 14:51:51 -0700 Subject: [PATCH] fix small issue in build script, add README.md (#3) Signed-off-by: Ben Burns <803016+benjamincburns@users.noreply.github.com> --- README.md | 31 +++++++++++++++++++++++++++++++ build.sh | 7 ++++--- 2 files changed, 35 insertions(+), 3 deletions(-) create mode 100644 README.md diff --git a/README.md b/README.md new file mode 100644 index 00000000..f88310cb --- /dev/null +++ b/README.md @@ -0,0 +1,31 @@ +# Besu Native + +This repository contains scripts and tooling that is used to build and package the native libraries used by Hyperledger Besu. + +## Prerequisites + +### Linux + +You'll need to be sure that gcc, make, autoconf, automake, and libtool are installed. If you are building on Ubuntu or Debian, the following command will install these dependencies for you: + +``` +sudo apt-get install build-essential automake autoconf libtool +``` + +### OS X + +You'll need to be sure that XCode Command Line Tools, make, autoconf, automake, and libtool are installed. The easiest way to do this is to install [Homebrew](https://brew.sh/), and then run the following command. Note that installing Homebrew will automatically install the XCode command line tools. + +``` +brew install autoconf automake libtool +``` + +### Windows + +TBD + +## Building + +1. This repository builds native libraries from source that is included as git submodules. To be sure that you have cloned those submodules into the appropriate locations, run `git submodule update` +2. The build steps are entirely contained within the `build.sh` script at the repository root. Simply run this script, and all of the native modules contained herin will be configured with the correct build options for Hyperledger Besu, and built. + diff --git a/build.sh b/build.sh index b321748d..7681efef 100755 --- a/build.sh +++ b/build.sh @@ -50,10 +50,11 @@ cd "$SCRIPTDIR/secp256k1/bitcoin-core-secp256k1" # delete old build dir, if exists rm -rf "$SCRIPTDIR/secp256k1/built" || true +if [[ -e Makefile ]]; then + make clean +fi - -make clean && \ - ./autogen.sh && \ +./autogen.sh && \ ./configure --prefix="$SCRIPTDIR/secp256k1/built" $SECP256K1_BUILD_OPTS && \ make -j $CORE_COUNT && \ make -j $CORE_COUNT install