media/libcubeb/src/moz.build
author David Major <dmajor@mozilla.com>
Mon, 27 Apr 2015 19:59:27 -0400
changeset 241357 76604a91617d22ff1ac13948b95271bf3cc0df70
parent 203471 01a0e2c9c595e983605cb0aa5c12c9eceeb8ae7f
child 248762 d832a498605feff06b542b2b95f803adb1f5edcc
permissions -rw-r--r--
Bug 1157835: Remove the MSVC_ENABLE_PGO flag from the build system. r=glandium

# -*- 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/.

Library('cubeb')

SOURCES += [
    'cubeb.c',
    'cubeb_panner.cpp'
]

if CONFIG['MOZ_ALSA']:
    SOURCES += [
        'cubeb_alsa.c',
    ]
    DEFINES['USE_ALSA'] = True

if CONFIG['MOZ_PULSEAUDIO']:
    SOURCES += [
        'cubeb_pulse.c',
    ]
    DEFINES['USE_PULSE'] = True
    if CONFIG['MOZ_WIDGET_TOOLKIT'] == 'gonk':
        DEFINES['DISABLE_LIBPULSE_DLOPEN'] = True

if CONFIG['OS_ARCH'] == 'OpenBSD':
    SOURCES += [
        'cubeb_sndio.c',
    ]
    DEFINES['USE_SNDIO'] = True

if CONFIG['OS_TARGET'] == 'Darwin':
    SOURCES += [
        'cubeb_audiounit.c',
        'cubeb_osx_run_loop.c'
    ]
    DEFINES['USE_AUDIOUNIT'] = True

if CONFIG['OS_TARGET'] == 'WINNT':
    SOURCES += [
        'cubeb_resampler.cpp',
        'cubeb_wasapi.cpp',
        'cubeb_winmm.c',
    ]
    DEFINES['USE_WINMM'] = True
    DEFINES['USE_WASAPI'] = True

if CONFIG['OS_TARGET'] == 'Android':
    SOURCES += ['cubeb_opensl.c']
    SOURCES += ['cubeb_resampler.cpp']
    SOURCES['cubeb_opensl.c'].flags += ['-Wno-declaration-after-statement']
    DEFINES['USE_OPENSL'] = True
    if CONFIG['MOZ_WIDGET_TOOLKIT'] != 'gonk':
        SOURCES += [
            'cubeb_audiotrack.c',
        ]
        DEFINES['USE_AUDIOTRACK'] = True

if CONFIG['GKMEDIAS_SHARED_LIBRARY']:
    NO_VISIBILITY_FLAGS = True

FINAL_LIBRARY = 'gkmedias'

if CONFIG['MOZ_WIDGET_TOOLKIT'] == 'gonk':
    CFLAGS += [
        '-I%s/%s' % (CONFIG['ANDROID_SOURCE'], d) for d in [
            'frameworks/wilhelm/include',
            'system/media/wilhelm/include',
        ]
    ]

FAIL_ON_WARNINGS = True

CFLAGS += CONFIG['MOZ_ALSA_CFLAGS']
CFLAGS += CONFIG['MOZ_PULSEAUDIO_CFLAGS']