Bug 1883912: Enable Intl.ListFormat test for "unit" style. r=spidermonkey-reviewers...
[gecko.git] / hal / moz.build
blob912a157372eaa09e784a35fba369ff3412fd160d
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/.
7 with Files("**"):
8     BUG_COMPONENT = ("Core", "Hardware Abstraction Layer (HAL)")
10 EXPORTS.mozilla += [
11     "Hal.h",
12     "HalBatteryInformation.h",
13     "HalImpl.h",
14     "HalIPCUtils.h",
15     "HalNetworkInformation.h",
16     "HalSandbox.h",
17     "HalScreenConfiguration.h",
18     "HalSensor.h",
19     "HalTypes.h",
20     "HalWakeLock.h",
21     "HalWakeLockInformation.h",
24 UNIFIED_SOURCES += [
25     "HalWakeLock.cpp",
26     "sandbox/SandboxHal.cpp",
27     "WindowIdentifier.cpp",
30 # Hal.cpp cannot be built in unified mode because it relies on HalImpl.h.
31 SOURCES += [
32     "Hal.cpp",
35 if CONFIG["MOZ_WIDGET_TOOLKIT"] == "android":
36     LOCAL_INCLUDES += [
37         "/widget/android",
38     ]
39     UNIFIED_SOURCES += [
40         "android/AndroidHeterogeneousCpuInfo.cpp",
41         "android/AndroidPerformanceHintManager.cpp",
42         "android/AndroidProcessPriority.cpp",
43         "android/AndroidSensor.cpp",
44     ]
45     # AndroidHal.cpp cannot be built in unified mode because it relies on HalImpl.h.
46     SOURCES += [
47         "android/AndroidHal.cpp",
48     ]
49 elif CONFIG["OS_TARGET"] == "Linux":
50     UNIFIED_SOURCES += [
51         "fallback/FallbackHeterogeneousCpuInfo.cpp",
52         "fallback/FallbackScreenConfiguration.cpp",
53         "fallback/FallbackSensor.cpp",
54         "fallback/FallbackVibration.cpp",
55         "linux/LinuxProcessPriority.cpp",
56     ]
57     if CONFIG["MOZ_ENABLE_DBUS"]:
58         UNIFIED_SOURCES += [
59             "linux/UPowerClient.cpp",
60         ]
61     else:
62         UNIFIED_SOURCES += [
63             "fallback/FallbackBattery.cpp",
64         ]
65 elif CONFIG["OS_TARGET"] == "WINNT":
66     UNIFIED_SOURCES += [
67         "fallback/FallbackHeterogeneousCpuInfo.cpp",
68         "fallback/FallbackVibration.cpp",
69         "windows/WindowsProcessPriority.cpp",
70         "windows/WindowsScreenConfiguration.cpp",
71         "windows/WindowsSensor.cpp",
72     ]
73     # WindowsBattery.cpp cannot be built in unified mode because it relies on HalImpl.h.
74     SOURCES += [
75         "windows/WindowsBattery.cpp",
76     ]
77 elif CONFIG["MOZ_WIDGET_TOOLKIT"] == "cocoa":
78     UNIFIED_SOURCES += [
79         "cocoa/CocoaBattery.cpp",
80         "cocoa/CocoaHeterogeneousCpuInfo.cpp",
81         "fallback/FallbackProcessPriority.cpp",
82         "fallback/FallbackScreenConfiguration.cpp",
83         "fallback/FallbackVibration.cpp",
84     ]
85 elif CONFIG["OS_TARGET"] in ("OpenBSD", "NetBSD", "FreeBSD", "DragonFly"):
86     UNIFIED_SOURCES += [
87         "fallback/FallbackHeterogeneousCpuInfo.cpp",
88         "fallback/FallbackProcessPriority.cpp",
89         "fallback/FallbackScreenConfiguration.cpp",
90         "fallback/FallbackSensor.cpp",
91         "fallback/FallbackVibration.cpp",
92     ]
93     if CONFIG["MOZ_ENABLE_DBUS"]:
94         UNIFIED_SOURCES += [
95             "linux/UPowerClient.cpp",
96         ]
97     else:
98         UNIFIED_SOURCES += [
99             "fallback/FallbackBattery.cpp",
100         ]
101 else:
102     UNIFIED_SOURCES += [
103         "fallback/FallbackBattery.cpp",
104         "fallback/FallbackHeterogeneousCpuInfo.cpp",
105         "fallback/FallbackProcessPriority.cpp",
106         "fallback/FallbackScreenConfiguration.cpp",
107         "fallback/FallbackSensor.cpp",
108         "fallback/FallbackVibration.cpp",
109     ]
111 # Fallbacks for backends implemented on Android only.
112 if CONFIG["MOZ_WIDGET_TOOLKIT"] != "android":
113     UNIFIED_SOURCES += [
114         "fallback/FallbackNetwork.cpp",
115         "fallback/FallbackPerformanceHintManager.cpp",
116     ]
118 if CONFIG["MOZ_WIDGET_TOOLKIT"] == "cocoa":
119     UNIFIED_SOURCES += [
120         "cocoa/CocoaSensor.mm",
121         "cocoa/smslib.mm",
122     ]
124 IPDL_SOURCES = [
125     "sandbox/PHal.ipdl",
128 include("/ipc/chromium/chromium-config.mozbuild")
130 FINAL_LIBRARY = "xul"
132 LOCAL_INCLUDES += [
133     "/dom/base",
136 CFLAGS += CONFIG["GLIB_CFLAGS"]
137 CFLAGS += CONFIG["MOZ_GTK3_CFLAGS"]
138 CXXFLAGS += CONFIG["GLIB_CFLAGS"]
139 CXXFLAGS += CONFIG["MOZ_GTK3_CFLAGS"]