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",
15 "HalNetworkInformation.h",
17 "HalScreenConfiguration.h",
21 "HalWakeLockInformation.h",
26 "sandbox/SandboxHal.cpp",
27 "WindowIdentifier.cpp",
30 # Hal.cpp cannot be built in unified mode because it relies on HalImpl.h.
35 if CONFIG["MOZ_WIDGET_TOOLKIT"] == "android":
40 "android/AndroidHeterogeneousCpuInfo.cpp",
41 "android/AndroidPerformanceHintManager.cpp",
42 "android/AndroidProcessPriority.cpp",
43 "android/AndroidSensor.cpp",
45 # AndroidHal.cpp cannot be built in unified mode because it relies on HalImpl.h.
47 "android/AndroidHal.cpp",
49 elif CONFIG["OS_TARGET"] == "Linux":
51 "fallback/FallbackScreenConfiguration.cpp",
52 "fallback/FallbackSensor.cpp",
53 "fallback/FallbackVibration.cpp",
54 "linux/LinuxProcessPriority.cpp",
56 if CONFIG["MOZ_ENABLE_DBUS"]:
58 "linux/UPowerClient.cpp",
62 "fallback/FallbackBattery.cpp",
64 elif CONFIG["OS_TARGET"] == "WINNT":
66 "fallback/FallbackVibration.cpp",
67 "windows/WindowsProcessPriority.cpp",
68 "windows/WindowsScreenConfiguration.cpp",
69 "windows/WindowsSensor.cpp",
71 # WindowsBattery.cpp cannot be built in unified mode because it relies on HalImpl.h.
73 "windows/WindowsBattery.cpp",
75 elif CONFIG["MOZ_WIDGET_TOOLKIT"] == "cocoa":
77 "cocoa/CocoaBattery.cpp",
78 "fallback/FallbackProcessPriority.cpp",
79 "fallback/FallbackScreenConfiguration.cpp",
80 "fallback/FallbackVibration.cpp",
82 elif CONFIG["OS_TARGET"] in ("OpenBSD", "NetBSD", "FreeBSD", "DragonFly"):
84 "fallback/FallbackProcessPriority.cpp",
85 "fallback/FallbackScreenConfiguration.cpp",
86 "fallback/FallbackSensor.cpp",
87 "fallback/FallbackVibration.cpp",
89 if CONFIG["MOZ_ENABLE_DBUS"]:
91 "linux/UPowerClient.cpp",
95 "fallback/FallbackBattery.cpp",
99 "fallback/FallbackBattery.cpp",
100 "fallback/FallbackProcessPriority.cpp",
101 "fallback/FallbackScreenConfiguration.cpp",
102 "fallback/FallbackSensor.cpp",
103 "fallback/FallbackVibration.cpp",
106 # Fallbacks for backends implemented on Android only.
107 if CONFIG["MOZ_WIDGET_TOOLKIT"] != "android":
109 "fallback/FallbackHeterogeneousCpuInfo.cpp",
110 "fallback/FallbackNetwork.cpp",
111 "fallback/FallbackPerformanceHintManager.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_GTK3_CFLAGS"]
134 CXXFLAGS += CONFIG["GLIB_CFLAGS"]
135 CXXFLAGS += CONFIG["MOZ_GTK3_CFLAGS"]