mirror of
https://github.com/jwinterm/xmr-stak.git
synced 2026-10-17 05:41:41 +02:00
Merge pull request #222 from fireice-uk/topic-compile-cleanup
Compile cleanup
This commit is contained in:
@@ -1,5 +1,6 @@
|
||||
bin/
|
||||
obj/
|
||||
build/
|
||||
xmr-stak-cpu.layout
|
||||
xmr-stak-cpu.depend
|
||||
config-debug.txt
|
||||
|
||||
+17
-2
@@ -50,6 +50,18 @@ set(LIBS ${LIBS} ${CMAKE_THREAD_LIBS_INIT})
|
||||
|
||||
option(MICROHTTPD_ENABLE "Enable or disable the requirement of microhttp (http deamon)" ON)
|
||||
if(MICROHTTPD_ENABLE)
|
||||
find_path(MTHD_INCLUDE_DIR
|
||||
NAMES
|
||||
microhttpd.h
|
||||
PATHS
|
||||
/opt/local
|
||||
/usr/local
|
||||
/usr
|
||||
ENV "PROGRAMFILES(X86)"
|
||||
ENV "HWLOC_ROOT"
|
||||
PATH_SUFFIXES
|
||||
include)
|
||||
|
||||
find_library(MHTD
|
||||
NAMES
|
||||
microhttpd
|
||||
@@ -62,6 +74,7 @@ if(MICROHTTPD_ENABLE)
|
||||
message(FATAL_ERROR "microhttpd NOT found: use `-DMICROHTTPD_ENABLE=OFF` to build without http deamon support")
|
||||
else()
|
||||
set(LIBS ${LIBS} ${MHTD})
|
||||
include_directories(AFTER ${MTHD_INCLUDE_DIR})
|
||||
endif()
|
||||
else()
|
||||
add_definitions("-DCONF_NO_HTTPD")
|
||||
@@ -134,8 +147,10 @@ endif()
|
||||
################################################################################
|
||||
|
||||
# activate sse2 and aes-ni
|
||||
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -msse2 -maes")
|
||||
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -msse2 -maes")
|
||||
if(NOT CMAKE_CXX_COMPILER_ID MATCHES "MSVC")
|
||||
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -msse2 -maes")
|
||||
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -msse2 -maes")
|
||||
endif()
|
||||
|
||||
# activate static libgcc and libstdc++ linking
|
||||
if(CMAKE_LINK_STATIC)
|
||||
|
||||
+2
-2
@@ -2,7 +2,7 @@
|
||||
|
||||
## Install Dependencies
|
||||
|
||||
*Note: This guide is tested for FreeBSD 11.0-RELEASE using the 'dev' branch*
|
||||
*Note: This guide is tested for FreeBSD 11.0-RELEASE*
|
||||
|
||||
From the root shell, run the following commands:
|
||||
|
||||
@@ -17,4 +17,4 @@ Type 'y' and hit enter to proceed with installing the packages.
|
||||
|
||||
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.
|
||||
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.
|
||||
|
||||
@@ -0,0 +1,38 @@
|
||||
# Compile **xmr-stak** for Linux
|
||||
|
||||
### GNU Compiler
|
||||
```
|
||||
# Ubuntu / Debian
|
||||
sudo apt-get 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 openssl-devel cmake
|
||||
cmake .
|
||||
make install
|
||||
|
||||
# CentOS
|
||||
sudo yum install centos-release-scl cmake3 hwloc-devel libmicrohttpd-devel openssl-devel
|
||||
sudo yum install devtoolset-4-gcc*
|
||||
sudo scl enable devtoolset-4 bash
|
||||
cmake3 .
|
||||
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.
|
||||
|
||||
### 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'
|
||||
|
||||
|
||||
|
||||
@@ -41,42 +41,12 @@ xXl2Nm/u3cPP/eQVrZz5H8eACwIv+LL1EV+9uLanWUa+IO5hHr3KElvKNKD6vN0=
|
||||
=vGQV
|
||||
-----END PGP SIGNATURE-----
|
||||
```
|
||||
## Compile for Windows
|
||||
## Compile guides
|
||||
|
||||
- see [WINCOMPILE.md](WINCOMPILE.md)
|
||||
- [Free BSD](FREEBSDCOMPILE.md)
|
||||
- [Linux](LINUXCOMPILE.md)
|
||||
- [Windows](WINCOMPILE.md)
|
||||
|
||||
## Compile on Linux
|
||||
|
||||
### GNU Compiler
|
||||
```
|
||||
# Ubuntu / Debian
|
||||
sudo apt-get install libmicrohttpd-dev libssl-dev cmake build-essential libhwloc-dev
|
||||
cmake .
|
||||
|
||||
# Fedora
|
||||
sudo dnf install gcc gcc-c++ hwloc-devel libmicrohttpd-devel openssl-devel cmake
|
||||
cmake .
|
||||
|
||||
# CentOS
|
||||
sudo yum install centos-release-scl cmake3 hwloc-devel libmicrohttpd-devel openssl-devel
|
||||
sudo yum install devtoolset-4-gcc*
|
||||
sudo scl enable devtoolset-4 bash
|
||||
cmake3 .
|
||||
|
||||
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.
|
||||
|
||||
### 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'
|
||||
|
||||
|
||||
You can find a complete compile guide under [Advanced Compile Options](#advanced-compile-options).
|
||||
|
||||
#### CPU mining performance
|
||||
|
||||
|
||||
@@ -36,11 +36,9 @@
|
||||
|
||||
#include "webdesign.h"
|
||||
|
||||
#ifdef _WIN32
|
||||
#include "libmicrohttpd/microhttpd.h"
|
||||
#define strcasecmp _stricmp
|
||||
#else
|
||||
#include <microhttpd.h>
|
||||
#ifdef _WIN32
|
||||
#define strcasecmp _stricmp
|
||||
#endif // _WIN32
|
||||
|
||||
httpd* httpd::oInst = nullptr;
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
Reference in New Issue
Block a user