From 5158f2f66bc91a09acd307fd396dc57f8115e91c Mon Sep 17 00:00:00 2001 From: xmrig Date: Wed, 14 Jun 2017 16:45:30 +0300 Subject: [PATCH] Created Build (markdown) --- Build.md | 48 ++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 48 insertions(+) create mode 100644 Build.md diff --git a/Build.md b/Build.md new file mode 100644 index 0000000..e56d287 --- /dev/null +++ b/Build.md @@ -0,0 +1,48 @@ +## Ubuntu (Debian-based distros) +``` +sudo apt-get install git build-essential cmake libuv1-dev +git clone https://github.com/xmrig/xmrig.git +cd xmrig +mkdir build +cd build +cmake .. -DCMAKE_BUILD_TYPE=Release +make +``` +### gcc 7.1 +``` +sudo add-apt-repository ppa:jonathonf/gcc-7.1 +sudo apt-get update +apt-get install gcc-7 g++-7 +``` +When run cmake manually specify C and C++ compiler: +``` +cmake .. -DCMAKE_BUILD_TYPE=Release -DCMAKE_C_COMPILER=/usr/bin/gcc-7 -DCMAKE_CXX_COMPILER=/usr/bin/g++-7 +``` + +## Windows +There two options Microsoft Visual Studio 2015+ or [MSYS2](http://www.msys2.org/) both required [libuv](https://github.com/libuv/libuv) build and cmake. + +### MSYS2 +Necessary MSYS2 packages: +``` +pacman -Sy +pacman -S mingw-w64-x86_64-gcc +pacman -S make +pacman -S mingw-w64-x86_64-cmake +pacman -S mingw-w64-x86_64-pkg-config +``` +CMake build: +``` +cmake .. -G "Unix Makefiles" -DCMAKE_BUILD_TYPE=Release -DUV_INCLUDE_DIR="c:\\libuv\include" -DUV_LIBRARY="c:\\libuv\.libs\libuv.a" +make +``` + +### Microsoft Visual Studio +``` +`cmake .. -G "Visual Studio 14 2015 Win64" -T v140_xp -DCMAKE_BUILD_TYPE=Release -DUV_INCLUDE_DIR=c:\\libuv\include -DUV_LIBRARY=c:\\libuv\Release\lib\libuv.lib` +``` + +## Optional features + +* `-DWITH_LIBCPUID=OFF` Disable libcpuid. Auto configuration of CPU after this will be very limited. +* `-DWITH_AEON=OFF` Disable CryptoNight-Lite support. \ No newline at end of file