-
Notifications
You must be signed in to change notification settings - Fork 19
/
Copy pathbinding.gyp
88 lines (88 loc) · 1.9 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
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
{
"variables": {
"hs_endian%": "<!(./scripts/get endian)",
"hs_cudahas%": "<!(./scripts/get cuda_has)",
"hs_cudalib%": "<!(./scripts/get cuda_lib)",
"hs_network%": "<!(./scripts/get network)",
"hs_oclhas%": "<!(./scripts/get ocl_has)",
"hs_os%": "<!(./scripts/get os)"
},
"targets": [{
"target_name": "hsminer",
"sources": [
"./src/node/hs-miner.cc",
"./src/blake2b.c",
"./src/sha3.c",
"./src/header.c",
"./src/verify.cc",
"./src/opencl.c",
"./src/simple.cc",
"./src/utils.c"
],
"cflags": [
"-Wall",
"-Wno-implicit-fallthrough",
"-Wno-uninitialized",
"-Wno-unused-function",
"-Wno-unused-value",
"-Wextra",
"-O3"
],
"cflags_c": [
"-std=c99"
],
"cflags_cc+": [
"-std=c++11",
"-Wno-maybe-uninitialized",
"-Wno-cast-function-type",
"-Wno-unused-parameter",
"-Wno-unknown-warning-option"
],
"include_dirs": [
"<!(node -e \"require('nan')\")"
],
"defines": [
"HS_NETWORK=<(hs_network)",
"ATOMIC"
],
"conditions": [
["hs_endian=='little'", {
"defines": [
"HS_LITTLE_ENDIAN"
]
}, {
"defines": [
"HS_BIG_ENDIAN"
]
}],
["hs_cudahas==1", {
"defines": [
"HS_HAS_CUDA"
],
"libraries": [
"<(module_root_dir)/src/device.a",
"<(module_root_dir)/src/cuda.a",
"-L<(hs_cudalib)",
"-lcudart"
]
}],
["hs_oclhas==1", {
"defines": [
"HS_HAS_OPENCL"
],
"conditions": [
["hs_os=='linux'", {
"libraries": [
"-lOpenCL"
]
}],
["hs_os=='mac'", {
"libraries": [
"-framework OpenCL"
]
}]
],
}]
]
}]
}