2013-04-01 18:36:59 +00:00
|
|
|
# -*- Mode: python; c-basic-offset: 4; indent-tabs-mode: nil; tab-width: 40 -*-
|
2013-02-25 20:47:23 +00:00
|
|
|
# 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/.
|
|
|
|
|
2013-03-12 17:17:46 +00:00
|
|
|
XPIDL_SOURCES += [
|
2013-08-14 15:40:25 +00:00
|
|
|
'gonk/nsIRecoveryService.idl',
|
2013-03-12 17:17:46 +00:00
|
|
|
]
|
|
|
|
|
2013-03-19 18:47:00 +00:00
|
|
|
MODULE = 'hal'
|
|
|
|
|
2013-04-16 19:24:43 +00:00
|
|
|
EXPORTS.mozilla += [
|
|
|
|
'Hal.h',
|
|
|
|
'HalImpl.h',
|
|
|
|
'HalSandbox.h',
|
|
|
|
'HalSensor.h',
|
|
|
|
'HalTypes.h',
|
|
|
|
'HalWakeLock.h',
|
|
|
|
]
|
|
|
|
|
2013-06-04 20:30:06 +00:00
|
|
|
TEST_DIRS += ['tests']
|
2013-04-23 21:54:15 +00:00
|
|
|
CPP_SOURCES += [
|
|
|
|
'Hal.cpp',
|
|
|
|
'HalWakeLock.cpp',
|
|
|
|
'SandboxHal.cpp',
|
|
|
|
'WindowIdentifier.cpp',
|
|
|
|
]
|
|
|
|
|
|
|
|
if CONFIG['MOZ_GAMEPAD_BACKEND'] == 'stub':
|
|
|
|
CPP_SOURCES += [
|
|
|
|
'FallbackGamepad.cpp'
|
|
|
|
]
|
|
|
|
elif CONFIG['MOZ_GAMEPAD_BACKEND'] == 'cocoa':
|
|
|
|
CPP_SOURCES += [
|
|
|
|
'CocoaGamepad.cpp'
|
|
|
|
]
|
|
|
|
elif CONFIG['MOZ_GAMEPAD_BACKEND'] == 'windows':
|
|
|
|
CPP_SOURCES += [
|
|
|
|
'WindowsGamepad.cpp'
|
|
|
|
]
|
|
|
|
elif CONFIG['MOZ_GAMEPAD_BACKEND'] == 'linux':
|
|
|
|
CPP_SOURCES += [
|
|
|
|
'LinuxGamepad.cpp'
|
|
|
|
]
|
|
|
|
|
|
|
|
if CONFIG['MOZ_WIDGET_TOOLKIT'] == 'android':
|
|
|
|
CPP_SOURCES += [
|
|
|
|
'AndroidHal.cpp',
|
|
|
|
'AndroidSensor.cpp',
|
|
|
|
'FallbackPower.cpp',
|
|
|
|
'FallbackAlarm.cpp',
|
|
|
|
]
|
|
|
|
elif CONFIG['MOZ_WIDGET_TOOLKIT'] == 'gonk':
|
|
|
|
CPP_SOURCES += [
|
|
|
|
'GonkHal.cpp',
|
|
|
|
'LinuxPower.cpp',
|
|
|
|
'GonkSensor.cpp',
|
|
|
|
'UeventPoller.cpp',
|
|
|
|
'GonkSwitch.cpp',
|
|
|
|
'GonkFMRadio.cpp',
|
|
|
|
'GonkDiskSpaceWatcher.cpp',
|
|
|
|
]
|
|
|
|
elif CONFIG['OS_TARGET'] == 'Linux':
|
|
|
|
CPP_SOURCES += [
|
|
|
|
'LinuxPower.cpp',
|
|
|
|
'FallbackScreenConfiguration.cpp',
|
|
|
|
'FallbackSensor.cpp',
|
|
|
|
'FallbackVibration.cpp',
|
|
|
|
'FallbackAlarm.cpp',
|
|
|
|
]
|
|
|
|
if CONFIG['MOZ_ENABLE_DBUS']:
|
|
|
|
CPP_SOURCES += [
|
|
|
|
'UPowerClient.cpp'
|
|
|
|
]
|
|
|
|
else:
|
|
|
|
CPP_SOURCES += [
|
|
|
|
'FallbackBattery.cpp'
|
|
|
|
]
|
|
|
|
elif CONFIG['OS_TARGET'] == 'WINNT':
|
|
|
|
CPP_SOURCES += [
|
|
|
|
'WindowsBattery.cpp',
|
|
|
|
'WindowsSensor.cpp',
|
|
|
|
'FallbackVibration.cpp',
|
|
|
|
'FallbackScreenConfiguration.cpp',
|
|
|
|
'FallbackPower.cpp',
|
|
|
|
'FallbackAlarm.cpp',
|
|
|
|
]
|
|
|
|
elif CONFIG['MOZ_WIDGET_TOOLKIT'] == 'cocoa':
|
|
|
|
CPP_SOURCES += [
|
|
|
|
'CocoaBattery.cpp',
|
|
|
|
'FallbackVibration.cpp',
|
|
|
|
'FallbackPower.cpp',
|
|
|
|
'FallbackScreenConfiguration.cpp',
|
|
|
|
'FallbackAlarm.cpp',
|
|
|
|
]
|
|
|
|
elif CONFIG['OS_TARGET'] in ('OpenBSD', 'NetBSD', 'FreeBSD', 'DragonFly'):
|
|
|
|
CPP_SOURCES += [
|
|
|
|
'FallbackSensor.cpp',
|
|
|
|
'FallbackVibration.cpp',
|
|
|
|
'FallbackPower.cpp',
|
|
|
|
'FallbackScreenConfiguration.cpp',
|
|
|
|
'FallbackAlarm.cpp',
|
|
|
|
]
|
|
|
|
if CONFIG['MOZ_ENABLE_DBUS']:
|
|
|
|
CPP_SOURCES += [
|
|
|
|
'UPowerClient.cpp'
|
|
|
|
]
|
|
|
|
else:
|
|
|
|
CPP_SOURCES += [
|
|
|
|
'FallbackBattery.cpp'
|
|
|
|
]
|
|
|
|
else:
|
|
|
|
CPP_SOURCES += [
|
|
|
|
'FallbackBattery.cpp',
|
|
|
|
'FallbackSensor.cpp',
|
|
|
|
'FallbackVibration.cpp',
|
|
|
|
'FallbackPower.cpp',
|
|
|
|
'FallbackScreenConfiguration.cpp',
|
|
|
|
'FallbackAlarm.cpp',
|
|
|
|
]
|
|
|
|
|
|
|
|
# Fallbacks for backends implemented on Gonk only.
|
|
|
|
if CONFIG['MOZ_WIDGET_TOOLKIT'] != 'gonk':
|
|
|
|
CPP_SOURCES += [
|
|
|
|
'FallbackLights.cpp',
|
|
|
|
'FallbackTime.cpp',
|
|
|
|
'FallbackWakeLocks.cpp',
|
|
|
|
'FallbackSwitch.cpp',
|
|
|
|
'FallbackScreenPower.cpp',
|
|
|
|
'FallbackProcessPriority.cpp',
|
|
|
|
'FallbackFMRadio.cpp',
|
|
|
|
'FallbackFactoryReset.cpp',
|
|
|
|
'FallbackDiskSpaceWatcher.cpp',
|
|
|
|
]
|
|
|
|
|
|
|
|
# Fallbacks for backends implemented on Android only.
|
|
|
|
if CONFIG['MOZ_WIDGET_TOOLKIT'] != 'android':
|
|
|
|
CPP_SOURCES += [
|
|
|
|
'FallbackNetwork.cpp'
|
|
|
|
]
|
2013-07-01 16:32:40 +00:00
|
|
|
|
|
|
|
if CONFIG['MOZ_WIDGET_TOOLKIT'] == 'cocoa':
|
|
|
|
CMMSRCS += [
|
|
|
|
'CocoaSensor.mm',
|
|
|
|
'smslib.mm',
|
|
|
|
]
|
2013-07-01 13:56:28 +00:00
|
|
|
|
|
|
|
IPDL_SOURCES = [
|
|
|
|
'sandbox/PHal.ipdl',
|
|
|
|
]
|