no bug - Bumping Firefox l10n changesets r=release a=l10n-bump DONTBUILD CLOSED TREE
[gecko.git] / hal / moz.build
blob6354771dbfc673cd9d45ef414518365c7311e3ef
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/FallbackScreenConfiguration.cpp",
52         "fallback/FallbackSensor.cpp",
53         "fallback/FallbackVibration.cpp",
54         "linux/LinuxProcessPriority.cpp",
55     ]
56     if CONFIG["MOZ_ENABLE_DBUS"]:
57         UNIFIED_SOURCES += [
58             "linux/UPowerClient.cpp",
59         ]
60     else:
61         UNIFIED_SOURCES += [
62             "fallback/FallbackBattery.cpp",
63         ]
64 elif CONFIG["OS_TARGET"] == "WINNT":
65     UNIFIED_SOURCES += [
66         "fallback/FallbackVibration.cpp",
67         "windows/WindowsProcessPriority.cpp",
68         "windows/WindowsScreenConfiguration.cpp",
69         "windows/WindowsSensor.cpp",
70     ]
71     # WindowsBattery.cpp cannot be built in unified mode because it relies on HalImpl.h.
72     SOURCES += [
73         "windows/WindowsBattery.cpp",
74     ]
75 elif CONFIG["MOZ_WIDGET_TOOLKIT"] == "cocoa":
76     UNIFIED_SOURCES += [
77         "cocoa/CocoaBattery.cpp",
78         "fallback/FallbackProcessPriority.cpp",
79         "fallback/FallbackScreenConfiguration.cpp",
80         "fallback/FallbackVibration.cpp",
81     ]
82 elif CONFIG["OS_TARGET"] in ("OpenBSD", "NetBSD", "FreeBSD", "DragonFly"):
83     UNIFIED_SOURCES += [
84         "fallback/FallbackProcessPriority.cpp",
85         "fallback/FallbackScreenConfiguration.cpp",
86         "fallback/FallbackSensor.cpp",
87         "fallback/FallbackVibration.cpp",
88     ]
89     if CONFIG["MOZ_ENABLE_DBUS"]:
90         UNIFIED_SOURCES += [
91             "linux/UPowerClient.cpp",
92         ]
93     else:
94         UNIFIED_SOURCES += [
95             "fallback/FallbackBattery.cpp",
96         ]
97 else:
98     UNIFIED_SOURCES += [
99         "fallback/FallbackBattery.cpp",
100         "fallback/FallbackProcessPriority.cpp",
101         "fallback/FallbackScreenConfiguration.cpp",
102         "fallback/FallbackSensor.cpp",
103         "fallback/FallbackVibration.cpp",
104     ]
106 # Fallbacks for backends implemented on Android only.
107 if CONFIG["MOZ_WIDGET_TOOLKIT"] != "android":
108     UNIFIED_SOURCES += [
109         "fallback/FallbackHeterogeneousCpuInfo.cpp",
110         "fallback/FallbackNetwork.cpp",
111         "fallback/FallbackPerformanceHintManager.cpp",
112     ]
114 if CONFIG["MOZ_WIDGET_TOOLKIT"] == "cocoa":
115     UNIFIED_SOURCES += [
116         "cocoa/CocoaSensor.mm",
117         "cocoa/smslib.mm",
118     ]
120 IPDL_SOURCES = [
121     "sandbox/PHal.ipdl",
124 include("/ipc/chromium/chromium-config.mozbuild")
126 FINAL_LIBRARY = "xul"
128 LOCAL_INCLUDES += [
129     "/dom/base",
132 CFLAGS += CONFIG["GLIB_CFLAGS"]
133 CFLAGS += CONFIG["MOZ_GTK3_CFLAGS"]
134 CXXFLAGS += CONFIG["GLIB_CFLAGS"]
135 CXXFLAGS += CONFIG["MOZ_GTK3_CFLAGS"]