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":
67 "fallback/FallbackScreenConfiguration.cpp",
68 "fallback/FallbackVibration.cpp",
69 "windows/WindowsProcessPriority.cpp",
70 "windows/WindowsSensor.cpp",
72 # WindowsBattery.cpp cannot be built in unified mode because it relies on HalImpl.h.
74 "windows/WindowsBattery.cpp",
76 elif CONFIG["MOZ_WIDGET_TOOLKIT"] == "cocoa":
78 "cocoa/CocoaBattery.cpp",
79 "fallback/FallbackProcessPriority.cpp",
80 "fallback/FallbackScreenConfiguration.cpp",
81 "fallback/FallbackVibration.cpp",
83 elif CONFIG["OS_TARGET"] in ("OpenBSD", "NetBSD", "FreeBSD", "DragonFly"):
85 "fallback/FallbackProcessPriority.cpp",
86 "fallback/FallbackScreenConfiguration.cpp",
87 "fallback/FallbackSensor.cpp",
88 "fallback/FallbackVibration.cpp",
90 if CONFIG["MOZ_ENABLE_DBUS"]:
92 "linux/UPowerClient.cpp",
96 "fallback/FallbackBattery.cpp",
100 "fallback/FallbackBattery.cpp",
101 "fallback/FallbackProcessPriority.cpp",
102 "fallback/FallbackScreenConfiguration.cpp",
103 "fallback/FallbackSensor.cpp",
104 "fallback/FallbackVibration.cpp",
107 # Fallbacks for backends implemented on Android only.
108 if CONFIG["MOZ_WIDGET_TOOLKIT"] != "android":
110 "fallback/FallbackNetwork.cpp",
113 if CONFIG["MOZ_WIDGET_TOOLKIT"] == "cocoa":
115 "cocoa/CocoaSensor.mm",
123 include("/ipc/chromium/chromium-config.mozbuild")
125 FINAL_LIBRARY = "xul"
131 CFLAGS += CONFIG["GLIB_CFLAGS"]
132 CFLAGS += CONFIG["MOZ_DBUS_GLIB_CFLAGS"]
133 CXXFLAGS += CONFIG["GLIB_CFLAGS"]
134 CXXFLAGS += CONFIG["MOZ_DBUS_GLIB_CFLAGS"]