-
Notifications
You must be signed in to change notification settings - Fork 15
/
binding.gyp
executable file
·90 lines (79 loc) · 2.07 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
79
80
81
82
83
84
85
86
87
88
89
90
{
'targets': [
# npool .node
{
'target_name': 'npool',
# only use windows delayed load hook for iojs versions
'win_delay_load_hook': "<!(node -e \"var v = process.version.substring(1,2); console.log(v > 0 && v < 4);\")",
'sources': [
'npool.cc',
'./source/thread.cc',
'./source/file_manager.cc',
'./source/json_utility.cc',
'./source/callback_queue.cc',
'./source/utilities.cc',
'./source/nrequire.cc',
'./source/isolate_context.cc'
],
'include_dirs': [
'./threadpool',
'./source',
'./source/v8',
"<!(node -e \"require('nan')\")"
],
'dependencies': [
'threadpool'
],
'conditions': [
['OS=="linux"', {
'cflags': [
'-std=c++0x'
]
}],
['OS=="mac"', {
'cflags': [
'-std=c++11',
'-stdlib=libc++'
]
}],
['OS=="win"', {
'include_dirs': [
'./threadpool',
'./source',
'./node_modules/nan'
],
}],
]
},
# thread pool library
{
'target_name': 'threadpool',
'win_delay_load_hook': 'false',
'type': 'static_library',
'include_dirs': [
'./threadpool'
],
'sources': [
'./threadpool/synchronize.c',
'./threadpool/task_queue.c',
'./threadpool/thread_pool.c'
],
'conditions': [
['OS=="win"', {
'defines': [
'_WIN32'
]
}],
['OS=="linux"', {
'ldflags': [
'-pthread'
]
}],
['OS=="mac"', {
'ldflags': [
'-pthread'
]
}]
]
}]
}