From 5a606be8be6ea566569b7efe7e04b831954438ec Mon Sep 17 00:00:00 2001 From: XMRig Date: Thu, 8 Jun 2017 04:20:10 +0300 Subject: [PATCH] Move crypto/* --- CMakeLists.txt | 25 ++++++++++++++++++++++++- {crypto => src/crypto}/c_blake256.c | 0 {crypto => src/crypto}/c_blake256.h | 0 {crypto => src/crypto}/c_groestl.c | 0 {crypto => src/crypto}/c_groestl.h | 0 {crypto => src/crypto}/c_jh.c | 0 {crypto => src/crypto}/c_jh.h | 0 {crypto => src/crypto}/c_keccak.c | 0 {crypto => src/crypto}/c_keccak.h | 0 {crypto => src/crypto}/c_skein.c | 0 {crypto => src/crypto}/c_skein.h | 0 {crypto => src/crypto}/groestl_tables.h | 0 {crypto => src/crypto}/hash.h | 0 {crypto => src/crypto}/skein_port.h | 0 {crypto => src/crypto}/soft_aes.c | 0 15 files changed, 24 insertions(+), 1 deletion(-) rename {crypto => src/crypto}/c_blake256.c (100%) rename {crypto => src/crypto}/c_blake256.h (100%) rename {crypto => src/crypto}/c_groestl.c (100%) rename {crypto => src/crypto}/c_groestl.h (100%) rename {crypto => src/crypto}/c_jh.c (100%) rename {crypto => src/crypto}/c_jh.h (100%) rename {crypto => src/crypto}/c_keccak.c (100%) rename {crypto => src/crypto}/c_keccak.h (100%) rename {crypto => src/crypto}/c_skein.c (100%) rename {crypto => src/crypto}/c_skein.h (100%) rename {crypto => src/crypto}/groestl_tables.h (100%) rename {crypto => src/crypto}/hash.h (100%) rename {crypto => src/crypto}/skein_port.h (100%) rename {crypto => src/crypto}/soft_aes.c (100%) diff --git a/CMakeLists.txt b/CMakeLists.txt index 11a6d1bc..936cc9bd 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -18,6 +18,17 @@ set(HEADERS src/version.h ) +set(HEADERS_CRYPTO + src/crypto/c_blake256.h + src/crypto/c_groestl.h + src/crypto/c_jh.h + src/crypto/c_keccak.h + src/crypto/c_skein.h + src/crypto/groestl_tables.h + src/crypto/hash.h + src/crypto/skein_port.h + ) + set(SOURCES src/App.cpp src/net/Client.cpp @@ -30,6 +41,15 @@ set(SOURCES src/xmrig.cpp ) +set(SOURCES_CRYPTO + src/crypto/c_keccak.c + src/crypto/c_groestl.c + src/crypto/c_blake256.c + src/crypto/c_jh.c + src/crypto/c_skein.c + src/crypto/soft_aes.c + ) + if (WIN32) set(SOURCES_OS res/app.rc @@ -57,6 +77,9 @@ if ("${CMAKE_BUILD_TYPE}" STREQUAL "") set(CMAKE_BUILD_TYPE Release) endif() +set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -maes -Wall") +set(CMAKE_C_FLAGS_RELEASE "${CMAKE_C_FLAGS_RELEASE} -Ofast -funroll-loops -fvariable-expansion-in-unroller -ftree-loop-if-convert-stores -fmerge-all-constants -fbranch-target-load-optimize2") + set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -maes -Wall -fno-exceptions") set(CMAKE_CXX_FLAGS_RELEASE "${CMAKE_CXX_FLAGS_RELEASE} -Ofast -funroll-loops -fvariable-expansion-in-unroller -ftree-loop-if-convert-stores -fmerge-all-constants -fbranch-target-load-optimize2") #set(CMAKE_C_FLAGS_RELEASE "${CMAKE_C_FLAGS_RELEASE} -gdwarf-2") @@ -85,5 +108,5 @@ include_directories(${UV_INCLUDE_DIR}) add_subdirectory(src/3rdparty/jansson) -add_executable(xmrig ${HEADERS} ${SOURCES} ${SOURCES_OS} ${SOURCES_CPUID}) +add_executable(xmrig ${HEADERS} ${SOURCES} ${SOURCES_OS} ${SOURCES_CPUID} ${HEADERS_CRYPTO} ${SOURCES_CRYPTO}) target_link_libraries(xmrig jansson ${UV_LIBRARIES} ${EXTRA_LIBS} ${CPUID_LIB}) diff --git a/crypto/c_blake256.c b/src/crypto/c_blake256.c similarity index 100% rename from crypto/c_blake256.c rename to src/crypto/c_blake256.c diff --git a/crypto/c_blake256.h b/src/crypto/c_blake256.h similarity index 100% rename from crypto/c_blake256.h rename to src/crypto/c_blake256.h diff --git a/crypto/c_groestl.c b/src/crypto/c_groestl.c similarity index 100% rename from crypto/c_groestl.c rename to src/crypto/c_groestl.c diff --git a/crypto/c_groestl.h b/src/crypto/c_groestl.h similarity index 100% rename from crypto/c_groestl.h rename to src/crypto/c_groestl.h diff --git a/crypto/c_jh.c b/src/crypto/c_jh.c similarity index 100% rename from crypto/c_jh.c rename to src/crypto/c_jh.c diff --git a/crypto/c_jh.h b/src/crypto/c_jh.h similarity index 100% rename from crypto/c_jh.h rename to src/crypto/c_jh.h diff --git a/crypto/c_keccak.c b/src/crypto/c_keccak.c similarity index 100% rename from crypto/c_keccak.c rename to src/crypto/c_keccak.c diff --git a/crypto/c_keccak.h b/src/crypto/c_keccak.h similarity index 100% rename from crypto/c_keccak.h rename to src/crypto/c_keccak.h diff --git a/crypto/c_skein.c b/src/crypto/c_skein.c similarity index 100% rename from crypto/c_skein.c rename to src/crypto/c_skein.c diff --git a/crypto/c_skein.h b/src/crypto/c_skein.h similarity index 100% rename from crypto/c_skein.h rename to src/crypto/c_skein.h diff --git a/crypto/groestl_tables.h b/src/crypto/groestl_tables.h similarity index 100% rename from crypto/groestl_tables.h rename to src/crypto/groestl_tables.h diff --git a/crypto/hash.h b/src/crypto/hash.h similarity index 100% rename from crypto/hash.h rename to src/crypto/hash.h diff --git a/crypto/skein_port.h b/src/crypto/skein_port.h similarity index 100% rename from crypto/skein_port.h rename to src/crypto/skein_port.h diff --git a/crypto/soft_aes.c b/src/crypto/soft_aes.c similarity index 100% rename from crypto/soft_aes.c rename to src/crypto/soft_aes.c