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:23 -08: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 10:17:46 -07:00
|
|
|
XPIDL_SOURCES += [
|
2013-08-14 08:40:25 -07:00
|
|
|
'gonk/nsIRecoveryService.idl',
|
2013-03-12 10:17:46 -07:00
|
|
|
]
|
|
|
|
|
2013-03-19 11:47:00 -07:00
|
|
|
MODULE = 'hal'
|
|
|
|
|
2013-04-16 12:24:43 -07:00
|
|
|
EXPORTS.mozilla += [
|
|
|
|
'Hal.h',
|
|
|
|
'HalImpl.h',
|
|
|
|
'HalSandbox.h',
|
2013-10-31 19:07:10 -07:00
|
|
|
'HalScreenConfiguration.h',
|
2013-04-16 12:24:43 -07:00
|
|
|
'HalSensor.h',
|
|
|
|
'HalTypes.h',
|
|
|
|
'HalWakeLock.h',
|
|
|
|
]
|
|
|
|
|
2013-06-04 13:30:06 -07:00
|
|
|
TEST_DIRS += ['tests']
|
2013-10-24 16:23:05 -07:00
|
|
|
SOURCES += [
|
2013-04-23 14:54:15 -07:00
|
|
|
'Hal.cpp',
|
|
|
|
'HalWakeLock.cpp',
|
2013-09-18 12:18:15 -07:00
|
|
|
'sandbox/SandboxHal.cpp',
|
2013-10-23 16:05:43 -07:00
|
|
|
'WindowIdentifier.cpp',
|
2013-04-23 14:54:15 -07:00
|
|
|
]
|
|
|
|
|
|
|
|
if CONFIG['MOZ_GAMEPAD_BACKEND'] == 'stub':
|
2013-10-24 16:23:05 -07:00
|
|
|
SOURCES += [
|
2013-09-18 12:18:15 -07:00
|
|
|
'fallback/FallbackGamepad.cpp'
|
2013-04-23 14:54:15 -07:00
|
|
|
]
|
|
|
|
elif CONFIG['MOZ_GAMEPAD_BACKEND'] == 'cocoa':
|
2013-10-24 16:23:05 -07:00
|
|
|
SOURCES += [
|
2013-09-18 12:18:15 -07:00
|
|
|
'cocoa/CocoaGamepad.cpp'
|
2013-04-23 14:54:15 -07:00
|
|
|
]
|
|
|
|
elif CONFIG['MOZ_GAMEPAD_BACKEND'] == 'windows':
|
2013-10-24 16:23:05 -07:00
|
|
|
SOURCES += [
|
2013-09-18 12:18:15 -07:00
|
|
|
'windows/WindowsGamepad.cpp'
|
2013-04-23 14:54:15 -07:00
|
|
|
]
|
|
|
|
elif CONFIG['MOZ_GAMEPAD_BACKEND'] == 'linux':
|
2013-10-24 16:23:05 -07:00
|
|
|
SOURCES += [
|
2013-09-18 12:18:15 -07:00
|
|
|
'linux/LinuxGamepad.cpp'
|
2013-04-23 14:54:15 -07:00
|
|
|
]
|
|
|
|
|
|
|
|
if CONFIG['MOZ_WIDGET_TOOLKIT'] == 'android':
|
2013-10-24 16:23:05 -07:00
|
|
|
SOURCES += [
|
2013-09-18 12:18:15 -07:00
|
|
|
'android/AndroidHal.cpp',
|
|
|
|
'android/AndroidSensor.cpp',
|
|
|
|
'fallback/FallbackAlarm.cpp',
|
2013-10-23 16:00:23 -07:00
|
|
|
'fallback/FallbackPower.cpp',
|
2013-10-22 12:15:24 -07:00
|
|
|
'linux/LinuxMemory.cpp',
|
2013-04-23 14:54:15 -07:00
|
|
|
]
|
|
|
|
elif CONFIG['MOZ_WIDGET_TOOLKIT'] == 'gonk':
|
2013-10-24 16:23:05 -07:00
|
|
|
SOURCES += [
|
2013-09-18 12:18:15 -07:00
|
|
|
'gonk/GonkDiskSpaceWatcher.cpp',
|
|
|
|
'gonk/GonkFMRadio.cpp',
|
|
|
|
'gonk/GonkHal.cpp',
|
|
|
|
'gonk/GonkSensor.cpp',
|
|
|
|
'gonk/GonkSwitch.cpp',
|
|
|
|
'gonk/UeventPoller.cpp',
|
2013-10-22 12:15:24 -07:00
|
|
|
'linux/LinuxMemory.cpp',
|
2013-10-23 16:00:23 -07:00
|
|
|
'linux/LinuxPower.cpp',
|
2013-04-23 14:54:15 -07:00
|
|
|
]
|
|
|
|
elif CONFIG['OS_TARGET'] == 'Linux':
|
2013-10-24 16:23:05 -07:00
|
|
|
SOURCES += [
|
2013-09-18 12:18:15 -07:00
|
|
|
'fallback/FallbackAlarm.cpp',
|
|
|
|
'fallback/FallbackScreenConfiguration.cpp',
|
|
|
|
'fallback/FallbackSensor.cpp',
|
|
|
|
'fallback/FallbackVibration.cpp',
|
2013-10-22 12:15:24 -07:00
|
|
|
'linux/LinuxMemory.cpp',
|
2013-10-23 16:00:23 -07:00
|
|
|
'linux/LinuxPower.cpp',
|
2013-04-23 14:54:15 -07:00
|
|
|
]
|
|
|
|
if CONFIG['MOZ_ENABLE_DBUS']:
|
2013-10-24 16:23:05 -07:00
|
|
|
SOURCES += [
|
2013-09-18 12:18:15 -07:00
|
|
|
'linux/UPowerClient.cpp',
|
2013-04-23 14:54:15 -07:00
|
|
|
]
|
|
|
|
else:
|
2013-10-24 16:23:05 -07:00
|
|
|
SOURCES += [
|
2013-09-18 12:18:15 -07:00
|
|
|
'fallback/FallbackBattery.cpp',
|
2013-04-23 14:54:15 -07:00
|
|
|
]
|
|
|
|
elif CONFIG['OS_TARGET'] == 'WINNT':
|
2013-10-24 16:23:05 -07:00
|
|
|
SOURCES += [
|
2013-09-18 12:18:15 -07:00
|
|
|
'fallback/FallbackAlarm.cpp',
|
2013-10-23 16:00:23 -07:00
|
|
|
'fallback/FallbackMemory.cpp',
|
2013-09-18 12:18:15 -07:00
|
|
|
'fallback/FallbackPower.cpp',
|
|
|
|
'fallback/FallbackScreenConfiguration.cpp',
|
|
|
|
'fallback/FallbackVibration.cpp',
|
|
|
|
'windows/WindowsBattery.cpp',
|
|
|
|
'windows/WindowsSensor.cpp',
|
2013-04-23 14:54:15 -07:00
|
|
|
]
|
|
|
|
elif CONFIG['MOZ_WIDGET_TOOLKIT'] == 'cocoa':
|
2013-10-24 16:23:05 -07:00
|
|
|
SOURCES += [
|
2013-09-18 12:18:15 -07:00
|
|
|
'cocoa/CocoaBattery.cpp',
|
|
|
|
'fallback/FallbackAlarm.cpp',
|
2013-10-23 16:00:23 -07:00
|
|
|
'fallback/FallbackMemory.cpp',
|
2013-09-18 12:18:15 -07:00
|
|
|
'fallback/FallbackPower.cpp',
|
|
|
|
'fallback/FallbackScreenConfiguration.cpp',
|
|
|
|
'fallback/FallbackVibration.cpp',
|
2013-04-23 14:54:15 -07:00
|
|
|
]
|
|
|
|
elif CONFIG['OS_TARGET'] in ('OpenBSD', 'NetBSD', 'FreeBSD', 'DragonFly'):
|
2013-10-24 16:23:05 -07:00
|
|
|
SOURCES += [
|
2013-09-18 12:18:15 -07:00
|
|
|
'fallback/FallbackAlarm.cpp',
|
2013-10-23 16:00:23 -07:00
|
|
|
'fallback/FallbackMemory.cpp',
|
2013-09-18 12:18:15 -07:00
|
|
|
'fallback/FallbackPower.cpp',
|
|
|
|
'fallback/FallbackScreenConfiguration.cpp',
|
|
|
|
'fallback/FallbackSensor.cpp',
|
|
|
|
'fallback/FallbackVibration.cpp',
|
2013-04-23 14:54:15 -07:00
|
|
|
]
|
|
|
|
if CONFIG['MOZ_ENABLE_DBUS']:
|
2013-10-24 16:23:05 -07:00
|
|
|
SOURCES += [
|
2013-09-18 12:18:15 -07:00
|
|
|
'linux/UPowerClient.cpp',
|
2013-04-23 14:54:15 -07:00
|
|
|
]
|
|
|
|
else:
|
2013-10-24 16:23:05 -07:00
|
|
|
SOURCES += [
|
2013-09-18 12:18:15 -07:00
|
|
|
'fallback/FallbackBattery.cpp',
|
2013-04-23 14:54:15 -07:00
|
|
|
]
|
|
|
|
else:
|
2013-10-24 16:23:05 -07:00
|
|
|
SOURCES += [
|
2013-09-18 12:18:15 -07:00
|
|
|
'fallback/FallbackAlarm.cpp',
|
|
|
|
'fallback/FallbackBattery.cpp',
|
2013-10-23 16:00:23 -07:00
|
|
|
'fallback/FallbackMemory.cpp',
|
2013-09-18 12:18:15 -07:00
|
|
|
'fallback/FallbackPower.cpp',
|
|
|
|
'fallback/FallbackScreenConfiguration.cpp',
|
|
|
|
'fallback/FallbackSensor.cpp',
|
|
|
|
'fallback/FallbackVibration.cpp',
|
2013-04-23 14:54:15 -07:00
|
|
|
]
|
|
|
|
|
|
|
|
# Fallbacks for backends implemented on Gonk only.
|
|
|
|
if CONFIG['MOZ_WIDGET_TOOLKIT'] != 'gonk':
|
2013-10-24 16:23:05 -07:00
|
|
|
SOURCES += [
|
2013-09-18 12:18:15 -07:00
|
|
|
'fallback/FallbackDiskSpaceWatcher.cpp',
|
|
|
|
'fallback/FallbackFactoryReset.cpp',
|
2013-10-23 16:05:43 -07:00
|
|
|
'fallback/FallbackFMRadio.cpp',
|
2013-09-18 12:18:15 -07:00
|
|
|
'fallback/FallbackLights.cpp',
|
|
|
|
'fallback/FallbackProcessPriority.cpp',
|
|
|
|
'fallback/FallbackScreenPower.cpp',
|
|
|
|
'fallback/FallbackSwitch.cpp',
|
|
|
|
'fallback/FallbackTime.cpp',
|
|
|
|
'fallback/FallbackWakeLocks.cpp',
|
2013-04-23 14:54:15 -07:00
|
|
|
]
|
|
|
|
|
|
|
|
# Fallbacks for backends implemented on Android only.
|
|
|
|
if CONFIG['MOZ_WIDGET_TOOLKIT'] != 'android':
|
2013-10-24 16:23:05 -07:00
|
|
|
SOURCES += [
|
2013-09-18 12:18:15 -07:00
|
|
|
'fallback/FallbackNetwork.cpp',
|
2013-04-23 14:54:15 -07:00
|
|
|
]
|
2013-07-01 09:32:40 -07:00
|
|
|
|
|
|
|
if CONFIG['MOZ_WIDGET_TOOLKIT'] == 'cocoa':
|
2013-10-24 16:23:05 -07:00
|
|
|
SOURCES += [
|
2013-09-18 12:18:15 -07:00
|
|
|
'cocoa/CocoaSensor.mm',
|
|
|
|
'cocoa/smslib.mm',
|
2013-07-01 09:32:40 -07:00
|
|
|
]
|
2013-07-01 06:56:28 -07:00
|
|
|
|
|
|
|
IPDL_SOURCES = [
|
|
|
|
'sandbox/PHal.ipdl',
|
|
|
|
]
|
2013-08-21 23:55:59 -07:00
|
|
|
|
|
|
|
FAIL_ON_WARNINGS = True
|
|
|
|
|
2013-08-21 23:56:00 -07:00
|
|
|
LIBXUL_LIBRARY = True
|
|
|
|
|
2013-08-15 06:02:09 -07:00
|
|
|
LIBRARY_NAME = 'hal_s'
|
|
|
|
|
2013-10-03 00:11:13 -07:00
|
|
|
EXPORT_LIBRARY = True
|
|
|
|
|
2013-10-02 10:17:55 -07:00
|
|
|
include('/ipc/chromium/chromium-config.mozbuild')
|
|
|
|
|