forked from paixaop/node-sodium
-
Notifications
You must be signed in to change notification settings - Fork 0
/
binding.gyp
61 lines (61 loc) · 1.83 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
{
'variables': {
'target_arch%': '<!(node -e \"var os = require(\'os\'); console.log(os.arch());\")>'
},
'targets': [
{
'target_name': 'sodium',
'sources': [
'./src/crypto_secretbox_xsalsa20poly1305.cc',
'./src/crypto_secretbox.cc',
'./src/sodium.cc',
'./src/crypto_stream.cc',
'./src/crypto_streams.cc',
'./src/helpers.cc',
'./src/randombytes.cc',
'./src/crypto_pwhash.cc',
'./src/crypto_hash.cc',
'./src/crypto_hash_sha256.cc',
'./src/crypto_hash_sha512.cc',
'./src/crypto_shorthash.cc',
'./src/crypto_shorthash_siphash24.cc',
'./src/crypto_generichash.cc',
'./src/crypto_generichash_blake2b.cc',
'./src/crypto_auth.cc',
'./src/crypto_onetimeauth.cc',
'./src/crypto_onetimeauth_poly1305.cc'
],
'include_dirs': [
'./src/include',
'./deps/build/include',
"<!(node -e \"require('nan')\")"
],
'cflags!': [ '-fno-exceptions' ],
"conditions": [
['OS=="mac"', {
"libraries": [
'../deps/build/lib/libsodium.a'
],
"variables": {
"osx_min_version": "<!(sw_vers -productVersion | awk -F \'.\' \'{print $1 \".\" $2}\')>"
},
"xcode_settings": {
"GCC_ENABLE_CPP_EXCEPTIONS": "YES",
"OTHER_CFLAGS": ["-arch x86_64 -O2 -g -flto -mmacosx-version-min=<(osx_min_version)"],
"OTHER_LDFLAGS": ["-arch x86_64 -mmacosx-version-min=<(osx_min_version) -flto"]
}
}],
['OS=="win"', {
"libraries": [
'../deps/build/lib/libsodium.lib'
]
}],
['OS=="linux"', {
"libraries": [
'../deps/build/lib/libsodium.lib'
]
}]
]
}
]
}