diff options
author | psychocrypt <psychocrypt@users.noreply.github.com> | 2017-09-29 20:32:31 +0200 |
---|---|---|
committer | psychocrypt <psychocrypt@users.noreply.github.com> | 2017-09-30 23:46:08 +0200 |
commit | cc429b68fadc502b981fd0acd64a5ff6e2ae1d15 (patch) | |
tree | 3fb23fc4db15dbdd08af4c7ea20134b9d82e58fd /doc | |
parent | e5b0319d5a9f58762fa934ad700113908940cb31 (diff) | |
download | xmr-stak-cc429b68fadc502b981fd0acd64a5ff6e2ae1d15.zip xmr-stak-cc429b68fadc502b981fd0acd64a5ff6e2ae1d15.tar.gz |
group files
- move source code to `src`
- categorize files and move to group folder
- change upper case class files to lower case
- change C++ header to `*.hpp`
Diffstat (limited to 'doc')
-rw-r--r-- | doc/FREEBSDCOMPILE.md | 20 | ||||
-rw-r--r-- | doc/LINUXCOMPILE.md | 52 | ||||
-rw-r--r-- | doc/WINCOMPILE.md | 74 |
3 files changed, 146 insertions, 0 deletions
diff --git a/doc/FREEBSDCOMPILE.md b/doc/FREEBSDCOMPILE.md new file mode 100644 index 0000000..230ce73 --- /dev/null +++ b/doc/FREEBSDCOMPILE.md @@ -0,0 +1,20 @@ +# Compile **xmr-stak** for FreeBSD + +## Install Dependencies + +*Note: This guide is tested for FreeBSD 11.0-RELEASE* + +From the root shell, run the following commands: + + pkg install git libmicrohttpd hwloc cmake + +Type 'y' and hit enter to proceed with installing the packages. + + git clone https://github.com/fireice-uk/xmr-stak-cpu.git + cd xmr-stak-cpu + cmake . + make + +Now you have the binary located at "bin/xmr-stak-cpu". Either move this file to your desired location or run "make install" to install it to your path. + +You can edit the prebuilt [config.txt](config.txt) file found in the root of the repository or you can make your own. This file is required to run xmr-stak-cpu. diff --git a/doc/LINUXCOMPILE.md b/doc/LINUXCOMPILE.md new file mode 100644 index 0000000..4486081 --- /dev/null +++ b/doc/LINUXCOMPILE.md @@ -0,0 +1,52 @@ +# Compile **xmr-stak** for Linux + +### GNU Compiler +``` + # Ubuntu / Debian + sudo apt install libmicrohttpd-dev libssl-dev cmake build-essential libhwloc-dev + cmake . + make install + + # Arch + sudo pacman -S base-devel hwloc openssl cmake libmicrohttpd + cmake . + make install + + # Fedora + sudo dnf install gcc gcc-c++ hwloc-devel libmicrohttpd-devel libstdc++-static make openssl-devel cmake + cmake . + make install + + # CentOS + sudo yum install centos-release-scl epel-release + sudo yum install cmake3 devtoolset-4-gcc* hwloc-devel libmicrohttpd-devel openssl-devel make + sudo scl enable devtoolset-4 bash + cmake3 . + make install + + # Ubuntu 14.04 + sudo add-apt-repository ppa:ubuntu-toolchain-r/test + sudo apt update + sudo apt install gcc-5 g++-5 make + sudo update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-5 1 --slave /usr/bin/g++ g++ /usr/bin/g++-5 + curl -L http://www.cmake.org/files/v3.4/cmake-3.4.1.tar.gz | tar -xvzf - -C /tmp/ + cd /tmp/cmake-3.4.1/ && ./configure && make && sudo make install && cd - + sudo update-alternatives --install /usr/bin/cmake cmake /usr/local/bin/cmake 1 --force + sudo apt install libmicrohttpd-dev libssl-dev libhwloc-dev + cmake . + make install +``` + +- g++ version 5.1 or higher is required for full C++11 support. CMake release compile scripts, as well as CodeBlocks build environment for debug builds is included. + +If you want to compile the binary without installing libraries / compiler or just compile binary for some other distribution, please check the [build_xmr-stak_docker.sh script](scripts/build_xmr-stak_docker/build_xmr-stak_docker.sh). + +### To do a static build for a system without gcc 5.1+ +``` + cmake -DCMAKE_LINK_STATIC=ON . + make install +``` +Note - cmake caches variables, so if you want to do a dynamic build later you need to specify '-DCMAKE_LINK_STATIC=OFF' + + + diff --git a/doc/WINCOMPILE.md b/doc/WINCOMPILE.md new file mode 100644 index 0000000..f70ecff --- /dev/null +++ b/doc/WINCOMPILE.md @@ -0,0 +1,74 @@ +# Compile **xmr-stak** for Windows + +## Install Dependencies + +### Preparation + +- open a command line `cmd` +- run `mkdir C:\xmr-stak-dep` + +### Visual Studio 2017 Community + +- download VS2017 Community and install from [https://www.visualstudio.com/downloads/](https://www.visualstudio.com/downloads/) +- during the install chose the components + - `Desktop development with C++` (left side) + - `Toolset for Visual Studio C++ 2015.3 v140...` (right side) + +### CMake for Win64 + +- download and install the latest version from [https://cmake.org/download/](https://cmake.org/download/) +- tested version: [cmake 3.9](https://cmake.org/files/v3.9/cmake-3.9.0-rc3-win64-x64.msi) +- during the install choose the option `Add CMake to the system PATH for all users` + +### Dependencies OpenSSL/Hwloc and Microhttpd + +- download the precompiled binary from [https://github.com/fireice-uk/xmr-stak-dep/releases/download/v1/xmr-stak-dep.zip](https://github.com/fireice-uk/xmr-stak-dep/releases/download/v1/xmr-stak-dep.zip) +- unzip all to `C:\xmr-stak-dep` + +### Validate the Dependency Folder + +- open a command line `cmd` +- run + ``` + cd c:\xmr-stak-dep + tree . + ``` +- the result should have the same structure + ``` + C:\xmr-stak-dep>tree . + Folder PATH listing for volume Windows + Volume serial number is XX02-XXXX + C:\XMR-STAK-DEP + ├───hwloc + │ ├───include + │ │ ├───hwloc + │ │ │ └───autogen + │ │ └───private + │ │ └───autogen + │ └───lib + ├───libmicrohttpd + │ ├───include + │ └───lib + └───openssl + ├───bin + ├───include + │ └───openssl + └───lib + ``` + +## Compile + +- download and unzip `xmr-stak-cpu` +- open the command line terminal `cmd` +- `cd` to your unzipped source code directory +- execute the following commands (NOTE: path to VS2017 can be different) + ``` + "C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\Common7\Tools\VsMSBuildCmd.bat" + set CMAKE_PREFIX_PATH=C:\xmr-stak-dep\hwloc;C:\xmr-stak-dep\libmicrohttpd;C:\xmr-stak-dep\openssl + mkdir build + cd build + cmake -G "Visual Studio 15 2017 Win64" -T v140,host=x64 .. + cmake --build . --config Release --target install + cd bin\Release + ``` +- customize your `config.txt` file by adding the pool, username and password |