Bug 1717887 Part 1: Abstract RenderThread task pushing, and make it private. r=gfx...
[gecko.git] / hal / moz.build
blob268b24cebf59d277d5633921b5df25e753c77111
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     "HalNetworkInformation.h",
15     "HalSandbox.h",
16     "HalScreenConfiguration.h",
17     "HalSensor.h",
18     "HalTypes.h",
19     "HalWakeLock.h",
20     "HalWakeLockInformation.h",
23 EXPORTS.mozilla.fallback += [
24     "fallback/FallbackScreenConfiguration.h",
27 UNIFIED_SOURCES += [
28     "HalWakeLock.cpp",
29     "sandbox/SandboxHal.cpp",
30     "WindowIdentifier.cpp",
33 # Hal.cpp cannot be built in unified mode because it relies on HalImpl.h.
34 SOURCES += [
35     "Hal.cpp",
38 if CONFIG["MOZ_WIDGET_TOOLKIT"] == "android":
39     LOCAL_INCLUDES += [
40         "/widget/android",
41     ]
42     UNIFIED_SOURCES += [
43         "android/AndroidProcessPriority.cpp",
44         "android/AndroidSensor.cpp",
45     ]
46     # AndroidHal.cpp cannot be built in unified mode because it relies on HalImpl.h.
47     SOURCES += [
48         "android/AndroidHal.cpp",
49     ]
50 elif CONFIG["OS_TARGET"] == "Linux":
51     UNIFIED_SOURCES += [
52         "fallback/FallbackProcessPriority.cpp",
53         "fallback/FallbackScreenConfiguration.cpp",
54         "fallback/FallbackSensor.cpp",
55         "fallback/FallbackVibration.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/FallbackScreenConfiguration.cpp",
68         "fallback/FallbackVibration.cpp",
69         "windows/WindowsProcessPriority.cpp",
70         "windows/WindowsSensor.cpp",
71     ]
72     # WindowsBattery.cpp cannot be built in unified mode because it relies on HalImpl.h.
73     SOURCES += [
74         "windows/WindowsBattery.cpp",
75     ]
76 elif CONFIG["MOZ_WIDGET_TOOLKIT"] == "cocoa":
77     UNIFIED_SOURCES += [
78         "cocoa/CocoaBattery.cpp",
79         "fallback/FallbackProcessPriority.cpp",
80         "fallback/FallbackScreenConfiguration.cpp",
81         "fallback/FallbackVibration.cpp",
82     ]
83 elif CONFIG["OS_TARGET"] in ("OpenBSD", "NetBSD", "FreeBSD", "DragonFly"):
84     UNIFIED_SOURCES += [
85         "fallback/FallbackProcessPriority.cpp",
86         "fallback/FallbackScreenConfiguration.cpp",
87         "fallback/FallbackSensor.cpp",
88         "fallback/FallbackVibration.cpp",
89     ]
90     if CONFIG["MOZ_ENABLE_DBUS"]:
91         UNIFIED_SOURCES += [
92             "linux/UPowerClient.cpp",
93         ]
94     else:
95         UNIFIED_SOURCES += [
96             "fallback/FallbackBattery.cpp",
97         ]
98 else:
99     UNIFIED_SOURCES += [
100         "fallback/FallbackBattery.cpp",
101         "fallback/FallbackProcessPriority.cpp",
102         "fallback/FallbackScreenConfiguration.cpp",
103         "fallback/FallbackSensor.cpp",
104         "fallback/FallbackVibration.cpp",
105     ]
107 # Fallbacks for backends implemented on Android only.
108 if CONFIG["MOZ_WIDGET_TOOLKIT"] != "android":
109     UNIFIED_SOURCES += [
110         "fallback/FallbackNetwork.cpp",
111     ]
113 if CONFIG["MOZ_WIDGET_TOOLKIT"] == "cocoa":
114     UNIFIED_SOURCES += [
115         "cocoa/CocoaSensor.mm",
116         "cocoa/smslib.mm",
117     ]
119 IPDL_SOURCES = [
120     "sandbox/PHal.ipdl",
123 include("/ipc/chromium/chromium-config.mozbuild")
125 FINAL_LIBRARY = "xul"
127 LOCAL_INCLUDES += [
128     "/dom/base",
131 CFLAGS += CONFIG["GLIB_CFLAGS"]
132 CFLAGS += CONFIG["MOZ_DBUS_GLIB_CFLAGS"]
133 CXXFLAGS += CONFIG["GLIB_CFLAGS"]
134 CXXFLAGS += CONFIG["MOZ_DBUS_GLIB_CFLAGS"]