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/AndroidPerformanceHintManager.cpp",
41 "android/AndroidProcessPriority.cpp",
42 "android/AndroidSensor.cpp",
44 # AndroidHal.cpp cannot be built in unified mode because it relies on HalImpl.h.
46 "android/AndroidHal.cpp",
48 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/WindowsSensor.cpp",
69 # WindowsBattery.cpp cannot be built in unified mode because it relies on HalImpl.h.
70 # WindowsProcessPriority.cpp needs to set _WIN32_WINNT to Windows 8
71 # WindowsScreenConfiguration.cpp needs to set WINVER to 0x0602.
73 "windows/WindowsBattery.cpp",
74 "windows/WindowsProcessPriority.cpp",
75 "windows/WindowsScreenConfiguration.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",
112 "fallback/FallbackPerformanceHintManager.cpp",
115 if CONFIG["MOZ_WIDGET_TOOLKIT"] == "cocoa":
117 "cocoa/CocoaSensor.mm",
125 include("/ipc/chromium/chromium-config.mozbuild")
127 FINAL_LIBRARY = "xul"
133 CFLAGS += CONFIG["GLIB_CFLAGS"]
134 CFLAGS += CONFIG["MOZ_GTK3_CFLAGS"]
135 CFLAGS += CONFIG["MOZ_DBUS_GLIB_CFLAGS"]
136 CXXFLAGS += CONFIG["GLIB_CFLAGS"]
137 CXXFLAGS += CONFIG["MOZ_GTK3_CFLAGS"]
138 CXXFLAGS += CONFIG["MOZ_DBUS_GLIB_CFLAGS"]