diff --git a/README.md b/README.md index 8bc7e94..aed44c0 100644 --- a/README.md +++ b/README.md @@ -167,12 +167,10 @@ For example, [monero-java](https://github.com/monero-ecosystem/monero-java) comp 2. `cd ./external/boost-sdk/` 3. `./bootstrap.sh` 4. `./b2` - 5. Copy .a files from ./external/boost-sdk/bin.v2/libs/\*/link-static/\* to ./external-libs/boost according to CMakeLists.txt. 2. Set up OpenSSL 1. Download and extract the OpenSSL 1.1.1 source code zip from https://github.com/openssl/openssl/tree/OpenSSL_1_1_1 to ./external/openssl-sdk/. 2. Build for your system.
Unix: `./config && make` - 3. Copy libcrypto.a and libssl.a to ./external-libs/openssl
3. Set up hidapi 1. Download the latest hidapi source code from https://github.com/signal11/hidapi. 2. Build hidapi for your system.
diff --git a/bin/build_libmonero_cpp.sh b/bin/build_libmonero_cpp.sh index be622c6..69ee09f 100755 --- a/bin/build_libmonero_cpp.sh +++ b/bin/build_libmonero_cpp.sh @@ -1,11 +1,30 @@ #!/bin/sh # build monero-core dependencies +HOST_NCORES=$(nproc 2>/dev/null || shell nproc 2>/dev/null || sysctl -n hw.ncpu 2>/dev/null || echo 1) cd ./external/monero-core/ && -make release-static -j8 && +make release-static -j$HOST_NCORES && +cd ../../ + +# copy boost .a files to ./external-libs/boost +mkdir -p ./external-libs || exit 1 +mkdir -p ./external-libs/boost || exit 1 +cp ./external/boost-sdk/bin.v2/libs/chrono/build/clang-darwin-11.0/release/link-static/threading-multi/visibility-hidden/libboost_chrono.a ./external-libs/boost || exit 1 +cp ./external/boost-sdk/bin.v2/libs/date_time/build/clang-darwin-11.0/release/link-static/threading-multi/visibility-hidden/libboost_date_time.a ./external-libs/boost || exit 1 +cp ./external/boost-sdk/bin.v2/libs/filesystem/build/clang-darwin-11.0/release/link-static/threading-multi/visibility-hidden/libboost_filesystem.a ./external-libs/boost || exit 1 +cp ./external/boost-sdk/bin.v2/libs/program_options/build/clang-darwin-11.0/release/link-static/threading-multi/visibility-hidden/libboost_program_options.a ./external-libs/boost || exit 1 +cp ./external/boost-sdk/bin.v2/libs/regex/build/clang-darwin-11.0/release/link-static/threading-multi/visibility-hidden/libboost_regex.a ./external-libs/boost || exit 1 +cp ./external/boost-sdk/bin.v2/libs/serialization/build/clang-darwin-11.0/release/link-static/threading-multi/visibility-hidden/libboost_serialization.a ./external-libs/boost || exit 1 +cp ./external/boost-sdk/bin.v2/libs/serialization/build/clang-darwin-11.0/release/link-static/threading-multi/visibility-hidden/libboost_wserialization.a ./external-libs/boost || exit 1 +cp ./external/boost-sdk/bin.v2/libs/system/build/clang-darwin-11.0/release/link-static/threading-multi/visibility-hidden/libboost_system.a ./external-libs/boost || exit 1 +cp ./external/boost-sdk/bin.v2/libs/thread/build/clang-darwin-11.0/release/link-static/threadapi-pthread/threading-multi/visibility-hidden/libboost_thread.a ./external-libs/boost || exit 1 + +# copy openssl .a files to ./external-libs/boost +mkdir -p ./external-libs/openssl || exit 1 +cp ./external/openssl-sdk/libcrypto.a ./external-libs/openssl || exit 1 +cp ./external/openssl-sdk/libssl.a ./external-libs/openssl || exit 1 # build libmonero-cpp shared library -cd ../../ && mkdir -p build && cd build && cmake .. &&