-
Notifications
You must be signed in to change notification settings - Fork 10
/
binding.gyp
120 lines (119 loc) · 2.72 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
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
{
'targets' : [
{
'target_name' : 'esqlc',
'type' : 'none',
'conditions' : [
[ '(OS == "linux" or OS == "mac")', {
'actions' : [ {
'action_name' : 'esql-preprocess',
'inputs' : [
'src/esqlc.ecpp'
],
'outputs' : [
'<(SHARED_INTERMEDIATE_DIR)/src/esqlc.cpp'
],
'action' : [ 'bash', './gyp/preprocessor.sh', '<(SHARED_INTERMEDIATE_DIR)/src' ]
} ]
} ],
[ 'OS == "win"', {
'actions' : [ {
'action_name' : 'prepare',
'inputs' : [
'src/esqlc.ecpp'
],
'outputs' : [
'<(INTERMEDIATE_DIR)/src/esqlc.ec'
],
'action' : [ 'copy', 'src/esqlc.ecpp', '<(INTERMEDIATE_DIR)/src/esqlc.ec' ]
}, {
'action_name' : 'esql-preprocess',
'inputs' : [
'<(INTERMEDIATE_DIR)/src/esqlc.ec'
],
'outputs' : [
'build/esqlc.c'
],
'action' : [ 'esql', '-thread', '-e', '<@(_inputs)' ]
}, {
'action_name' : 'move',
'inputs' : [
'build/esqlc.c'
],
'outputs' : [
'<(SHARED_INTERMEDIATE_DIR)/src/esqlc.cpp'
],
'action' : [ 'move', 'build/esqlc.c', '<(SHARED_INTERMEDIATE_DIR)/src/esqlc.cpp' ]
} ]
} ]
]
},
{
'target_name' : 'ifx',
'dependencies' : [ 'esqlc' ],
'sources' : [
'src/module.cpp',
'src/ifx/ifx.cpp',
'src/ifx/workers/connect.cpp',
'src/ifx/workers/disconnect.cpp',
'src/ifx/workers/stmtprepare.cpp',
'src/ifx/workers/stmtexec.cpp',
'src/ifx/workers/stmtfree.cpp',
'src/ifx/workers/fetch.cpp',
'src/ifx/workers/cursorclose.cpp',
'<(SHARED_INTERMEDIATE_DIR)/src/esqlc.cpp',
],
'conditions' : [
[ '(OS == "linux" or OS == "mac")', {
'link_settings' : {
'libraries' : [
'-L$(INFORMIXDIR)/lib',
'-L$(INFORMIXDIR)/lib/esql',
]
}
} ],
[ 'OS == "mac"', {
'link_settings' : {
'libraries' : [
'<!@(THREADLIB=POSIX esql -static -thread -libs)'
]
},
'xcode_settings' : {
'MACOSX_DEPLOYMENT_TARGET' : '10.7'
}
} ],
[ 'OS == "linux"', {
'link_settings' : {
'libraries' : [
'<!@(THREADLIB=POSIX esql -thread -libs)'
]
}
} ],
[ 'OS == "win"', {
'link_settings' : {
'libraries' : [
'$(INFORMIXDIR)/lib/isqlt09a.lib',
'$(INFORMIXDIR)/lib/igl4n304.lib',
'$(INFORMIXDIR)/lib/iglxn304.lib',
'$(INFORMIXDIR)/lib/igo4n304.lib',
'netapi32.lib',
'wsock32.lib',
'user32.lib',
'winmm.lib',
'advapi32.lib'
]
}
} ]
],
'defines' : [
'IFX_THREAD',
'_REENTRANT'
],
'include_dirs' : [
'<!(node -e "require(\'nan\')")',
'$(INFORMIXDIR)/incl/esql',
'src'
]
}
]
}