-
Notifications
You must be signed in to change notification settings - Fork 4
/
binding.gyp
64 lines (63 loc) · 2.48 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
{
'variables': {'module_root%': '<!(node -p \"process.cwd()\")'},
'targets': [{
'target_name': 'dependencies',
'type': 'none',
'hard_dependency': 1,
'actions': [{
'action_name': 'prepare_dependencies',
'inputs': ['<(module_root)/scripts/node/dependencies.js'],
'outputs': ['<(module_root)/dependencies'],
'action': [
'node', '<(module_root)/scripts/node/dependencies.js'
],
'message': 'Prepare dependencies'
}]
}, {
'target_name': 'enigma',
'dependencies': [
'dependencies'
],
'sources': [
'dependencies/ed25519/src/add_scalar.c',
'dependencies/ed25519/src/fe.c',
'dependencies/ed25519/src/ge.c',
'dependencies/ed25519/src/key_exchange.c',
'dependencies/ed25519/src/keypair.c',
'dependencies/ed25519/src/sc.c',
'dependencies/ed25519/src/seed.c',
'dependencies/ed25519/src/sha512.c',
'dependencies/ed25519/src/sign.c',
'dependencies/ed25519/src/verify.c',
'bindings/node/ed25519.cc',
'bindings/node/rsa.cc',
'bindings/node/init.cc'
],
'include_dirs': [
'<!@(node -p \"require(\'node-addon-api\').include\")',
'dependencies/ed25519/src'
],
'defines': [
'NAPI_DISABLE_CPP_EXCEPTIONS'
],
'conditions': [
['OS=="mac"', {
'include_dirs': ['<(module_root)/dependencies/openssl/include'],
'libraries': ['-Wl,<(module_root)/dependencies/openssl/libcrypto.a'],
'defines': [
'CFLAGS=<!(node -p \"require(\'process\').env.MACOS_DEPLOYMENT_TARGET\") ',
'CPPFLAGS=<!(node -p \"require(\'process\').env.MACOS_DEPLOYMENT_TARGET\") ',
'LDFLAGS=<!(node -p \"require(\'process\').env.MACOS_DEPLOYMENT_TARGET\") '
]
}],
['OS=="linux"', {
'include_dirs': ['<(module_root)/dependencies/openssl/include'],
'libraries': ['-L<(module_root)/dependencies/openssl', '-l:libcrypto.a', '-static-libstdc++']
}],
['OS=="win"', {
'include_dirs': ['<(module_root)/dependencies/openssl/include'],
'libraries': ['-l<(module_root)/dependencies/openssl/libcrypto.lib']
}]
]
}]
}