Wed, 31 Dec 2014 06:55:50 +0100
Added tag UPSTREAM_283F7C6 for changeset ca08bd8f51b2
michael@0 | 1 | # -*- Mode: python; c-basic-offset: 4; indent-tabs-mode: nil; tab-width: 40 -*- |
michael@0 | 2 | # vim: set filetype=python: |
michael@0 | 3 | # This Source Code Form is subject to the terms of the Mozilla Public |
michael@0 | 4 | # License, v. 2.0. If a copy of the MPL was not distributed with this |
michael@0 | 5 | # file, You can obtain one at http://mozilla.org/MPL/2.0/. |
michael@0 | 6 | |
michael@0 | 7 | XPIDL_SOURCES += [ |
michael@0 | 8 | 'gonk/nsIRecoveryService.idl', |
michael@0 | 9 | ] |
michael@0 | 10 | |
michael@0 | 11 | XPIDL_MODULE = 'hal' |
michael@0 | 12 | |
michael@0 | 13 | EXPORTS.mozilla += [ |
michael@0 | 14 | 'Hal.h', |
michael@0 | 15 | 'HalImpl.h', |
michael@0 | 16 | 'HalSandbox.h', |
michael@0 | 17 | 'HalScreenConfiguration.h', |
michael@0 | 18 | 'HalSensor.h', |
michael@0 | 19 | 'HalTypes.h', |
michael@0 | 20 | 'HalWakeLock.h', |
michael@0 | 21 | ] |
michael@0 | 22 | |
michael@0 | 23 | TEST_DIRS += ['tests'] |
michael@0 | 24 | UNIFIED_SOURCES += [ |
michael@0 | 25 | 'HalWakeLock.cpp', |
michael@0 | 26 | 'sandbox/SandboxHal.cpp', |
michael@0 | 27 | 'WindowIdentifier.cpp', |
michael@0 | 28 | ] |
michael@0 | 29 | |
michael@0 | 30 | # Hal.cpp cannot be built in unified mode because it relies on HalImpl.h. |
michael@0 | 31 | SOURCES += [ |
michael@0 | 32 | 'Hal.cpp', |
michael@0 | 33 | ] |
michael@0 | 34 | |
michael@0 | 35 | if CONFIG['MOZ_GAMEPAD_BACKEND'] == 'stub': |
michael@0 | 36 | UNIFIED_SOURCES += [ |
michael@0 | 37 | 'fallback/FallbackGamepad.cpp' |
michael@0 | 38 | ] |
michael@0 | 39 | elif CONFIG['MOZ_GAMEPAD_BACKEND'] == 'cocoa': |
michael@0 | 40 | UNIFIED_SOURCES += [ |
michael@0 | 41 | 'cocoa/CocoaGamepad.cpp' |
michael@0 | 42 | ] |
michael@0 | 43 | elif CONFIG['MOZ_GAMEPAD_BACKEND'] == 'windows': |
michael@0 | 44 | UNIFIED_SOURCES += [ |
michael@0 | 45 | 'windows/WindowsGamepad.cpp' |
michael@0 | 46 | ] |
michael@0 | 47 | elif CONFIG['MOZ_GAMEPAD_BACKEND'] == 'linux': |
michael@0 | 48 | UNIFIED_SOURCES += [ |
michael@0 | 49 | 'linux/LinuxGamepad.cpp' |
michael@0 | 50 | ] |
michael@0 | 51 | |
michael@0 | 52 | if CONFIG['MOZ_WIDGET_TOOLKIT'] == 'android': |
michael@0 | 53 | UNIFIED_SOURCES += [ |
michael@0 | 54 | 'android/AndroidSensor.cpp', |
michael@0 | 55 | 'fallback/FallbackAlarm.cpp', |
michael@0 | 56 | 'fallback/FallbackPower.cpp', |
michael@0 | 57 | 'linux/LinuxMemory.cpp', |
michael@0 | 58 | ] |
michael@0 | 59 | # AndroidHal.cpp cannot be built in unified mode because it relies on HalImpl.h. |
michael@0 | 60 | SOURCES += [ |
michael@0 | 61 | 'android/AndroidHal.cpp', |
michael@0 | 62 | ] |
michael@0 | 63 | elif CONFIG['MOZ_WIDGET_TOOLKIT'] == 'gonk': |
michael@0 | 64 | UNIFIED_SOURCES += [ |
michael@0 | 65 | 'gonk/GonkDiskSpaceWatcher.cpp', |
michael@0 | 66 | 'gonk/GonkFMRadio.cpp', |
michael@0 | 67 | 'gonk/GonkSensor.cpp', |
michael@0 | 68 | 'gonk/GonkSwitch.cpp', |
michael@0 | 69 | 'gonk/UeventPoller.cpp', |
michael@0 | 70 | 'linux/LinuxMemory.cpp', |
michael@0 | 71 | 'linux/LinuxPower.cpp', |
michael@0 | 72 | ] |
michael@0 | 73 | # GonkHal.cpp cannot be built in unified mode because it relies on HalImpl.h. |
michael@0 | 74 | SOURCES += [ |
michael@0 | 75 | 'gonk/GonkHal.cpp', |
michael@0 | 76 | ] |
michael@0 | 77 | elif CONFIG['OS_TARGET'] == 'Linux': |
michael@0 | 78 | UNIFIED_SOURCES += [ |
michael@0 | 79 | 'fallback/FallbackAlarm.cpp', |
michael@0 | 80 | 'fallback/FallbackScreenConfiguration.cpp', |
michael@0 | 81 | 'fallback/FallbackSensor.cpp', |
michael@0 | 82 | 'fallback/FallbackVibration.cpp', |
michael@0 | 83 | 'linux/LinuxMemory.cpp', |
michael@0 | 84 | 'linux/LinuxPower.cpp', |
michael@0 | 85 | ] |
michael@0 | 86 | if CONFIG['MOZ_ENABLE_DBUS']: |
michael@0 | 87 | UNIFIED_SOURCES += [ |
michael@0 | 88 | 'linux/UPowerClient.cpp', |
michael@0 | 89 | ] |
michael@0 | 90 | else: |
michael@0 | 91 | UNIFIED_SOURCES += [ |
michael@0 | 92 | 'fallback/FallbackBattery.cpp', |
michael@0 | 93 | ] |
michael@0 | 94 | elif CONFIG['OS_TARGET'] == 'WINNT': |
michael@0 | 95 | UNIFIED_SOURCES += [ |
michael@0 | 96 | 'fallback/FallbackAlarm.cpp', |
michael@0 | 97 | 'fallback/FallbackMemory.cpp', |
michael@0 | 98 | 'fallback/FallbackPower.cpp', |
michael@0 | 99 | 'fallback/FallbackScreenConfiguration.cpp', |
michael@0 | 100 | 'fallback/FallbackVibration.cpp', |
michael@0 | 101 | 'windows/WindowsSensor.cpp', |
michael@0 | 102 | ] |
michael@0 | 103 | # WindowsBattery.cpp cannot be built in unified mode because it relies on HalImpl.h. |
michael@0 | 104 | SOURCES += [ |
michael@0 | 105 | 'windows/WindowsBattery.cpp', |
michael@0 | 106 | ] |
michael@0 | 107 | elif CONFIG['MOZ_WIDGET_TOOLKIT'] == 'cocoa': |
michael@0 | 108 | UNIFIED_SOURCES += [ |
michael@0 | 109 | 'cocoa/CocoaBattery.cpp', |
michael@0 | 110 | 'fallback/FallbackAlarm.cpp', |
michael@0 | 111 | 'fallback/FallbackMemory.cpp', |
michael@0 | 112 | 'fallback/FallbackPower.cpp', |
michael@0 | 113 | 'fallback/FallbackScreenConfiguration.cpp', |
michael@0 | 114 | 'fallback/FallbackVibration.cpp', |
michael@0 | 115 | ] |
michael@0 | 116 | elif CONFIG['OS_TARGET'] in ('OpenBSD', 'NetBSD', 'FreeBSD', 'DragonFly'): |
michael@0 | 117 | UNIFIED_SOURCES += [ |
michael@0 | 118 | 'fallback/FallbackAlarm.cpp', |
michael@0 | 119 | 'fallback/FallbackMemory.cpp', |
michael@0 | 120 | 'fallback/FallbackPower.cpp', |
michael@0 | 121 | 'fallback/FallbackScreenConfiguration.cpp', |
michael@0 | 122 | 'fallback/FallbackSensor.cpp', |
michael@0 | 123 | 'fallback/FallbackVibration.cpp', |
michael@0 | 124 | ] |
michael@0 | 125 | if CONFIG['MOZ_ENABLE_DBUS']: |
michael@0 | 126 | UNIFIED_SOURCES += [ |
michael@0 | 127 | 'linux/UPowerClient.cpp', |
michael@0 | 128 | ] |
michael@0 | 129 | else: |
michael@0 | 130 | UNIFIED_SOURCES += [ |
michael@0 | 131 | 'fallback/FallbackBattery.cpp', |
michael@0 | 132 | ] |
michael@0 | 133 | else: |
michael@0 | 134 | UNIFIED_SOURCES += [ |
michael@0 | 135 | 'fallback/FallbackAlarm.cpp', |
michael@0 | 136 | 'fallback/FallbackBattery.cpp', |
michael@0 | 137 | 'fallback/FallbackMemory.cpp', |
michael@0 | 138 | 'fallback/FallbackPower.cpp', |
michael@0 | 139 | 'fallback/FallbackScreenConfiguration.cpp', |
michael@0 | 140 | 'fallback/FallbackSensor.cpp', |
michael@0 | 141 | 'fallback/FallbackVibration.cpp', |
michael@0 | 142 | ] |
michael@0 | 143 | |
michael@0 | 144 | # Fallbacks for backends implemented on Gonk only. |
michael@0 | 145 | if CONFIG['MOZ_WIDGET_TOOLKIT'] != 'gonk': |
michael@0 | 146 | UNIFIED_SOURCES += [ |
michael@0 | 147 | 'fallback/FallbackDiskSpaceWatcher.cpp', |
michael@0 | 148 | 'fallback/FallbackFactoryReset.cpp', |
michael@0 | 149 | 'fallback/FallbackFMRadio.cpp', |
michael@0 | 150 | 'fallback/FallbackLights.cpp', |
michael@0 | 151 | 'fallback/FallbackProcessPriority.cpp', |
michael@0 | 152 | 'fallback/FallbackScreenPower.cpp', |
michael@0 | 153 | 'fallback/FallbackSwitch.cpp', |
michael@0 | 154 | 'fallback/FallbackTime.cpp', |
michael@0 | 155 | 'fallback/FallbackWakeLocks.cpp', |
michael@0 | 156 | ] |
michael@0 | 157 | |
michael@0 | 158 | # Fallbacks for backends implemented on Android only. |
michael@0 | 159 | if CONFIG['MOZ_WIDGET_TOOLKIT'] != 'android': |
michael@0 | 160 | UNIFIED_SOURCES += [ |
michael@0 | 161 | 'fallback/FallbackNetwork.cpp', |
michael@0 | 162 | ] |
michael@0 | 163 | |
michael@0 | 164 | if CONFIG['MOZ_WIDGET_TOOLKIT'] == 'cocoa': |
michael@0 | 165 | UNIFIED_SOURCES += [ |
michael@0 | 166 | 'cocoa/CocoaSensor.mm', |
michael@0 | 167 | 'cocoa/smslib.mm', |
michael@0 | 168 | ] |
michael@0 | 169 | |
michael@0 | 170 | IPDL_SOURCES = [ |
michael@0 | 171 | 'sandbox/PHal.ipdl', |
michael@0 | 172 | ] |
michael@0 | 173 | |
michael@0 | 174 | FAIL_ON_WARNINGS = True |
michael@0 | 175 | |
michael@0 | 176 | include('/ipc/chromium/chromium-config.mozbuild') |
michael@0 | 177 | |
michael@0 | 178 | FINAL_LIBRARY = 'xul' |
michael@0 | 179 | |
michael@0 | 180 | if CONFIG['MOZ_GAMEPAD']: |
michael@0 | 181 | LOCAL_INCLUDES += [ |
michael@0 | 182 | '/dom/base', |
michael@0 | 183 | ] |
michael@0 | 184 | |
michael@0 | 185 | if CONFIG['MOZ_WIDGET_TOOLKIT'] == 'gonk': |
michael@0 | 186 | # So that we can call nsScreenManagerGonk::GetConfiguration(). |
michael@0 | 187 | LOCAL_INCLUDES += [ |
michael@0 | 188 | '/widget/gonk', |
michael@0 | 189 | '/widget/xpwidgets' |
michael@0 | 190 | ] |
michael@0 | 191 | |
michael@0 | 192 | if CONFIG['MOZ_WIDGET_TOOLKIT'] == 'gonk': |
michael@0 | 193 | CXXFLAGS += ['-I%s/hardware/libhardware_legacy/include' % CONFIG['ANDROID_SOURCE']] |