media/libtheora/lib/moz.build

Thu, 22 Jan 2015 13:21:57 +0100

author
Michael Schloh von Bennewitz <michael@schloh.com>
date
Thu, 22 Jan 2015 13:21:57 +0100
branch
TOR_BUG_9701
changeset 15
b8a032363ba2
permissions
-rw-r--r--

Incorporate requested changes from Mozilla in review:
https://bugzilla.mozilla.org/show_bug.cgi?id=1123480#c6

     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/.
     7 UNIFIED_SOURCES += [
     8     'apiwrapper.c',
     9     'bitpack.c',
    10     'decapiwrapper.c',
    11     'decinfo.c',
    12     'decode.c',
    13     'dequant.c',
    14     'fragment.c',
    15     'huffdec.c',
    16     'idct.c',
    17     'info.c',
    18     'internal.c',
    19     'quant.c',
    20     'state.c',
    21 ]
    23 if CONFIG['CPU_ARCH'] == 'arm' and CONFIG['GNU_AS']:
    24     GENERATED_SOURCES += [ '%s.%s' % (f, CONFIG['ASM_SUFFIX']) for f in [
    25         'armbits-gnu',
    26         'armfrag-gnu',
    27         'armidct-gnu',
    28         'armloop-gnu',
    29     ]]
    31 if '86' in CONFIG['OS_TEST']:
    32     if CONFIG['OS_ARCH'] != 'SunOS':
    33         if CONFIG['OS_ARCH'] != 'WINNT' or CONFIG['OS_TEST'] != 'x86_64':
    34             DEFINES['OC_X86_ASM'] = True
    35             if '64' in CONFIG['OS_TEST']:
    36                 DEFINES['OC_X86_64_ASM'] = True
    37     if CONFIG['_MSC_VER']:
    38         if '64' not in CONFIG['OS_TEST']:
    39             SOURCES += [
    40                 'x86_vc/mmxfrag.c',
    41                 'x86_vc/mmxidct.c',
    42                 'x86_vc/mmxstate.c',
    43                 'x86_vc/x86cpu.c',
    44                 'x86_vc/x86state.c',
    45             ]
    46     else:
    47         SOURCES += [
    48             'x86/mmxfrag.c',
    49             'x86/mmxidct.c',
    50             'x86/mmxstate.c',
    51             'x86/sse2idct.c',
    52             'x86/x86cpu.c',
    53             'x86/x86state.c',
    54         ]
    56 if CONFIG['GNU_AS']:
    57     if 'arm' in CONFIG['OS_TEST']:
    58         SOURCES += [
    59             'arm/armcpu.c',
    60             'arm/armstate.c',
    61         ]
    62         for var in ('OC_ARM_ASM', 'OC_ARM_ASM_EDSP', 'OC_ARM_ASM_MEDIA',
    63                     'OC_ARM_ASM_NEON'):
    64             DEFINES[var] = True
    65         # The Android NDK doesn't pre-define anything to indicate the OS it's
    66         # on, so do it for them.
    67         if CONFIG['OS_TARGET'] == 'Android':
    68             DEFINES['__linux__'] = True
    70 MSVC_ENABLE_PGO = True
    72 if CONFIG['GKMEDIAS_SHARED_LIBRARY']:
    73     NO_VISIBILITY_FLAGS = True
    75 FINAL_LIBRARY = 'gkmedias'
    77 # The encoder is currently not included.
    78 DEFINES['THEORA_DISABLE_ENCODE'] = True
    80 # Suppress warnings in third-party code.
    81 if CONFIG['GNU_CC']:
    82     CFLAGS += ['-Wno-type-limits']
    83     if CONFIG['CLANG_CXX']:
    84         CFLAGS += ['-Wno-tautological-compare']

mercurial