From 17589734ea52c95e8a96481b2febd1b138f7170b Mon Sep 17 00:00:00 2001 From: Czarek Nakamoto Date: Wed, 19 Feb 2025 16:08:24 +0100 Subject: Add documentation for building upstream dependencies Fix libtinfow include --- docs/Writerside/in.tree | 1 + docs/Writerside/topics/Building-Upstream.md | 35 +++++++++++++++++++++++++++++ 2 files changed, 36 insertions(+) create mode 100644 docs/Writerside/topics/Building-Upstream.md (limited to 'docs/Writerside') diff --git a/docs/Writerside/in.tree b/docs/Writerside/in.tree index b803dbb..610e0a0 100644 --- a/docs/Writerside/in.tree +++ b/docs/Writerside/in.tree @@ -14,4 +14,5 @@ + \ No newline at end of file diff --git a/docs/Writerside/topics/Building-Upstream.md b/docs/Writerside/topics/Building-Upstream.md new file mode 100644 index 0000000..a61729f --- /dev/null +++ b/docs/Writerside/topics/Building-Upstream.md @@ -0,0 +1,35 @@ +# Building Upstream + +monero_c contains its own fork of contrib/depends system that is independent of monero, wownero or zano. In order to use said build system one needs to: + +``` +pushd contrib/depends +env -i \ +PATH="$PATH" \ +CC=gcc CXX=g++ \ +make -j$(nproc) HOST=aarch64-apple-darwin +popd +``` + +Then, get path to your desired toolchain.cmake + +``` +TOOLCHAIN_FILE=${PWD}/contrib/depends/aarch64-apple-darwin/share/toolchain.cmake +``` +And finally use that as part of cmake invocation, for example to compile monero you can do the following: + +``` +pushd monero +mkdir -p build/aarch64-apple-darwin +cd $_ +cmake \ +-DCMAKE_TOOLCHAIN_FILE="$TOOLCHAIN_FILE" \ +-DBUILD_TESTS=ON \ +../.. +``` + +From there you can build targets such as wallet_api + +``` +make wallet_api -j$(nproc) +``` \ No newline at end of file -- cgit v1.2.3