forked from MoneroOcean/node-cryptonight-hashing
-
Notifications
You must be signed in to change notification settings - Fork 1
/
binding.gyp
31 lines (31 loc) · 1.79 KB
/
binding.gyp
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
{
"targets": [
{
"target_name": "cryptonight-hashing",
"sources": [
'<!@(uname -a | grep "x86_64" >/dev/null && echo "xmrig/crypto/asm/cnv2_main_loop.S" || echo)',
"multihashing.cc",
"xmrig/crypto/c_blake256.c",
"xmrig/crypto/c_groestl.c",
"xmrig/crypto/c_jh.c",
"xmrig/crypto/c_skein.c",
"xmrig/common/crypto/keccak.cpp"
],
"include_dirs": [
"xmrig",
"xmrig/3rdparty",
"<!(node -e \"require('nan')\")"
],
"cflags_c": [
'<!@(uname -a | grep "aarch64" >/dev/null && echo "-march=armv8-a+crypto" || (uname -a | grep "armv7" >/dev/null && echo "-mfpu=neon -flax-vector-conversions" || echo "-march=native"))',
'<!@(grep Intel /proc/cpuinfo >/dev/null && echo -DCPU_INTEL || (grep AMD /proc/cpuinfo >/dev/null && echo -DCPU_AMD || echo))>',
"-std=gnu11 -fPIC -DNDEBUG -Ofast -funroll-loops -fvariable-expansion-in-unroller -ftree-loop-if-convert-stores -fmerge-all-constants -fbranch-target-load-optimize2"
],
"cflags_cc": [
'<!@(uname -a | grep "aarch64" >/dev/null && echo "-march=armv8-a+crypto -flax-vector-conversions" || (uname -a | grep "armv7" >/dev/null && echo "-mfpu=neon -flax-vector-conversions" || echo "-march=native"))',
'<!@(grep Intel /proc/cpuinfo >/dev/null && echo -DCPU_INTEL || (grep AMD /proc/cpuinfo >/dev/null && echo -DCPU_AMD || echo))>',
"-std=gnu++11 -fPIC -DNDEBUG -Ofast -s -funroll-loops -fvariable-expansion-in-unroller -ftree-loop-if-convert-stores -fmerge-all-constants -fbranch-target-load-optimize2"
]
}
]
}