hal/moz.build
author Wes Johnston <wjohnston@mozilla.com>
Mon, 03 Jun 2013 09:20:45 -0700
changeset 133817 c3b5567f1271c88ebc991c6155a35e3db5121d34
parent 133053 6e45e9f62d2171419a8d8780ad4779ff0488ccb5
child 133958 4b3ac2b997246e8ef414e22f85f8cd4cf54b9b5e
permissions -rw-r--r--
Bug 872147 - Make FeedHandler use async prompts. r=mfinkle

# -*- Mode: python; c-basic-offset: 4; indent-tabs-mode: nil; tab-width: 40 -*-
# vim: set filetype=python:
# This Source Code Form is subject to the terms of the Mozilla Public
# License, v. 2.0. If a copy of the MPL was not distributed with this
# file, You can obtain one at http://mozilla.org/MPL/2.0/.

XPIDL_SOURCES += [
    'nsIRecoveryService.idl',
]

MODULE = 'hal'

EXPORTS.mozilla += [
    'Hal.h',
    'HalImpl.h',
    'HalSandbox.h',
    'HalSensor.h',
    'HalTypes.h',
    'HalWakeLock.h',
]

CPP_SOURCES += [
    'Hal.cpp',
    'HalWakeLock.cpp',
    'SandboxHal.cpp',
    'WindowIdentifier.cpp',
]

if CONFIG['MOZ_GAMEPAD_BACKEND'] == 'stub':
    CPP_SOURCES += [
        'FallbackGamepad.cpp'
    ]
elif CONFIG['MOZ_GAMEPAD_BACKEND'] == 'cocoa':
    CPP_SOURCES += [
        'CocoaGamepad.cpp'
    ]
elif CONFIG['MOZ_GAMEPAD_BACKEND'] == 'windows':
    CPP_SOURCES += [
        'WindowsGamepad.cpp'
    ]
elif CONFIG['MOZ_GAMEPAD_BACKEND'] == 'linux':
    CPP_SOURCES += [
        'LinuxGamepad.cpp'
    ]

if CONFIG['MOZ_WIDGET_TOOLKIT'] == 'android':
    CPP_SOURCES += [
        'AndroidHal.cpp',
        'AndroidSensor.cpp',
        'FallbackPower.cpp',
        'FallbackAlarm.cpp',
    ]
elif CONFIG['MOZ_WIDGET_TOOLKIT'] == 'gonk':
    CPP_SOURCES += [
        'GonkHal.cpp',
        'LinuxPower.cpp',
        'GonkSensor.cpp',
        'UeventPoller.cpp',
        'GonkSwitch.cpp',
        'GonkFMRadio.cpp',
        'GonkDiskSpaceWatcher.cpp',
    ]
elif CONFIG['OS_TARGET'] == 'Linux':
    CPP_SOURCES += [
        'LinuxPower.cpp',
        'FallbackScreenConfiguration.cpp',
        'FallbackSensor.cpp',
        'FallbackVibration.cpp',
        'FallbackAlarm.cpp',
    ]
    if CONFIG['MOZ_ENABLE_DBUS']:
        CPP_SOURCES += [
            'UPowerClient.cpp'
        ]
    else:
        CPP_SOURCES += [
            'FallbackBattery.cpp'
        ]
elif CONFIG['OS_TARGET'] == 'WINNT':
    CPP_SOURCES += [
        'WindowsBattery.cpp',
        'WindowsSensor.cpp',
        'FallbackVibration.cpp',
        'FallbackScreenConfiguration.cpp',
        'FallbackPower.cpp',
        'FallbackAlarm.cpp',
    ]
elif CONFIG['MOZ_WIDGET_TOOLKIT'] == 'cocoa':
    CPP_SOURCES += [
        'CocoaBattery.cpp',
        'FallbackVibration.cpp',
        'FallbackPower.cpp',
        'FallbackScreenConfiguration.cpp',
        'FallbackAlarm.cpp',
    ]
elif CONFIG['OS_TARGET'] in ('OpenBSD', 'NetBSD', 'FreeBSD', 'DragonFly'):
    CPP_SOURCES += [
        'FallbackSensor.cpp',
        'FallbackVibration.cpp',
        'FallbackPower.cpp',
        'FallbackScreenConfiguration.cpp',
        'FallbackAlarm.cpp',
    ]
    if CONFIG['MOZ_ENABLE_DBUS']:
        CPP_SOURCES += [
            'UPowerClient.cpp'
        ]
    else:
        CPP_SOURCES += [
            'FallbackBattery.cpp'
        ]
else:
    CPP_SOURCES += [
        'FallbackBattery.cpp',
        'FallbackSensor.cpp',
        'FallbackVibration.cpp',
        'FallbackPower.cpp',
        'FallbackScreenConfiguration.cpp',
        'FallbackAlarm.cpp',
    ]

# Fallbacks for backends implemented on Gonk only.
if CONFIG['MOZ_WIDGET_TOOLKIT'] != 'gonk':
    CPP_SOURCES += [
        'FallbackLights.cpp',
        'FallbackTime.cpp',
        'FallbackWakeLocks.cpp',
        'FallbackSwitch.cpp',
        'FallbackScreenPower.cpp',
        'FallbackProcessPriority.cpp',
        'FallbackFMRadio.cpp',
        'FallbackFactoryReset.cpp',
        'FallbackDiskSpaceWatcher.cpp',
    ]

# Fallbacks for backends implemented on Android only.
if CONFIG['MOZ_WIDGET_TOOLKIT'] != 'android':
    CPP_SOURCES += [
        'FallbackNetwork.cpp'
    ]