gecko-dev/dom/bluetooth/moz.build

204 строки
6.7 KiB
Python

# -*- Mode: python; c-basic-offset: 4; indent-tabs-mode: nil; tab-width: 40 -*-
# vim: set filetype=python:
# 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/.
if CONFIG['MOZ_B2G_BT']:
#
# Generic code
#
SOURCES += [
'BluetoothHidManager.cpp',
'BluetoothInterface.cpp',
'BluetoothUtils.cpp',
'BluetoothUuid.cpp',
'ObexBase.cpp'
]
if CONFIG['MOZ_B2G_RIL']:
SOURCES += [
'BluetoothRilListener.cpp'
]
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:
SOURCES += [
'bluetooth2/BluetoothAdapter.cpp',
'bluetooth2/BluetoothClassOfDevice.cpp',
'bluetooth2/BluetoothDevice.cpp',
'bluetooth2/BluetoothDiscoveryHandle.cpp',
'bluetooth2/BluetoothGatt.cpp',
'bluetooth2/BluetoothGattCharacteristic.cpp',
'bluetooth2/BluetoothGattDescriptor.cpp',
'bluetooth2/BluetoothGattServer.cpp',
'bluetooth2/BluetoothGattService.cpp',
'bluetooth2/BluetoothLeDeviceEvent.cpp',
'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',
]
#
# Bluetooth backends
#
if CONFIG['MOZ_WIDGET_TOOLKIT'] == 'gonk':
if CONFIG['MOZ_B2G_BT_BLUEZ']:
CXXFLAGS += CONFIG['MOZ_DBUS_CFLAGS']
SOURCES += [
'bluez/BluetoothA2dpManager.cpp',
'bluez/BluetoothDBusService.cpp',
'bluez/BluetoothHfpManager.cpp',
'bluez/BluetoothOppManager.cpp',
'bluez/BluetoothSocket.cpp',
'bluez/BluetoothUnixSocketConnector.cpp'
]
LOCAL_INCLUDES += [
'bluez',
]
DEFINES['MOZ_B2G_BT_BLUEZ'] = True
elif CONFIG['MOZ_B2G_BT_DAEMON']:
SOURCES += [
'bluedroid/BluetoothA2dpManager.cpp',
'bluedroid/BluetoothDaemonA2dpInterface.cpp',
'bluedroid/BluetoothDaemonAvrcpInterface.cpp',
'bluedroid/BluetoothDaemonGattInterface.cpp',
'bluedroid/BluetoothDaemonHandsfreeInterface.cpp',
'bluedroid/BluetoothDaemonHelpers.cpp',
'bluedroid/BluetoothDaemonInterface.cpp',
'bluedroid/BluetoothDaemonSetupInterface.cpp',
'bluedroid/BluetoothDaemonSocketInterface.cpp',
'bluedroid/BluetoothOppManager.cpp',
'bluedroid/BluetoothPbapManager.cpp',
'bluedroid/BluetoothServiceBluedroid.cpp',
'bluedroid/BluetoothSocket.cpp',
'bluedroid/BluetoothSocketMessageWatcher.cpp'
]
LOCAL_INCLUDES += [
'bluedroid',
]
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',
]
if not CONFIG['MOZ_B2G_BT_API_V1']:
SOURCES += [
'bluedroid/BluetoothGattManager.cpp',
]
DEFINES['MOZ_B2G_BT_DAEMON'] = True
elif CONFIG['MOZ_ENABLE_DBUS']:
CFLAGS += CONFIG['MOZ_DBUS_CFLAGS']
CFLAGS += CONFIG['MOZ_DBUS_GLIB_CFLAGS']
CXXFLAGS += CONFIG['MOZ_DBUS_CFLAGS']
CXXFLAGS += CONFIG['MOZ_DBUS_GLIB_CFLAGS']
SOURCES += [
'bluez/BluetoothDBusService.cpp',
'bluez/BluetoothHfpManager.cpp',
]
LOCAL_INCLUDES += [
'bluez',
]
DEFINES['MOZ_BLUETOOTH_DBUS'] = True
DEFINES['HAVE_PTHREADS'] = True
FINAL_LIBRARY = 'xul'
#
# Exported interfaces
#
EXPORTS.mozilla.dom.bluetooth += [
'BluetoothCommon.h'
]
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:
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/BluetoothGattServer.h',
'bluetooth2/BluetoothGattService.h',
'bluetooth2/BluetoothLeDeviceEvent.h',
'bluetooth2/BluetoothManager.h',
'bluetooth2/BluetoothPairingHandle.h',
'bluetooth2/BluetoothPairingListener.h',
]
IPDL_SOURCES += [
'bluetooth2/ipc/BluetoothTypes.ipdlh',
'bluetooth2/ipc/PBluetooth.ipdl',
'bluetooth2/ipc/PBluetoothRequest.ipdl',
]
FAIL_ON_WARNINGS = True
LOCAL_INCLUDES += [
'../base',
'../network',
'../system/gonk',
]
include('/ipc/chromium/chromium-config.mozbuild')