-
Notifications
You must be signed in to change notification settings - Fork 414
/
binding.gyp
63 lines (63 loc) · 1.47 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
{
'targets': [
{
'target_name': 'ffi_bindings',
'sources': [
'src/ffi.cc'
, 'src/callback_info.cc'
, 'src/pointer.cc'
, 'src/threaded_callback_invokation.cc'
, 'src/foreign_caller.cc'
],
'include_dirs': [
'deps/libffi/include'
],
'dependencies': [
'libffi'
],
'conditions': [
['OS=="win"', {
'libraries': [
'<(module_root_dir)/deps/libffi/.libs/libffi.lib'
],
'dependencies': [
'deps/dlfcn-win32/dlfcn.gyp:dlfcn'
, 'deps/pthreads-win32/pthread.gyp:pthread'
]
}, {
'libraries': [
'<(module_root_dir)/deps/libffi/.libs/libffi.a'
],
}],
['OS=="mac"', {
'xcode_settings': {
'GCC_ENABLE_CPP_EXCEPTIONS': 'YES',
'MACOSX_DEPLOYMENT_TARGET': '10.5',
'OTHER_CFLAGS': [
'-ObjC++'
]
},
'libraries': [
'-lobjc'
],
}]
]
},
{
'target_name': 'libffi',
'type': 'none',
'actions': [
{
'action_name': 'test',
# a hack to run libffi ./configure during `node-gyp configure`
'inputs': ['<!@(sh libffi-config.sh)'],
'outputs': [''],
'action': [
# run libffi `make`
'sh', 'libffi-build.sh'
]
}
]
}
]
}