-
Notifications
You must be signed in to change notification settings - Fork 24
/
Copy pathbinding.gyp
78 lines (78 loc) · 1.91 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
{
'variables': {
'arch': '<!(node -p "process.arch")',
},
'target_default': {
'cflags': [
'-Wall',
'-Wextra',
],
},
'targets': [
{
'target_name': 'keccak',
'type': 'static_library',
'conditions': [
['arch in ("arm64","ppc64","x64")',
# For known 64-bit architectures, use the implementation optimized for 64-bit CPUs.
{
'sources': [
'./src/libkeccak-64/KeccakSpongeWidth1600.c',
'./src/libkeccak-64/KeccakP-1600-opt64.c',
],
},
# Otherwise, use the implementation optimized for 32-bit CPUs.
{
'sources': [
'./src/libkeccak-32/KeccakSpongeWidth1600.c',
'./src/libkeccak-32/KeccakP-1600-inplace32BI.c',
],
},
],
],
},
{
'target_name': 'addon',
'dependencies': [
'keccak',
],
'sources': [
'./src/addon.cc'
],
'include_dirs': [
'<!@(node -p "require(\'node-addon-api\').include")',
],
'cflags!': [
'-fno-exceptions',
],
'cflags_cc!': [
'-fno-exceptions',
],
'defines': [
'NAPI_VERSION=3',
],
'conditions': [
['arch in ("arm64","ppc64","x64")',
# For known 64-bit architectures, use the implementation optimized for 64-bit CPUs.
{
'include_dirs': [ 'src/libkeccak-64' ],
},
# Otherwise, use the implementation optimized for 32-bit CPUs.
{
'include_dirs': [ 'src/libkeccak-32' ],
},
],
],
'xcode_settings': {
'GCC_ENABLE_CPP_EXCEPTIONS': 'YES',
'CLANG_CXX_LIBRARY': 'libc++',
'MACOSX_DEPLOYMENT_TARGET': '10.7',
},
'msvs_settings': {
'VCCLCompilerTool': {
'ExceptionHandling': 1,
},
},
},
],
}