forked from IBM/nodejs-idb-connector
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbinding.gyp
78 lines (77 loc) · 2.37 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
{
'targets': [
{
'target_name': 'db2ia',
"conditions": [
['OS=="aix"', {
'variables': {
'os_name': '<!(uname -s)',
},
'conditions': [
[ '"<(os_name)"=="OS400"', {
# Here we know we are really on IBM i
'include_dirs': [
'src/db2ia',
'/usr/include',
"<!@(node -p \"require('node-addon-api').include\")"
],
'sources': [
'src/db2ia/db2ia.cc',
'src/db2ia/dbconn.cc',
'src/db2ia/dbstmt.cc'
],
'cflags': [
'-std=c++0x',
'-Wno-unknown-pragmas',
'-Wno-format',
'-gxcoff',
'-O0',
'-DNAPI_DISABLE_CPP_EXCEPTIONS',
'-I/QOpenSys/pkgs/include',
'-I/QOpenSys/pkgs/include/cli'
],
'ldflags': [
'-Wl,-bbigtoc',
'-Wl,-brtl',
'-Wl,-blibpath:/QOpenSys/pkgs/lib:/QOpenSys/usr/lib:/opt/freeware/lib'
],
'link_settings': {
'libraries': [
'-L/QOpenSys/pkgs/lib:/QOpenSys/usr/lib:/opt/freeware/lib',
'-ldb400'
],
}
}],
]
}],
],
# When not on IBM i the following builds the dummy package
# os: property in package.json should prevent us from building this dummy
# unless when really on AIX or os is being ignored by npm bug
# https://github.com/silverwind/default-gateway/issues/10
# https://npm.community/t/npm-ci-ignores-the-os-field-of-package-json/5607
'include_dirs': [
'src/db2ia',
"<!@(node -p \"require('node-addon-api').include\")"
],
'sources': [
'src/db2ia/db2ia.cc',
],
'defines': [
'NAPI_DISABLE_CPP_EXCEPTIONS',
'NAPI_VERSION=<(napi_build_version)',
],
},
{
"target_name": "action_after_build",
"type": "none",
"dependencies": [ "<(module_name)" ],
"copies": [
{
"files": [ "<(PRODUCT_DIR)/<(module_name).node" ],
"destination": "<(module_path)"
}
]
}
]
}