1 # -*- Mode: python; c-basic-offset: 4; 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 'gonk/nsIRecoveryService.idl',
17 'HalScreenConfiguration.h',
23 TEST_DIRS += ['tests']
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/AndroidAlarm.cpp',
41 'android/AndroidSensor.cpp',
42 'fallback/FallbackPower.cpp',
43 'linux/LinuxMemory.cpp',
45 # AndroidHal.cpp cannot be built in unified mode because it relies on HalImpl.h.
47 'android/AndroidHal.cpp',
49 elif CONFIG['MOZ_WIDGET_TOOLKIT'] == 'gonk':
51 'gonk/GonkDiskSpaceWatcher.cpp',
52 'gonk/GonkFMRadio.cpp',
53 'gonk/GonkSensor.cpp',
54 'gonk/GonkSwitch.cpp',
55 'gonk/SystemService.cpp',
56 'gonk/UeventPoller.cpp',
57 'linux/LinuxMemory.cpp',
58 'linux/LinuxPower.cpp',
60 # GonkHal.cpp cannot be built in unified mode because it relies on HalImpl.h.
64 elif CONFIG['OS_TARGET'] == 'Linux':
66 'fallback/FallbackAlarm.cpp',
67 'fallback/FallbackScreenConfiguration.cpp',
68 'fallback/FallbackSensor.cpp',
69 'fallback/FallbackVibration.cpp',
70 'linux/LinuxMemory.cpp',
71 'linux/LinuxPower.cpp',
73 if CONFIG['MOZ_ENABLE_DBUS']:
75 'linux/UPowerClient.cpp',
79 'fallback/FallbackBattery.cpp',
81 elif CONFIG['OS_TARGET'] == 'WINNT':
83 'fallback/FallbackAlarm.cpp',
84 'fallback/FallbackMemory.cpp',
85 'fallback/FallbackPower.cpp',
86 'fallback/FallbackScreenConfiguration.cpp',
87 'fallback/FallbackVibration.cpp',
88 'windows/WindowsSensor.cpp',
90 # WindowsBattery.cpp cannot be built in unified mode because it relies on HalImpl.h.
92 'windows/WindowsBattery.cpp',
94 elif CONFIG['MOZ_WIDGET_TOOLKIT'] == 'cocoa':
96 'cocoa/CocoaBattery.cpp',
97 'fallback/FallbackAlarm.cpp',
98 'fallback/FallbackMemory.cpp',
99 'fallback/FallbackPower.cpp',
100 'fallback/FallbackScreenConfiguration.cpp',
101 'fallback/FallbackVibration.cpp',
103 elif CONFIG['OS_TARGET'] in ('OpenBSD', 'NetBSD', 'FreeBSD', 'DragonFly'):
105 'fallback/FallbackAlarm.cpp',
106 'fallback/FallbackMemory.cpp',
107 'fallback/FallbackPower.cpp',
108 'fallback/FallbackScreenConfiguration.cpp',
109 'fallback/FallbackSensor.cpp',
110 'fallback/FallbackVibration.cpp',
112 if CONFIG['MOZ_ENABLE_DBUS']:
114 'linux/UPowerClient.cpp',
118 'fallback/FallbackBattery.cpp',
122 'fallback/FallbackAlarm.cpp',
123 'fallback/FallbackBattery.cpp',
124 'fallback/FallbackMemory.cpp',
125 'fallback/FallbackPower.cpp',
126 'fallback/FallbackScreenConfiguration.cpp',
127 'fallback/FallbackSensor.cpp',
128 'fallback/FallbackVibration.cpp',
131 # Fallbacks for backends implemented on Gonk only.
132 if CONFIG['MOZ_WIDGET_TOOLKIT'] != 'gonk':
134 'fallback/FallbackDiskSpaceWatcher.cpp',
135 'fallback/FallbackFactoryReset.cpp',
136 'fallback/FallbackFMRadio.cpp',
137 'fallback/FallbackProcessPriority.cpp',
138 'fallback/FallbackScreenPower.cpp',
139 'fallback/FallbackSwitch.cpp',
140 'fallback/FallbackSystemService.cpp',
141 'fallback/FallbackThreadPriority.cpp',
142 'fallback/FallbackTime.cpp',
143 'fallback/FallbackWakeLocks.cpp',
146 # Fallbacks for backends implemented on Android only.
147 if CONFIG['MOZ_WIDGET_TOOLKIT'] != 'android':
149 'fallback/FallbackNetwork.cpp',
152 if CONFIG['MOZ_WIDGET_TOOLKIT'] == 'cocoa':
154 'cocoa/CocoaSensor.mm',
162 include('/ipc/chromium/chromium-config.mozbuild')
164 FINAL_LIBRARY = 'xul'
166 if CONFIG['MOZ_GAMEPAD']:
171 if CONFIG['MOZ_WIDGET_TOOLKIT'] == 'gonk':
172 # So that we can call nsScreenManagerGonk::GetConfiguration().
178 if CONFIG['MOZ_WIDGET_TOOLKIT'] == 'gonk':
179 LOCAL_INCLUDES += ['%' + '%s/hardware/libhardware_legacy/include' % CONFIG['ANDROID_SOURCE']]
181 CFLAGS += CONFIG['GLIB_CFLAGS']
182 CFLAGS += CONFIG['MOZ_DBUS_GLIB_CFLAGS']
183 CXXFLAGS += CONFIG['GLIB_CFLAGS']
184 CXXFLAGS += CONFIG['MOZ_DBUS_GLIB_CFLAGS']
186 if CONFIG['GNU_CXX']:
187 CXXFLAGS += ['-Wshadow']