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/FallbackHeterogeneousCpuInfo.cpp",
52 "fallback/FallbackScreenConfiguration.cpp",
53 "fallback/FallbackSensor.cpp",
54 "fallback/FallbackVibration.cpp",
55 "linux/LinuxProcessPriority.cpp",
57 if CONFIG["MOZ_ENABLE_DBUS"]:
59 "linux/UPowerClient.cpp",
63 "fallback/FallbackBattery.cpp",
65 elif CONFIG["OS_TARGET"] == "WINNT":
67 "fallback/FallbackHeterogeneousCpuInfo.cpp",
68 "fallback/FallbackVibration.cpp",
69 "windows/WindowsProcessPriority.cpp",
70 "windows/WindowsScreenConfiguration.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 "cocoa/CocoaHeterogeneousCpuInfo.cpp",
81 "fallback/FallbackProcessPriority.cpp",
82 "fallback/FallbackScreenConfiguration.cpp",
83 "fallback/FallbackVibration.cpp",
85 elif CONFIG["OS_TARGET"] in ("OpenBSD", "NetBSD", "FreeBSD", "DragonFly"):
87 "fallback/FallbackHeterogeneousCpuInfo.cpp",
88 "fallback/FallbackProcessPriority.cpp",
89 "fallback/FallbackScreenConfiguration.cpp",
90 "fallback/FallbackSensor.cpp",
91 "fallback/FallbackVibration.cpp",
93 if CONFIG["MOZ_ENABLE_DBUS"]:
95 "linux/UPowerClient.cpp",
99 "fallback/FallbackBattery.cpp",
103 "fallback/FallbackBattery.cpp",
104 "fallback/FallbackHeterogeneousCpuInfo.cpp",
105 "fallback/FallbackProcessPriority.cpp",
106 "fallback/FallbackScreenConfiguration.cpp",
107 "fallback/FallbackSensor.cpp",
108 "fallback/FallbackVibration.cpp",
111 # Fallbacks for backends implemented on Android only.
112 if CONFIG["MOZ_WIDGET_TOOLKIT"] != "android":
114 "fallback/FallbackNetwork.cpp",
115 "fallback/FallbackPerformanceHintManager.cpp",
118 if CONFIG["MOZ_WIDGET_TOOLKIT"] == "cocoa":
120 "cocoa/CocoaSensor.mm",
128 include("/ipc/chromium/chromium-config.mozbuild")
130 FINAL_LIBRARY = "xul"
136 CFLAGS += CONFIG["GLIB_CFLAGS"]
137 CFLAGS += CONFIG["MOZ_GTK3_CFLAGS"]
138 CXXFLAGS += CONFIG["GLIB_CFLAGS"]
139 CXXFLAGS += CONFIG["MOZ_GTK3_CFLAGS"]