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-11-19 02:47:43 +00:00
|
|
|
XPIDL_MODULE = 'hal'
|
2013-03-19 18:47:00 +00:00
|
|
|
|
2013-04-16 19:24:43 +00:00
|
|
|
EXPORTS.mozilla += [
|
|
|
|
'Hal.h',
|
|
|
|
'HalImpl.h',
|
|
|
|
'HalSandbox.h',
|
2013-11-01 02:07:10 +00:00
|
|
|
'HalScreenConfiguration.h',
|
2013-04-16 19:24:43 +00:00
|
|
|
'HalSensor.h',
|
|
|
|
'HalTypes.h',
|
|
|
|
'HalWakeLock.h',
|
|
|
|
]
|
|
|
|
|
2013-06-04 20:30:06 +00:00
|
|
|
TEST_DIRS += ['tests']
|
2013-11-25 19:57:18 +00:00
|
|
|
UNIFIED_SOURCES += [
|
2013-04-23 21:54:15 +00:00
|
|
|
'HalWakeLock.cpp',
|
2013-09-18 19:18:15 +00:00
|
|
|
'sandbox/SandboxHal.cpp',
|
2013-10-23 23:05:43 +00:00
|
|
|
'WindowIdentifier.cpp',
|
2013-04-23 21:54:15 +00:00
|
|
|
]
|
|
|
|
|
2013-11-25 19:57:18 +00:00
|
|
|
# Hal.cpp cannot be built in unified mode because it relies on HalImpl.h.
|
|
|
|
SOURCES += [
|
|
|
|
'Hal.cpp',
|
|
|
|
]
|
|
|
|
|
2013-04-23 21:54:15 +00:00
|
|
|
if CONFIG['MOZ_GAMEPAD_BACKEND'] == 'stub':
|
2013-11-25 19:57:18 +00:00
|
|
|
UNIFIED_SOURCES += [
|
2013-09-18 19:18:15 +00:00
|
|
|
'fallback/FallbackGamepad.cpp'
|
2013-04-23 21:54:15 +00:00
|
|
|
]
|
|
|
|
elif CONFIG['MOZ_GAMEPAD_BACKEND'] == 'cocoa':
|
2013-11-25 19:57:18 +00:00
|
|
|
UNIFIED_SOURCES += [
|
2013-09-18 19:18:15 +00:00
|
|
|
'cocoa/CocoaGamepad.cpp'
|
2013-04-23 21:54:15 +00:00
|
|
|
]
|
|
|
|
elif CONFIG['MOZ_GAMEPAD_BACKEND'] == 'windows':
|
2013-11-25 19:57:18 +00:00
|
|
|
UNIFIED_SOURCES += [
|
2013-09-18 19:18:15 +00:00
|
|
|
'windows/WindowsGamepad.cpp'
|
2013-04-23 21:54:15 +00:00
|
|
|
]
|
|
|
|
elif CONFIG['MOZ_GAMEPAD_BACKEND'] == 'linux':
|
2013-11-25 19:57:18 +00:00
|
|
|
UNIFIED_SOURCES += [
|
2013-09-18 19:18:15 +00:00
|
|
|
'linux/LinuxGamepad.cpp'
|
2013-04-23 21:54:15 +00:00
|
|
|
]
|
2014-04-22 14:53:48 +00:00
|
|
|
elif CONFIG['MOZ_GAMEPAD_BACKEND'] == 'android':
|
|
|
|
UNIFIED_SOURCES += [
|
|
|
|
'android/AndroidGamepad.cpp'
|
|
|
|
]
|
2013-04-23 21:54:15 +00:00
|
|
|
|
|
|
|
if CONFIG['MOZ_WIDGET_TOOLKIT'] == 'android':
|
2013-11-25 19:57:18 +00:00
|
|
|
UNIFIED_SOURCES += [
|
2013-09-18 19:18:15 +00:00
|
|
|
'android/AndroidSensor.cpp',
|
|
|
|
'fallback/FallbackAlarm.cpp',
|
2013-10-23 23:00:23 +00:00
|
|
|
'fallback/FallbackPower.cpp',
|
2013-10-22 19:15:24 +00:00
|
|
|
'linux/LinuxMemory.cpp',
|
2013-04-23 21:54:15 +00:00
|
|
|
]
|
2013-11-25 19:57:18 +00:00
|
|
|
# AndroidHal.cpp cannot be built in unified mode because it relies on HalImpl.h.
|
2013-10-24 23:23:05 +00:00
|
|
|
SOURCES += [
|
2013-11-25 19:57:18 +00:00
|
|
|
'android/AndroidHal.cpp',
|
|
|
|
]
|
|
|
|
elif CONFIG['MOZ_WIDGET_TOOLKIT'] == 'gonk':
|
|
|
|
UNIFIED_SOURCES += [
|
2013-09-18 19:18:15 +00:00
|
|
|
'gonk/GonkDiskSpaceWatcher.cpp',
|
|
|
|
'gonk/GonkFMRadio.cpp',
|
|
|
|
'gonk/GonkSensor.cpp',
|
|
|
|
'gonk/GonkSwitch.cpp',
|
|
|
|
'gonk/UeventPoller.cpp',
|
2013-10-22 19:15:24 +00:00
|
|
|
'linux/LinuxMemory.cpp',
|
2013-10-23 23:00:23 +00:00
|
|
|
'linux/LinuxPower.cpp',
|
2013-04-23 21:54:15 +00:00
|
|
|
]
|
2013-11-25 19:57:18 +00:00
|
|
|
# GonkHal.cpp cannot be built in unified mode because it relies on HalImpl.h.
|
2013-10-24 23:23:05 +00:00
|
|
|
SOURCES += [
|
2013-11-25 19:57:18 +00:00
|
|
|
'gonk/GonkHal.cpp',
|
|
|
|
]
|
|
|
|
elif CONFIG['OS_TARGET'] == 'Linux':
|
|
|
|
UNIFIED_SOURCES += [
|
2013-09-18 19:18:15 +00:00
|
|
|
'fallback/FallbackAlarm.cpp',
|
|
|
|
'fallback/FallbackScreenConfiguration.cpp',
|
|
|
|
'fallback/FallbackSensor.cpp',
|
|
|
|
'fallback/FallbackVibration.cpp',
|
2013-10-22 19:15:24 +00:00
|
|
|
'linux/LinuxMemory.cpp',
|
2013-10-23 23:00:23 +00:00
|
|
|
'linux/LinuxPower.cpp',
|
2013-04-23 21:54:15 +00:00
|
|
|
]
|
|
|
|
if CONFIG['MOZ_ENABLE_DBUS']:
|
2013-11-25 19:57:18 +00:00
|
|
|
UNIFIED_SOURCES += [
|
2013-09-18 19:18:15 +00:00
|
|
|
'linux/UPowerClient.cpp',
|
2013-04-23 21:54:15 +00:00
|
|
|
]
|
|
|
|
else:
|
2013-11-25 19:57:18 +00:00
|
|
|
UNIFIED_SOURCES += [
|
2013-09-18 19:18:15 +00:00
|
|
|
'fallback/FallbackBattery.cpp',
|
2013-04-23 21:54:15 +00:00
|
|
|
]
|
|
|
|
elif CONFIG['OS_TARGET'] == 'WINNT':
|
2013-11-25 19:57:18 +00:00
|
|
|
UNIFIED_SOURCES += [
|
2013-09-18 19:18:15 +00:00
|
|
|
'fallback/FallbackAlarm.cpp',
|
2013-10-23 23:00:23 +00:00
|
|
|
'fallback/FallbackMemory.cpp',
|
2013-09-18 19:18:15 +00:00
|
|
|
'fallback/FallbackPower.cpp',
|
|
|
|
'fallback/FallbackScreenConfiguration.cpp',
|
|
|
|
'fallback/FallbackVibration.cpp',
|
|
|
|
'windows/WindowsSensor.cpp',
|
2013-04-23 21:54:15 +00:00
|
|
|
]
|
2013-11-25 19:57:18 +00:00
|
|
|
# WindowsBattery.cpp cannot be built in unified mode because it relies on HalImpl.h.
|
2013-10-24 23:23:05 +00:00
|
|
|
SOURCES += [
|
2013-11-25 19:57:18 +00:00
|
|
|
'windows/WindowsBattery.cpp',
|
|
|
|
]
|
|
|
|
elif CONFIG['MOZ_WIDGET_TOOLKIT'] == 'cocoa':
|
|
|
|
UNIFIED_SOURCES += [
|
2013-09-18 19:18:15 +00:00
|
|
|
'cocoa/CocoaBattery.cpp',
|
|
|
|
'fallback/FallbackAlarm.cpp',
|
2013-10-23 23:00:23 +00:00
|
|
|
'fallback/FallbackMemory.cpp',
|
2013-09-18 19:18:15 +00:00
|
|
|
'fallback/FallbackPower.cpp',
|
|
|
|
'fallback/FallbackScreenConfiguration.cpp',
|
|
|
|
'fallback/FallbackVibration.cpp',
|
2013-04-23 21:54:15 +00:00
|
|
|
]
|
|
|
|
elif CONFIG['OS_TARGET'] in ('OpenBSD', 'NetBSD', 'FreeBSD', 'DragonFly'):
|
2013-11-25 19:57:18 +00:00
|
|
|
UNIFIED_SOURCES += [
|
2013-09-18 19:18:15 +00:00
|
|
|
'fallback/FallbackAlarm.cpp',
|
2013-10-23 23:00:23 +00:00
|
|
|
'fallback/FallbackMemory.cpp',
|
2013-09-18 19:18:15 +00:00
|
|
|
'fallback/FallbackPower.cpp',
|
|
|
|
'fallback/FallbackScreenConfiguration.cpp',
|
|
|
|
'fallback/FallbackSensor.cpp',
|
|
|
|
'fallback/FallbackVibration.cpp',
|
2013-04-23 21:54:15 +00:00
|
|
|
]
|
|
|
|
if CONFIG['MOZ_ENABLE_DBUS']:
|
2013-11-25 19:57:18 +00:00
|
|
|
UNIFIED_SOURCES += [
|
2013-09-18 19:18:15 +00:00
|
|
|
'linux/UPowerClient.cpp',
|
2013-04-23 21:54:15 +00:00
|
|
|
]
|
|
|
|
else:
|
2013-11-25 19:57:18 +00:00
|
|
|
UNIFIED_SOURCES += [
|
2013-09-18 19:18:15 +00:00
|
|
|
'fallback/FallbackBattery.cpp',
|
2013-04-23 21:54:15 +00:00
|
|
|
]
|
|
|
|
else:
|
2013-11-25 19:57:18 +00:00
|
|
|
UNIFIED_SOURCES += [
|
2013-09-18 19:18:15 +00:00
|
|
|
'fallback/FallbackAlarm.cpp',
|
|
|
|
'fallback/FallbackBattery.cpp',
|
2013-10-23 23:00:23 +00:00
|
|
|
'fallback/FallbackMemory.cpp',
|
2013-09-18 19:18:15 +00:00
|
|
|
'fallback/FallbackPower.cpp',
|
|
|
|
'fallback/FallbackScreenConfiguration.cpp',
|
|
|
|
'fallback/FallbackSensor.cpp',
|
|
|
|
'fallback/FallbackVibration.cpp',
|
2013-04-23 21:54:15 +00:00
|
|
|
]
|
|
|
|
|
|
|
|
# Fallbacks for backends implemented on Gonk only.
|
|
|
|
if CONFIG['MOZ_WIDGET_TOOLKIT'] != 'gonk':
|
2013-11-25 19:57:18 +00:00
|
|
|
UNIFIED_SOURCES += [
|
2013-09-18 19:18:15 +00:00
|
|
|
'fallback/FallbackDiskSpaceWatcher.cpp',
|
|
|
|
'fallback/FallbackFactoryReset.cpp',
|
2013-10-23 23:05:43 +00:00
|
|
|
'fallback/FallbackFMRadio.cpp',
|
2013-09-18 19:18:15 +00:00
|
|
|
'fallback/FallbackProcessPriority.cpp',
|
|
|
|
'fallback/FallbackScreenPower.cpp',
|
|
|
|
'fallback/FallbackSwitch.cpp',
|
2014-05-05 15:37:00 +00:00
|
|
|
'fallback/FallbackThreadPriority.cpp',
|
2013-09-18 19:18:15 +00:00
|
|
|
'fallback/FallbackTime.cpp',
|
|
|
|
'fallback/FallbackWakeLocks.cpp',
|
2013-04-23 21:54:15 +00:00
|
|
|
]
|
|
|
|
|
|
|
|
# Fallbacks for backends implemented on Android only.
|
|
|
|
if CONFIG['MOZ_WIDGET_TOOLKIT'] != 'android':
|
2013-11-25 19:57:18 +00:00
|
|
|
UNIFIED_SOURCES += [
|
2013-09-18 19:18:15 +00:00
|
|
|
'fallback/FallbackNetwork.cpp',
|
2013-04-23 21:54:15 +00:00
|
|
|
]
|
2013-07-01 16:32:40 +00:00
|
|
|
|
|
|
|
if CONFIG['MOZ_WIDGET_TOOLKIT'] == 'cocoa':
|
2013-11-25 19:57:18 +00:00
|
|
|
UNIFIED_SOURCES += [
|
2013-09-18 19:18:15 +00:00
|
|
|
'cocoa/CocoaSensor.mm',
|
|
|
|
'cocoa/smslib.mm',
|
2013-07-01 16:32:40 +00:00
|
|
|
]
|
2013-07-01 13:56:28 +00:00
|
|
|
|
|
|
|
IPDL_SOURCES = [
|
|
|
|
'sandbox/PHal.ipdl',
|
|
|
|
]
|
2013-08-22 06:55:59 +00:00
|
|
|
|
|
|
|
FAIL_ON_WARNINGS = True
|
|
|
|
|
2013-10-02 17:17:55 +00:00
|
|
|
include('/ipc/chromium/chromium-config.mozbuild')
|
|
|
|
|
2013-11-19 02:47:14 +00:00
|
|
|
FINAL_LIBRARY = 'xul'
|
2014-02-10 18:41:02 +00:00
|
|
|
|
|
|
|
if CONFIG['MOZ_GAMEPAD']:
|
|
|
|
LOCAL_INCLUDES += [
|
|
|
|
'/dom/base',
|
|
|
|
]
|
|
|
|
|
|
|
|
if CONFIG['MOZ_WIDGET_TOOLKIT'] == 'gonk':
|
|
|
|
# So that we can call nsScreenManagerGonk::GetConfiguration().
|
|
|
|
LOCAL_INCLUDES += [
|
2014-10-23 17:16:45 +00:00
|
|
|
'/widget',
|
2014-02-10 18:41:02 +00:00
|
|
|
'/widget/gonk',
|
|
|
|
]
|
2014-03-04 02:58:37 +00:00
|
|
|
|
|
|
|
if CONFIG['MOZ_WIDGET_TOOLKIT'] == 'gonk':
|
|
|
|
CXXFLAGS += ['-I%s/hardware/libhardware_legacy/include' % CONFIG['ANDROID_SOURCE']]
|
2014-07-24 15:55:33 +00:00
|
|
|
|
|
|
|
CFLAGS += CONFIG['GLIB_CFLAGS']
|
|
|
|
CFLAGS += CONFIG['MOZ_DBUS_GLIB_CFLAGS']
|
|
|
|
CXXFLAGS += CONFIG['GLIB_CFLAGS']
|
|
|
|
CXXFLAGS += CONFIG['MOZ_DBUS_GLIB_CFLAGS']
|