Permalink
Browse files

Initial import.

  • Loading branch information...
xmrig committed Apr 15, 2017
0 parents commit ed320731e9c9c0433158c99ea529f768a28a1abf
Showing with 21,078 additions and 0 deletions.
  1. +1 −0 .gitignore
  2. +127 −0 CMakeLists.txt
  3. +674 −0 LICENSE
  4. +94 −0 README.md
  5. +2 −0 algo/cryptonight/bmi2/CMakeLists.txt
  6. +72 −0 algo/cryptonight/cryptonight.h
  7. +216 −0 algo/cryptonight/cryptonight_av1_aesni.c
  8. +239 −0 algo/cryptonight/cryptonight_av1_aesni32.c
  9. +237 −0 algo/cryptonight/cryptonight_av2_aesni_wolf.c
  10. +214 −0 algo/cryptonight/cryptonight_av3_aesni_bmi2.c
  11. +151 −0 algo/cryptonight/cryptonight_av4_legacy.c
  12. +248 −0 algo/cryptonight/cryptonight_av5_aesni_experimental.c
  13. +142 −0 algo/cryptonight/cryptonight_common.c
  14. +47 −0 compat.h
  15. +23 −0 compat/jansson/CMakeLists.txt
  16. +19 −0 compat/jansson/LICENSE
  17. +446 −0 compat/jansson/dump.c
  18. +63 −0 compat/jansson/error.c
  19. +356 −0 compat/jansson/hashtable.c
  20. +176 −0 compat/jansson/hashtable.h
  21. +277 −0 compat/jansson/hashtable_seed.c
  22. +311 −0 compat/jansson/jansson.h
  23. +43 −0 compat/jansson/jansson_config.h
  24. +108 −0 compat/jansson/jansson_private.h
  25. +159 −0 compat/jansson/jansson_private_config.h
  26. +1,110 −0 compat/jansson/load.c
  27. +381 −0 compat/jansson/lookup3.h
  28. +69 −0 compat/jansson/memory.c
  29. +871 −0 compat/jansson/pack_unpack.c
  30. +111 −0 compat/jansson/strbuffer.c
  31. +34 −0 compat/jansson/strbuffer.h
  32. +145 −0 compat/jansson/strconv.c
  33. +187 −0 compat/jansson/utf.c
  34. +27 −0 compat/jansson/utf.h
  35. +1,045 −0 compat/jansson/value.c
  36. +392 −0 compat/winansi.c
  37. +32 −0 compat/winansi.h
  38. +100 −0 cpu.c
  39. +48 −0 cpu.h
  40. +170 −0 crypto/aesb.c
  41. +10 −0 crypto/aesb.h
  42. +326 −0 crypto/c_blake256.c
  43. +43 −0 crypto/c_blake256.h
  44. +360 −0 crypto/c_groestl.c
  45. +60 −0 crypto/c_groestl.h
  46. +367 −0 crypto/c_jh.c
  47. +19 −0 crypto/c_jh.h
  48. +123 −0 crypto/c_keccak.c
  49. +26 −0 crypto/c_keccak.h
  50. +2,036 −0 crypto/c_skein.c
  51. +47 −0 crypto/c_skein.h
  52. +38 −0 crypto/groestl_tables.h
  53. +24 −0 crypto/hash.c
  54. +5 −0 crypto/hash.h
  55. +50 −0 crypto/oaes_config.h
  56. +1,417 −0 crypto/oaes_lib.c
  57. +214 −0 crypto/oaes_lib.h
  58. +187 −0 crypto/skein_port.h
  59. +29 −0 donate.h
  60. +274 −0 elist.h
  61. +38 −0 memory.c
  62. +441 −0 options.c
  63. +68 −0 options.h
  64. +49 −0 persistent_memory.h
  65. +137 −0 stats.c
  66. +37 −0 stats.h
  67. +707 −0 stratum.c
  68. +76 −0 stratum.h
  69. +7 −0 test/CMakeLists.txt
  70. +44 −0 test/cryptonight/CMakeLists.txt
  71. +3 −0 test/cryptonight/bmi2/CMakeLists.txt
  72. +158 −0 test/cryptonight/cryptonight.c
  73. +95 −0 test/cryptonight/cryptonight32.c
  74. +2 −0 test/unity/CMakeLists.txt
  75. +1,446 −0 test/unity/unity.c
  76. +293 −0 test/unity/unity.h
  77. +749 −0 test/unity/unity_internals.h
  78. +64 −0 unix/cpu_unix.c
  79. +81 −0 unix/memory_unix.c
  80. +91 −0 unix/xmrig_unix.c
  81. +270 −0 util.c
  82. +43 −0 util.h
  83. +146 −0 utils/applog.c
  84. +74 −0 utils/applog.h
  85. +103 −0 utils/summary.c
  86. +29 −0 utils/summary.h
  87. +41 −0 utils/threads.h
  88. +39 −0 version.h
  89. +58 −0 win/cpu_win.c
  90. +116 −0 win/memory_win.c
  91. +84 −0 win/xmrig_win.c
  92. +610 −0 xmrig.c
  93. +57 −0 xmrig.h
