forked from supranational/blst
-
Notifications
You must be signed in to change notification settings - Fork 0
/
binding.gyp
42 lines (42 loc) · 1.31 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
# All pathnames (except for INTERMEDIATE_DIR) are relative to position
# of *this* file. If it's moved, the pathnames would have to be adjusted
# accordingly. It's also advised to move and customize blst_wrap.py, the
# script responsible for generating or copying pre-generated
# blst_wrap.cpp...
{
'targets': [
{
'target_name': 'blst',
'sources': [
'<(INTERMEDIATE_DIR)/blst_wrap.cpp',
'../../src/server.c',
],
'include_dirs': [ '..' ],
'cflags': [ '-fno-builtin-memcpy' ],
'cflags_cc': [ '-fexceptions' ],
'xcode_settings': { 'GCC_ENABLE_CPP_EXCEPTIONS': 'YES' },
'msvs_settings': { 'VCCLCompilerTool': { 'ExceptionHandling': '1' } },
'conditions': [
[ 'OS=="win"', {
'sources': [ '../../build/win64/*-x86_64.asm' ],
}, {
'sources': [ '../../build/assembly.S' ],
}
],
[ 'OS=="linux"', {
'ldflags': [ '-Wl,-Bsymbolic' ],
}
],
],
'actions' : [
{
'action_name': 'blst_wrap',
'variables': { 'cmd' : [ 'blst_wrap.py', '../blst.swg' ] },
'inputs': [ '<@(cmd)' ],
'outputs': [ '<(INTERMEDIATE_DIR)/blst_wrap.cpp' ],
'action': [ 'python', '<@(cmd)', '<@(_outputs)' ],
},
],
},
]
}