-
-
Notifications
You must be signed in to change notification settings - Fork 55
/
binding.gyp
43 lines (42 loc) · 1.94 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
{
'targets':
[
{
# Needed declarations for the target
'target_name': 'BluetoothSerialPort',
'conditions': [
[ 'OS=="freebsd" or OS=="openbsd" or OS=="solaris" or (OS=="linux")', {
'sources': [ 'src/linux/BluetoothSerialPort.cc', 'src/linux/DeviceINQ.cc', 'src/linux/BTSerialPortBinding.cc' ],
'include_dirs' : [ "<!(node -e \"require('nan')\")", 'src' ],
'libraries': ['-lbluetooth'],
'cflags':['-std=c++11']
}],
[ 'OS=="mac"', {
'sources': ['src/osx/DeviceINQ.mm', 'src/osx/BluetoothWorker.mm', 'src/osx/pipe.c', 'src/osx/BluetoothDeviceResources.mm', 'src/osx/BluetoothSerialPort.mm', 'src/osx/BTSerialPortBinding.mm'],
'include_dirs' : [ "<!(node -e \"require('nan')\")", 'src', 'src/osx' ],
'libraries':['-framework Foundation', '-framework IOBluetooth', '-fobjc-arc'],
'cflags!': [ '-fno-exceptions' ],
'cflags_cc!': [ '-fno-exceptions' ],
'xcode_settings': { 'GCC_ENABLE_CPP_EXCEPTIONS': 'YES', 'OTHER_CFLAGS': [ '-Wno-unused-function' ] }
}],
[ 'OS=="win"', {
'sources': [ 'src/windows/BluetoothSerialPort.cc', 'src/windows/DeviceINQ.cc', 'src/windows/BTSerialPortBinding.cc', 'src/windows/BluetoothHelpers.cc' ],
'include_dirs' : [ "<!(node -e \"require('nan')\")", 'src', 'src/windows' ],
'libraries': [ '-lkernel32.lib', '-luser32.lib', '-lWs2_32.lib' ]
}],
]
},
{
# Needed declarations for the target
'target_name': 'BluetoothSerialPortServer',
'conditions': [
[ 'OS=="freebsd" or OS=="openbsd" or OS=="solaris" or (OS=="linux")', {
'sources': [ 'src/linux/BluetoothSerialPortServer.cc', 'src/linux/BTSerialPortBindingServer.cc'],
'include_dirs' : [ "<!(node -e \"require('nan')\")", 'src' ],
'libraries': ['-lbluetooth'],
'cflags':['-std=gnu++0x']
}],
]
}
] # end targets
}