2016-07-14 10:16:42 -06:00
|
|
|
# -*- Mode: python; 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/.
|
2020-10-26 18:34:53 +00:00
|
|
|
|
2017-01-26 05:51:56 -05:00
|
|
|
with Files("**"):
|
|
|
|
BUG_COMPONENT = ("Core", "Hardware Abstraction Layer (HAL)")
|
2013-02-25 12:47:23 -08:00
|
|
|
|
2013-04-16 15:24:43 -04:00
|
|
|
EXPORTS.mozilla += [
|
|
|
|
"Hal.h",
|
2018-08-13 10:57:50 +09:00
|
|
|
"HalBatteryInformation.h",
|
2013-04-16 15:24:43 -04:00
|
|
|
"HalImpl.h",
|
2018-08-13 10:57:50 +09:00
|
|
|
"HalNetworkInformation.h",
|
2013-04-16 15:24:43 -04:00
|
|
|
"HalSandbox.h",
|
2013-10-31 22:07:10 -04:00
|
|
|
"HalScreenConfiguration.h",
|
2013-04-16 15:24:43 -04:00
|
|
|
"HalSensor.h",
|
|
|
|
"HalTypes.h",
|
|
|
|
"HalWakeLock.h",
|
2018-08-13 10:57:50 +09:00
|
|
|
"HalWakeLockInformation.h",
|
2013-04-16 15:24:43 -04:00
|
|
|
]
|
|
|
|
|
2017-03-08 22:06:09 -05:00
|
|
|
EXPORTS.mozilla.fallback += [
|
|
|
|
"fallback/FallbackScreenConfiguration.h",
|
|
|
|
]
|
|
|
|
|
2013-11-25 14:57:18 -05:00
|
|
|
UNIFIED_SOURCES += [
|
2013-04-23 17:54:15 -04:00
|
|
|
"HalWakeLock.cpp",
|
2013-09-18 15:18:15 -04:00
|
|
|
"sandbox/SandboxHal.cpp",
|
2013-10-24 08:05:43 +09:00
|
|
|
"WindowIdentifier.cpp",
|
2013-04-23 17:54:15 -04:00
|
|
|
]
|
|
|
|
|
2013-11-25 14:57:18 -05:00
|
|
|
# Hal.cpp cannot be built in unified mode because it relies on HalImpl.h.
|
|
|
|
SOURCES += [
|
|
|
|
"Hal.cpp",
|
|
|
|
]
|
|
|
|
|
2013-04-23 17:54:15 -04:00
|
|
|
if CONFIG["MOZ_WIDGET_TOOLKIT"] == "android":
|
2015-10-01 14:40:53 -03:00
|
|
|
LOCAL_INCLUDES += [
|
|
|
|
"/widget/android",
|
|
|
|
]
|
2013-11-25 14:57:18 -05:00
|
|
|
UNIFIED_SOURCES += [
|
2020-04-06 18:10:22 +00:00
|
|
|
"android/AndroidProcessPriority.cpp",
|
2013-09-18 15:18:15 -04:00
|
|
|
"android/AndroidSensor.cpp",
|
2013-04-23 17:54:15 -04:00
|
|
|
]
|
2013-11-25 14:57:18 -05:00
|
|
|
# AndroidHal.cpp cannot be built in unified mode because it relies on HalImpl.h.
|
2013-10-25 08:23:05 +09:00
|
|
|
SOURCES += [
|
2013-11-25 14:57:18 -05:00
|
|
|
"android/AndroidHal.cpp",
|
|
|
|
]
|
|
|
|
elif CONFIG["OS_TARGET"] == "Linux":
|
|
|
|
UNIFIED_SOURCES += [
|
2018-06-08 14:54:11 -07:00
|
|
|
"fallback/FallbackProcessPriority.cpp",
|
2013-09-18 15:18:15 -04:00
|
|
|
"fallback/FallbackScreenConfiguration.cpp",
|
|
|
|
"fallback/FallbackSensor.cpp",
|
|
|
|
"fallback/FallbackVibration.cpp",
|
2013-04-23 17:54:15 -04:00
|
|
|
]
|
|
|
|
if CONFIG["MOZ_ENABLE_DBUS"]:
|
2013-11-25 14:57:18 -05:00
|
|
|
UNIFIED_SOURCES += [
|
2013-09-18 15:18:15 -04:00
|
|
|
"linux/UPowerClient.cpp",
|
2013-04-23 17:54:15 -04:00
|
|
|
]
|
|
|
|
else:
|
2013-11-25 14:57:18 -05:00
|
|
|
UNIFIED_SOURCES += [
|
2013-09-18 15:18:15 -04:00
|
|
|
"fallback/FallbackBattery.cpp",
|
2013-04-23 17:54:15 -04:00
|
|
|
]
|
|
|
|
elif CONFIG["OS_TARGET"] == "WINNT":
|
2013-11-25 14:57:18 -05:00
|
|
|
UNIFIED_SOURCES += [
|
2013-09-18 15:18:15 -04:00
|
|
|
"fallback/FallbackScreenConfiguration.cpp",
|
|
|
|
"fallback/FallbackVibration.cpp",
|
2018-06-08 14:54:11 -07:00
|
|
|
"windows/WindowsProcessPriority.cpp",
|
2013-09-18 15:18:15 -04:00
|
|
|
"windows/WindowsSensor.cpp",
|
2013-04-23 17:54:15 -04:00
|
|
|
]
|
2013-11-25 14:57:18 -05:00
|
|
|
# WindowsBattery.cpp cannot be built in unified mode because it relies on HalImpl.h.
|
2013-10-25 08:23:05 +09:00
|
|
|
SOURCES += [
|
2013-11-25 14:57:18 -05:00
|
|
|
"windows/WindowsBattery.cpp",
|
|
|
|
]
|
|
|
|
elif CONFIG["MOZ_WIDGET_TOOLKIT"] == "cocoa":
|
|
|
|
UNIFIED_SOURCES += [
|
2013-09-18 15:18:15 -04:00
|
|
|
"cocoa/CocoaBattery.cpp",
|
2018-06-08 14:54:11 -07:00
|
|
|
"fallback/FallbackProcessPriority.cpp",
|
2013-09-18 15:18:15 -04:00
|
|
|
"fallback/FallbackScreenConfiguration.cpp",
|
|
|
|
"fallback/FallbackVibration.cpp",
|
2013-04-23 17:54:15 -04:00
|
|
|
]
|
|
|
|
elif CONFIG["OS_TARGET"] in ("OpenBSD", "NetBSD", "FreeBSD", "DragonFly"):
|
2013-11-25 14:57:18 -05:00
|
|
|
UNIFIED_SOURCES += [
|
2018-06-08 14:54:11 -07:00
|
|
|
"fallback/FallbackProcessPriority.cpp",
|
2013-09-18 15:18:15 -04:00
|
|
|
"fallback/FallbackScreenConfiguration.cpp",
|
|
|
|
"fallback/FallbackSensor.cpp",
|
|
|
|
"fallback/FallbackVibration.cpp",
|
2013-04-23 17:54:15 -04:00
|
|
|
]
|
|
|
|
if CONFIG["MOZ_ENABLE_DBUS"]:
|
2013-11-25 14:57:18 -05:00
|
|
|
UNIFIED_SOURCES += [
|
2013-09-18 15:18:15 -04:00
|
|
|
"linux/UPowerClient.cpp",
|
2013-04-23 17:54:15 -04:00
|
|
|
]
|
|
|
|
else:
|
2013-11-25 14:57:18 -05:00
|
|
|
UNIFIED_SOURCES += [
|
2013-09-18 15:18:15 -04:00
|
|
|
"fallback/FallbackBattery.cpp",
|
2013-04-23 17:54:15 -04:00
|
|
|
]
|
|
|
|
else:
|
2013-11-25 14:57:18 -05:00
|
|
|
UNIFIED_SOURCES += [
|
2013-09-18 15:18:15 -04:00
|
|
|
"fallback/FallbackBattery.cpp",
|
2018-06-08 14:54:11 -07:00
|
|
|
"fallback/FallbackProcessPriority.cpp",
|
2013-09-18 15:18:15 -04:00
|
|
|
"fallback/FallbackScreenConfiguration.cpp",
|
|
|
|
"fallback/FallbackSensor.cpp",
|
|
|
|
"fallback/FallbackVibration.cpp",
|
2013-04-23 17:54:15 -04:00
|
|
|
]
|
|
|
|
|
|
|
|
# Fallbacks for backends implemented on Android only.
|
|
|
|
if CONFIG["MOZ_WIDGET_TOOLKIT"] != "android":
|
2013-11-25 14:57:18 -05:00
|
|
|
UNIFIED_SOURCES += [
|
2013-09-18 15:18:15 -04:00
|
|
|
"fallback/FallbackNetwork.cpp",
|
2013-04-23 17:54:15 -04:00
|
|
|
]
|
2013-07-01 12:32:40 -04:00
|
|
|
|
|
|
|
if CONFIG["MOZ_WIDGET_TOOLKIT"] == "cocoa":
|
2013-11-25 14:57:18 -05:00
|
|
|
UNIFIED_SOURCES += [
|
2013-09-18 15:18:15 -04:00
|
|
|
"cocoa/CocoaSensor.mm",
|
|
|
|
"cocoa/smslib.mm",
|
2013-07-01 12:32:40 -04:00
|
|
|
]
|
2013-07-01 09:56:28 -04:00
|
|
|
|
|
|
|
IPDL_SOURCES = [
|
|
|
|
"sandbox/PHal.ipdl",
|
|
|
|
]
|
2013-08-22 08:55:59 +02:00
|
|
|
|
2013-10-02 13:17:55 -04:00
|
|
|
include("/ipc/chromium/chromium-config.mozbuild")
|
|
|
|
|
2013-11-19 11:47:14 +09:00
|
|
|
FINAL_LIBRARY = "xul"
|
2014-02-10 13:41:02 -05:00
|
|
|
|
2016-12-08 13:00:44 -10:00
|
|
|
LOCAL_INCLUDES += [
|
|
|
|
"/dom/base",
|
|
|
|
]
|
2014-02-10 13:41:02 -05:00
|
|
|
|
2014-07-24 11:55:33 -04:00
|
|
|
CFLAGS += CONFIG["GLIB_CFLAGS"]
|
|
|
|
CFLAGS += CONFIG["MOZ_DBUS_GLIB_CFLAGS"]
|
|
|
|
CXXFLAGS += CONFIG["GLIB_CFLAGS"]
|
|
|
|
CXXFLAGS += CONFIG["MOZ_DBUS_GLIB_CFLAGS"]
|