-
Notifications
You must be signed in to change notification settings - Fork 22
/
Copy pathbinding.gyp
142 lines (136 loc) · 3.5 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
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
{
'variables': {
'module_name': 'sapnwrfc',
'library': 'shared_library',
'target_arch': 'ia32',
'output_directory': 'Release'
},
'targets': [{
'sources': [
'src/binding.cc',
'src/Common.h',
'src/Connection.h',
'src/Connection.cc',
'src/Function.h',
'src/Function.cc',
],
'target_name': '<(module_name)',
'type': '<(library)',
'product_name': '<(module_name)',
'product_extension': 'node',
'product_prefix': '',
'defines': [
'ARCH="<(target_arch)"',
'PLATFORM="<(OS)"',
'_LARGEFILE_SOURCE',
'_FILE_OFFSET_BITS=64',
'SAPwithUNICODE',
'SAPwithTHREADS',
'NDEBUG',
],
'conditions': [
[ 'OS=="win"', {
'variables': {
'nwrfcsdk_path': '<(module_root_dir)/nwrfcsdk',
},
'defines': [
'PLATFORM="win32"',
'WIN32',
'_AFXDLL',
'_CRT_NON_CONFORMING_SWPRINTFS',
'_CRT_SECURE_NO_DEPRECATE',
'_CRT_NONSTDC_NO_DEPRECATE',
'SAPonNT',
'UNICODE',
'_UNICODE'
],
'conditions': [
[ 'target_arch=="ia32"' , {
'defines' : ['_X86_']
}],
[ 'target_arch=="x64"' , {
'defines': ['_AMD64_']
}]
],
'include_dirs': [
'<!(node -e "require(\'nan\')")',
'<(nwrfcsdk_path)/include'
],
'msvs_configuration_attributes': {
'OutputDirectory': '$(SolutionDir)$(ConfigurationName)',
'IntermediateDirectory': '$(OutDir)\\obj'
},
'msvs_settings': {
'VCLinkerTool': {
'AdditionalLibraryDirectories': [ '<(nwrfcsdk_path)/lib' ],
'AdditionalDependencies': [ 'sapnwrfc.lib', 'libsapucum.lib' ]
},
},
#'libraries': [ '-lsapnwrfc.lib', '-llibsapucum.lib' ],
'product_dir': '<(output_directory)'
}],
[ 'OS=="mac"', {
'defines': [
'SAPonUNIX',
'SAPwithTHREADS',
'__NO_MATH_INLINES'
],
'conditions': [
[ 'target_arch=="ia32"' , {
'xcode_settings' : {
'ARCHS': ['i386'],
'OTHER_CFLAGS': ['-m32'],
'OTHER_CXX_FLAGS': ['-m32'],
'OTHER_LDFLAGS': ['-m32']
}
}],
[ 'target_arch=="x64"' , {
'xcode_settings' : {
'ARCHS': ['x86_64'],
'OTHER_CFLAGS': ['-m64'],
'OTHER_CXX_FLAGS': ['-m64'],
'OTHER_LDFLAGS': ['-m64']
}
}],
],
'xcode_settings': {
'GCC_OPTIMIZATION_LEVEL': '3',
'WARNING_CFLAGS!': [
'-Wall',
'-W'
]
}
}],
[ 'OS=="linux"', {
'variables': {
'nwrfcsdk_path': '<!(echo $NWRFCSDK_PATH)',
},
'conditions': [
['nwrfcsdk_path==""', {
'variables': {
'nwrfcsdk_path': '<(module_root_dir)/nwrfcsdk',
}
}]
],
'cflags!': [
'-Wall',
'-pedantic'
],
'include_dirs': [
'<!(node -e "require(\'nan\')")',
'<(nwrfcsdk_path)/include'
],
'defines': [
'SAPonUNIX',
'SAPonLIN',
'SAPwithTHREADS',
'__NO_MATH_INLINES'
],
'ldflags': [
'-L<(nwrfcsdk_path)/lib'
],
'libraries': [ '-lsapnwrfc', '-lsapucum' ]
}]
],
}] # end targets
}