1 # -*- Mode: python; indent-tabs-mode: nil; tab-width: 40 -*-
2 # vim: set filetype=python:
3 # This Source Code Form is subject to the terms of the Mozilla Public
4 # License, v. 2.0. If a copy of the MPL was not distributed with this
5 # file, You can obtain one at http://mozilla.org/MPL/2.0/.
8 BUG_COMPONENT = ("Core", "Hardware Abstraction Layer (HAL)")
12 "HalBatteryInformation.h",
14 "HalNetworkInformation.h",
16 "HalScreenConfiguration.h",
20 "HalWakeLockInformation.h",
23 EXPORTS.mozilla.fallback += [
24 "fallback/FallbackScreenConfiguration.h",
29 "sandbox/SandboxHal.cpp",
30 "WindowIdentifier.cpp",
33 # Hal.cpp cannot be built in unified mode because it relies on HalImpl.h.
38 if CONFIG["MOZ_WIDGET_TOOLKIT"] == "android":
43 "android/AndroidProcessPriority.cpp",
44 "android/AndroidSensor.cpp",
46 # AndroidHal.cpp cannot be built in unified mode because it relies on HalImpl.h.
48 "android/AndroidHal.cpp",
50 elif CONFIG["OS_TARGET"] == "Linux":
52 "fallback/FallbackProcessPriority.cpp",
53 "fallback/FallbackScreenConfiguration.cpp",
54 "fallback/FallbackSensor.cpp",
55 "fallback/FallbackVibration.cpp",
57 if CONFIG["MOZ_ENABLE_DBUS"]:
59 "linux/UPowerClient.cpp",
63 "fallback/FallbackBattery.cpp",
65 elif CONFIG["OS_TARGET"] == "WINNT":
66 REQUIRES_UNIFIED_BUILD = True
68 "fallback/FallbackScreenConfiguration.cpp",
69 "fallback/FallbackVibration.cpp",
70 "windows/WindowsProcessPriority.cpp",
71 "windows/WindowsSensor.cpp",
73 # WindowsBattery.cpp cannot be built in unified mode because it relies on HalImpl.h.
75 "windows/WindowsBattery.cpp",
77 elif CONFIG["MOZ_WIDGET_TOOLKIT"] == "cocoa":
79 "cocoa/CocoaBattery.cpp",
80 "fallback/FallbackProcessPriority.cpp",
81 "fallback/FallbackScreenConfiguration.cpp",
82 "fallback/FallbackVibration.cpp",
84 elif CONFIG["OS_TARGET"] in ("OpenBSD", "NetBSD", "FreeBSD", "DragonFly"):
86 "fallback/FallbackProcessPriority.cpp",
87 "fallback/FallbackScreenConfiguration.cpp",
88 "fallback/FallbackSensor.cpp",
89 "fallback/FallbackVibration.cpp",
91 if CONFIG["MOZ_ENABLE_DBUS"]:
93 "linux/UPowerClient.cpp",
97 "fallback/FallbackBattery.cpp",
101 "fallback/FallbackBattery.cpp",
102 "fallback/FallbackProcessPriority.cpp",
103 "fallback/FallbackScreenConfiguration.cpp",
104 "fallback/FallbackSensor.cpp",
105 "fallback/FallbackVibration.cpp",
108 # Fallbacks for backends implemented on Android only.
109 if CONFIG["MOZ_WIDGET_TOOLKIT"] != "android":
111 "fallback/FallbackNetwork.cpp",
114 if CONFIG["MOZ_WIDGET_TOOLKIT"] == "cocoa":
116 "cocoa/CocoaSensor.mm",
124 include("/ipc/chromium/chromium-config.mozbuild")
126 FINAL_LIBRARY = "xul"
132 CFLAGS += CONFIG["GLIB_CFLAGS"]
133 CFLAGS += CONFIG["MOZ_DBUS_GLIB_CFLAGS"]
134 CXXFLAGS += CONFIG["GLIB_CFLAGS"]
135 CXXFLAGS += CONFIG["MOZ_DBUS_GLIB_CFLAGS"]