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