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/AndroidProcessPriority.cpp",
41 "android/AndroidSensor.cpp",
43 # AndroidHal.cpp cannot be built in unified mode because it relies on HalImpl.h.
45 "android/AndroidHal.cpp",
47 elif CONFIG["OS_TARGET"] == "Linux":
50 "fallback/FallbackProcessPriority.cpp",
51 "fallback/FallbackScreenConfiguration.cpp",
52 "fallback/FallbackSensor.cpp",
53 "fallback/FallbackVibration.cpp",
55 if CONFIG["MOZ_ENABLE_DBUS"]:
57 "linux/UPowerClient.cpp",
61 "fallback/FallbackBattery.cpp",
63 elif CONFIG["OS_TARGET"] == "WINNT":
64 REQUIRES_UNIFIED_BUILD = True
66 "fallback/FallbackScreenConfiguration.cpp",
67 "fallback/FallbackVibration.cpp",
68 "windows/WindowsProcessPriority.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/FallbackNetwork.cpp",
112 if CONFIG["MOZ_WIDGET_TOOLKIT"] == "cocoa":
114 "cocoa/CocoaSensor.mm",
122 include("/ipc/chromium/chromium-config.mozbuild")
124 FINAL_LIBRARY = "xul"
130 CFLAGS += CONFIG["GLIB_CFLAGS"]
131 CFLAGS += CONFIG["MOZ_GTK3_CFLAGS"]
132 CFLAGS += CONFIG["MOZ_DBUS_GLIB_CFLAGS"]
133 CXXFLAGS += CONFIG["GLIB_CFLAGS"]
134 CXXFLAGS += CONFIG["MOZ_GTK3_CFLAGS"]
135 CXXFLAGS += CONFIG["MOZ_DBUS_GLIB_CFLAGS"]