@@ -0,0 +1 @@
/build
@@ -0,0 +1,127 @@
cmake_minimum_required(VERSION 3.0)
project(xmrig C)
set(HEADERS
compat.h
algo/cryptonight/cryptonight.h
elist.h
xmrig.h
version.h
options.h
cpu.h
persistent_memory.h
stratum.h
stats.h
util.h
donate.h
)
set(HEADERS_CRYPTO
crypto/c_groestl.h
crypto/c_blake256.h
crypto/c_jh.h
crypto/c_skein.h
crypto/oaes_lib.h
crypto/oaes_config.h
crypto/aesb.h
)
set(HEADERS_COMPAT
compat/winansi.h
)
set(HEADERS_UTILS
utils/applog.h
utils/threads.h
utils/summary.h
)
set(SOURCES
xmrig.c
algo/cryptonight/cryptonight_common.c
util.c
options.c
cpu.c
stratum.c
stats.c
memory.c
)
set(SOURCES_CRYPTO
crypto/c_keccak.c
crypto/c_groestl.c
crypto/c_blake256.c
crypto/c_jh.c
crypto/c_skein.c
crypto/oaes_lib.c
crypto/aesb.c
)
set(SOURCES_UTILS
utils/applog.c
utils/summary.c
)
if (WIN32)
set(SOURCES_OS win/cpu_win.c win/memory_win.c win/xmrig_win.c compat/winansi.c)
set(EXTRA_LIBS ws2_32)
add_definitions(/D_WIN32_WINNT=0x600)
else()
set(SOURCES_OS unix/cpu_unix.c unix/memory_unix.c unix/xmrig_unix.c)
set(EXTRA_LIBS pthread)
endif()
include_directories(.)
add_definitions(/DUSE_NATIVE_THREADS)
add_definitions(/D_GNU_SOURCE)
add_definitions(/DDEBUG_THREADS)
if ("${CMAKE_BUILD_TYPE}" STREQUAL "")
set(CMAKE_BUILD_TYPE Release)
endif()
#set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -maes -mbmi2")
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -maes -Wno-pointer-to-int-cast")
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_C_FLAGS_RELEASE "${CMAKE_C_FLAGS_RELEASE} -gdwarf-2")
#set(CMAKE_C_FLAGS_RELEASE "${CMAKE_C_FLAGS_RELEASE} -fprofile-generate")
#set(CMAKE_C_FLAGS_RELEASE "${CMAKE_C_FLAGS_RELEASE} -fprofile-use -fprofile-correction")
if (WIN32)
set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} -static")
endif()
include_directories(compat/jansson)
add_subdirectory(compat/jansson)
find_package(CURL REQUIRED)
if (CURL_FOUND)
include_directories(${CURL_INCLUDE_DIRS})
add_definitions(/DCURL_STATICLIB)
link_directories(${CURL_LIBRARIES})
endif()
if (CMAKE_SIZEOF_VOID_P EQUAL 8)
add_subdirectory(algo/cryptonight/bmi2)
set(CRYPTONIGHT64
algo/cryptonight/cryptonight_av1_aesni.c
algo/cryptonight/cryptonight_av2_aesni_wolf.c
algo/cryptonight/cryptonight_av4_legacy.c
algo/cryptonight/cryptonight_av5_aesni_experimental.c
)
add_executable(xmrig ${HEADERS} ${HEADERS_CRYPTO} ${SOURCES} ${SOURCES_CRYPTO} ${HEADERS_UTILS} ${SOURCES_UTILS} ${HEADERS_COMPAT} ${SOURCES_COMPAT} ${SOURCES_OS} ${CRYPTONIGHT64})
target_link_libraries(xmrig jansson curl cryptonight_av3_aesni_bmi2 ${EXTRA_LIBS})
else()
set(CRYPTONIGHT32
algo/cryptonight/cryptonight_av1_aesni32.c
algo/cryptonight/cryptonight_av4_legacy.c
)
add_executable(xmrig32 ${HEADERS} ${HEADERS_CRYPTO} ${SOURCES} ${SOURCES_CRYPTO} ${HEADERS_UTILS} ${SOURCES_UTILS} ${HEADERS_COMPAT} ${SOURCES_COMPAT} ${SOURCES_OS} ${CRYPTONIGHT32})
target_link_libraries(xmrig32 jansson -L${CURL_LIBRARIES} ${EXTRA_LIBS})
endif()
source_group("HEADERS" FILES ${HEADERS})
Oops, something went wrong.

0 comments on commit ed32073

Please sign in to comment.