2013-04-01 11:36:59 -07:00
|
|
|
# -*- Mode: python; c-basic-offset: 4; indent-tabs-mode: nil; tab-width: 40 -*-
|
2013-02-25 12:47:20 -08:00
|
|
|
# vim: set filetype=python:
|
2013-11-17 22:29:45 -08:00
|
|
|
# This Source Code Form is subject to the terms of the Mozilla Public
|
|
|
|
# License, v. 2.0. If a copy of the MPL was not distributed with this
|
|
|
|
# file, You can obtain one at http://mozilla.org/MPL/2.0/.
|
2013-02-25 12:47:20 -08:00
|
|
|
|
2013-03-12 10:20:41 -07:00
|
|
|
if CONFIG['MOZ_B2G_BT']:
|
2013-04-23 14:54:15 -07:00
|
|
|
|
2015-04-09 06:57:40 -07:00
|
|
|
#
|
|
|
|
# Generic code
|
|
|
|
#
|
|
|
|
|
2015-04-15 02:46:33 -07:00
|
|
|
SOURCES += [
|
2015-04-20 03:56:49 -07:00
|
|
|
'BluetoothHidManager.cpp',
|
2015-04-15 02:46:33 -07:00
|
|
|
'BluetoothInterface.cpp',
|
2015-04-16 01:48:21 -07:00
|
|
|
'BluetoothInterfaceHelpers.cpp',
|
2015-04-17 08:45:05 -07:00
|
|
|
'BluetoothUtils.cpp',
|
2015-04-20 03:56:49 -07:00
|
|
|
'BluetoothUuid.cpp',
|
|
|
|
'ObexBase.cpp'
|
2015-04-15 02:46:33 -07:00
|
|
|
]
|
|
|
|
|
2015-04-20 03:56:49 -07:00
|
|
|
if CONFIG['MOZ_B2G_RIL']:
|
|
|
|
SOURCES += [
|
|
|
|
'BluetoothRilListener.cpp'
|
|
|
|
]
|
|
|
|
|
2015-06-15 18:38:50 -07:00
|
|
|
if CONFIG['MOZ_B2G_BT_API_V1']:
|
|
|
|
SOURCES += [
|
|
|
|
'bluetooth1/BluetoothAdapter.cpp',
|
|
|
|
'bluetooth1/BluetoothDevice.cpp',
|
|
|
|
'bluetooth1/BluetoothManager.cpp',
|
|
|
|
'bluetooth1/BluetoothProfileController.cpp',
|
|
|
|
'bluetooth1/BluetoothPropertyContainer.cpp',
|
|
|
|
'bluetooth1/BluetoothReplyRunnable.cpp',
|
|
|
|
'bluetooth1/BluetoothService.cpp',
|
|
|
|
'bluetooth1/ipc/BluetoothChild.cpp',
|
|
|
|
'bluetooth1/ipc/BluetoothParent.cpp',
|
|
|
|
'bluetooth1/ipc/BluetoothServiceChildProcess.cpp',
|
|
|
|
]
|
|
|
|
LOCAL_INCLUDES += [
|
|
|
|
'bluetooth1',
|
|
|
|
'bluetooth1/ipc',
|
|
|
|
]
|
|
|
|
DEFINES['MOZ_B2G_BT_API_V1'] = True
|
|
|
|
else:
|
2015-04-09 06:57:40 -07:00
|
|
|
SOURCES += [
|
|
|
|
'bluetooth2/BluetoothAdapter.cpp',
|
|
|
|
'bluetooth2/BluetoothClassOfDevice.cpp',
|
|
|
|
'bluetooth2/BluetoothDevice.cpp',
|
|
|
|
'bluetooth2/BluetoothDiscoveryHandle.cpp',
|
|
|
|
'bluetooth2/BluetoothGatt.cpp',
|
|
|
|
'bluetooth2/BluetoothGattCharacteristic.cpp',
|
|
|
|
'bluetooth2/BluetoothGattDescriptor.cpp',
|
|
|
|
'bluetooth2/BluetoothGattService.cpp',
|
2015-05-04 03:59:02 -07:00
|
|
|
'bluetooth2/BluetoothLeDeviceEvent.cpp',
|
2015-04-09 06:57:40 -07:00
|
|
|
'bluetooth2/BluetoothManager.cpp',
|
|
|
|
'bluetooth2/BluetoothPairingHandle.cpp',
|
|
|
|
'bluetooth2/BluetoothPairingListener.cpp',
|
|
|
|
'bluetooth2/BluetoothProfileController.cpp',
|
|
|
|
'bluetooth2/BluetoothReplyRunnable.cpp',
|
|
|
|
'bluetooth2/BluetoothService.cpp',
|
|
|
|
'bluetooth2/ipc/BluetoothChild.cpp',
|
|
|
|
'bluetooth2/ipc/BluetoothParent.cpp',
|
|
|
|
'bluetooth2/ipc/BluetoothServiceChildProcess.cpp',
|
|
|
|
]
|
|
|
|
LOCAL_INCLUDES += [
|
|
|
|
'bluetooth2',
|
|
|
|
'bluetooth2/ipc',
|
|
|
|
]
|
2013-04-23 14:54:15 -07:00
|
|
|
|
2015-04-09 06:57:40 -07:00
|
|
|
#
|
|
|
|
# Bluetooth backends
|
|
|
|
#
|
2015-04-09 06:57:40 -07:00
|
|
|
|
2013-10-22 23:12:24 -07:00
|
|
|
if CONFIG['MOZ_WIDGET_TOOLKIT'] == 'gonk':
|
|
|
|
if CONFIG['MOZ_B2G_BT_BLUEZ']:
|
2014-07-24 08:55:33 -07:00
|
|
|
CXXFLAGS += CONFIG['MOZ_DBUS_CFLAGS']
|
2013-10-24 16:23:05 -07:00
|
|
|
SOURCES += [
|
2013-11-20 00:19:08 -08:00
|
|
|
'bluez/BluetoothA2dpManager.cpp',
|
2014-02-24 18:38:51 -08:00
|
|
|
'bluez/BluetoothDBusService.cpp',
|
2013-11-17 22:29:45 -08:00
|
|
|
'bluez/BluetoothHfpManager.cpp',
|
2013-11-28 22:18:04 -08:00
|
|
|
'bluez/BluetoothOppManager.cpp',
|
|
|
|
'bluez/BluetoothSocket.cpp',
|
2014-11-28 02:49:40 -08:00
|
|
|
'bluez/BluetoothUnixSocketConnector.cpp'
|
2013-10-22 23:12:24 -07:00
|
|
|
]
|
2013-11-17 22:29:45 -08:00
|
|
|
LOCAL_INCLUDES += [
|
|
|
|
'bluez',
|
2013-10-22 23:12:24 -07:00
|
|
|
]
|
2013-11-27 05:55:07 -08:00
|
|
|
DEFINES['MOZ_B2G_BT_BLUEZ'] = True
|
2013-11-17 22:29:45 -08:00
|
|
|
elif CONFIG['MOZ_B2G_BT_BLUEDROID']:
|
2013-10-24 16:23:05 -07:00
|
|
|
SOURCES += [
|
2014-09-11 03:23:02 -07:00
|
|
|
'bluedroid/BluetoothA2dpHALInterface.cpp',
|
2013-11-20 00:19:08 -08:00
|
|
|
'bluedroid/BluetoothA2dpManager.cpp',
|
2014-09-11 03:23:02 -07:00
|
|
|
'bluedroid/BluetoothAvrcpHALInterface.cpp',
|
2014-12-11 01:53:14 -08:00
|
|
|
'bluedroid/BluetoothDaemonA2dpInterface.cpp',
|
2015-01-07 02:32:05 -08:00
|
|
|
'bluedroid/BluetoothDaemonAvrcpInterface.cpp',
|
2015-05-19 04:28:46 -07:00
|
|
|
'bluedroid/BluetoothDaemonConnector.cpp',
|
2015-05-27 01:52:00 -07:00
|
|
|
'bluedroid/BluetoothDaemonGattInterface.cpp',
|
2014-11-24 00:02:31 -08:00
|
|
|
'bluedroid/BluetoothDaemonHandsfreeInterface.cpp',
|
2014-11-03 04:03:49 -08:00
|
|
|
'bluedroid/BluetoothDaemonHelpers.cpp',
|
|
|
|
'bluedroid/BluetoothDaemonInterface.cpp',
|
|
|
|
'bluedroid/BluetoothDaemonSetupInterface.cpp',
|
2014-11-03 04:03:49 -08:00
|
|
|
'bluedroid/BluetoothDaemonSocketInterface.cpp',
|
2015-04-23 01:43:51 -07:00
|
|
|
'bluedroid/BluetoothGattHALInterface.cpp',
|
2014-09-11 03:23:02 -07:00
|
|
|
'bluedroid/BluetoothHALHelpers.cpp',
|
2014-09-11 03:23:01 -07:00
|
|
|
'bluedroid/BluetoothHALInterface.cpp',
|
2014-09-11 03:23:02 -07:00
|
|
|
'bluedroid/BluetoothHandsfreeHALInterface.cpp',
|
2013-11-28 22:18:04 -08:00
|
|
|
'bluedroid/BluetoothOppManager.cpp',
|
2015-05-12 19:52:58 -07:00
|
|
|
'bluedroid/BluetoothPbapManager.cpp',
|
2014-02-24 18:38:51 -08:00
|
|
|
'bluedroid/BluetoothServiceBluedroid.cpp',
|
2013-11-28 22:18:04 -08:00
|
|
|
'bluedroid/BluetoothSocket.cpp',
|
2014-09-11 03:23:02 -07:00
|
|
|
'bluedroid/BluetoothSocketHALInterface.cpp',
|
2014-11-28 02:49:40 -08:00
|
|
|
'bluedroid/BluetoothSocketMessageWatcher.cpp'
|
2013-11-17 22:29:45 -08:00
|
|
|
]
|
|
|
|
LOCAL_INCLUDES += [
|
|
|
|
'bluedroid',
|
2013-04-23 14:54:15 -07:00
|
|
|
]
|
2014-02-24 19:37:37 -08:00
|
|
|
|
|
|
|
if CONFIG['MOZ_B2G_RIL']:
|
|
|
|
SOURCES += [
|
|
|
|
'bluedroid/hfp/BluetoothHfpManager.cpp',
|
|
|
|
]
|
|
|
|
LOCAL_INCLUDES += [
|
|
|
|
'bluedroid/hfp',
|
|
|
|
]
|
|
|
|
else:
|
|
|
|
SOURCES += [
|
|
|
|
'bluedroid/hfp-fallback/BluetoothHfpManager.cpp',
|
|
|
|
]
|
|
|
|
LOCAL_INCLUDES += [
|
|
|
|
'bluedroid/hfp-fallback',
|
|
|
|
]
|
2015-06-15 18:38:50 -07:00
|
|
|
if not CONFIG['MOZ_B2G_BT_API_V1']:
|
2015-04-09 06:57:40 -07:00
|
|
|
SOURCES += [
|
|
|
|
'bluedroid/BluetoothGattManager.cpp',
|
|
|
|
]
|
2014-02-24 19:37:37 -08:00
|
|
|
|
2013-11-27 05:55:07 -08:00
|
|
|
DEFINES['MOZ_B2G_BT_BLUEDROID'] = True
|
2014-11-03 04:03:48 -08:00
|
|
|
if CONFIG['MOZ_B2G_BT_DAEMON']:
|
|
|
|
DEFINES['MOZ_B2G_BT_DAEMON'] = True
|
2013-11-17 22:29:45 -08:00
|
|
|
elif CONFIG['MOZ_ENABLE_DBUS']:
|
2014-07-24 08:55:33 -07:00
|
|
|
CFLAGS += CONFIG['MOZ_DBUS_CFLAGS']
|
|
|
|
CFLAGS += CONFIG['MOZ_DBUS_GLIB_CFLAGS']
|
|
|
|
CXXFLAGS += CONFIG['MOZ_DBUS_CFLAGS']
|
|
|
|
CXXFLAGS += CONFIG['MOZ_DBUS_GLIB_CFLAGS']
|
2013-11-17 22:29:45 -08:00
|
|
|
SOURCES += [
|
2014-02-24 18:38:51 -08:00
|
|
|
'bluez/BluetoothDBusService.cpp',
|
2013-11-17 22:29:45 -08:00
|
|
|
'bluez/BluetoothHfpManager.cpp',
|
|
|
|
]
|
|
|
|
LOCAL_INCLUDES += [
|
|
|
|
'bluez',
|
|
|
|
]
|
2013-11-27 05:55:07 -08:00
|
|
|
DEFINES['MOZ_BLUETOOTH_DBUS'] = True
|
2014-02-22 18:42:12 -08:00
|
|
|
DEFINES['HAVE_PTHREADS'] = True
|
2013-04-23 14:54:15 -07:00
|
|
|
|
2014-07-22 16:37:51 -07:00
|
|
|
FINAL_LIBRARY = 'xul'
|
2013-11-18 18:47:14 -08:00
|
|
|
|
2015-04-09 06:57:40 -07:00
|
|
|
#
|
|
|
|
# Exported interfaces
|
|
|
|
#
|
2013-04-16 12:24:43 -07:00
|
|
|
|
2015-04-14 01:26:06 -07:00
|
|
|
EXPORTS.mozilla.dom.bluetooth += [
|
|
|
|
'BluetoothCommon.h'
|
|
|
|
]
|
|
|
|
|
2015-06-15 18:38:50 -07:00
|
|
|
if CONFIG['MOZ_B2G_BT_API_V1']:
|
|
|
|
EXPORTS.mozilla.dom.bluetooth.ipc += [
|
|
|
|
'bluetooth1/ipc/BluetoothMessageUtils.h',
|
|
|
|
]
|
|
|
|
EXPORTS.mozilla.dom.bluetooth += [
|
|
|
|
'bluetooth1/BluetoothAdapter.h',
|
|
|
|
'bluetooth1/BluetoothDevice.h',
|
|
|
|
'bluetooth1/BluetoothManager.h',
|
|
|
|
]
|
|
|
|
IPDL_SOURCES += [
|
|
|
|
'bluetooth1/ipc/BluetoothTypes.ipdlh',
|
|
|
|
'bluetooth1/ipc/PBluetooth.ipdl',
|
|
|
|
'bluetooth1/ipc/PBluetoothRequest.ipdl',
|
|
|
|
]
|
|
|
|
else:
|
2015-04-09 06:57:40 -07:00
|
|
|
EXPORTS.mozilla.dom.bluetooth.ipc += [
|
|
|
|
'bluetooth2/ipc/BluetoothMessageUtils.h',
|
|
|
|
]
|
|
|
|
EXPORTS.mozilla.dom.bluetooth += [
|
|
|
|
'bluetooth2/BluetoothAdapter.h',
|
|
|
|
'bluetooth2/BluetoothClassOfDevice.h',
|
|
|
|
'bluetooth2/BluetoothDevice.h',
|
|
|
|
'bluetooth2/BluetoothDiscoveryHandle.h',
|
|
|
|
'bluetooth2/BluetoothGatt.h',
|
|
|
|
'bluetooth2/BluetoothGattCharacteristic.h',
|
|
|
|
'bluetooth2/BluetoothGattDescriptor.h',
|
|
|
|
'bluetooth2/BluetoothGattService.h',
|
2015-05-04 03:59:02 -07:00
|
|
|
'bluetooth2/BluetoothLeDeviceEvent.h',
|
2015-04-09 06:57:40 -07:00
|
|
|
'bluetooth2/BluetoothManager.h',
|
|
|
|
'bluetooth2/BluetoothPairingHandle.h',
|
|
|
|
'bluetooth2/BluetoothPairingListener.h',
|
|
|
|
]
|
|
|
|
IPDL_SOURCES += [
|
|
|
|
'bluetooth2/ipc/BluetoothTypes.ipdlh',
|
|
|
|
'bluetooth2/ipc/PBluetooth.ipdl',
|
|
|
|
'bluetooth2/ipc/PBluetoothRequest.ipdl',
|
|
|
|
]
|
2013-08-21 23:55:59 -07:00
|
|
|
|
|
|
|
FAIL_ON_WARNINGS = True
|
|
|
|
|
2013-10-23 14:20:55 -07:00
|
|
|
LOCAL_INCLUDES += [
|
|
|
|
'../base',
|
2014-08-27 10:13:39 -07:00
|
|
|
'../network',
|
2013-10-23 14:20:55 -07:00
|
|
|
'../system/gonk',
|
|
|
|
]
|
2013-10-02 10:17:55 -07:00
|
|
|
|
2013-10-23 14:20:55 -07:00
|
|
|
include('/ipc/chromium/chromium-config.mozbuild')
|