media/libopus/moz.build
author Birunthan Mohanathas <birunthan@mohanathas.com>
Sat, 12 Apr 2014 10:41:16 +0200
changeset 190290 c2350812b7f1188eebda30532d6108211697b97d
parent 187864 fabc466d8703e563a0044661b23c67c9f6ad6103
child 191658 72661e0787418f3652200dc6c930947ad13f49dc
permissions -rw-r--r--
Bug 946065 - Part 6: Move content/xml/ to dom/ and flatten subdirectories; sr=jst

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

EXPORTS.opus += [
    'include/opus.h',
    'include/opus_defines.h',
    'include/opus_multistream.h',
    'include/opus_types.h',
]

MSVC_ENABLE_PGO = True

FINAL_LIBRARY = 'gkmedias'

DEFINES['OPUS_BUILD'] = True
DEFINES['OPUS_VERSION'] = '"v1.1-mozilla"'
DEFINES['USE_ALLOCA'] = True

if CONFIG['MOZ_DEBUG']:
    DEFINES['ENABLE_ASSERTIONS'] = True

if CONFIG['OS_ARCH'] in ('Linux', 'Darwin', 'DragonFly', 'FreeBSD',
                         'NetBSD', 'OpenBSD'):
    DEFINES['HAVE_LRINTF'] = True

if CONFIG['OS_ARCH'] == 'WINNT':
    DEFINES['inline'] = '__inline'
    if CONFIG['GNU_CC']:
        DEFINES['HAVE_LRINTF'] = True

if CONFIG['OS_ARCH'] == 'AIX':
    DEFINES['alloca'] = '__alloca'

if CONFIG['OS_ARCH'] == 'SunOS':
    DEFINES['HAVE_ALLOCA_H'] = True

if not CONFIG['MOZ_SAMPLE_TYPE_FLOAT32']:
    DEFINES['FIXED_POINT'] = 1
    DEFINES['DISABLE_FLOAT_API'] = True

LOCAL_INCLUDES += [
    'celt',
    'include',
    'silk',
    'src',
]

# sources.mozbuild is generated from gen-sources.py when a new libopus is
# imported.
include('sources.mozbuild')

SOURCES += celt_sources
SOURCES += silk_sources
SOURCES += opus_sources

if CONFIG['MOZ_SAMPLE_TYPE_FLOAT32']:
    LOCAL_INCLUDES += [
        'silk/float',
    ]
    SOURCES += silk_sources_float
    SOURCES += opus_sources_float
else:
    LOCAL_INCLUDES += [
        'silk/fixed',
    ]
    SOURCES += silk_sources_fixed

# Suppress warnings in third-party code.
if CONFIG['GNU_CC']:
    CFLAGS += ['-Wno-declaration-after-statement']
    if CONFIG['CLANG_CXX']:
        CFLAGS += ['-Wno-\#pragma-messages']