build script copies boost and openssl static libraries

This commit is contained in:
woodser
2020-08-05 23:11:14 -04:00
parent 68297fdbcd
commit 9f4e35a1e6
2 changed files with 21 additions and 4 deletions
-2
View File
@@ -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.<br>
Unix: `./config && make`
3. Copy libcrypto.a and libssl.a to ./external-libs/openssl<br>
3. Set up hidapi
1. Download the latest hidapi source code from https://github.com/signal11/hidapi.
2. Build hidapi for your system.<br>
+21 -2
View File
@@ -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 .. &&