1 # -*- Mode: python; 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/.
8 BUG_COMPONENT = ('Core', 'Audio/Video')
11 'include/theora/codec.h',
12 'include/theora/theoradec.h',
15 # We allow warnings for third-party code that can be updated from upstream.
16 AllowCompilerWarnings()
18 FINAL_LIBRARY = 'gkcodecs'
21 # The encoder is currently not included.
22 DEFINES['THEORA_DISABLE_ENCODE'] = True
24 # Suppress warnings in third-party code.
25 CFLAGS += ['-Wno-type-limits']
26 if CONFIG['CC_TYPE'] in ('clang', 'clang-cl'):
28 '-Wno-shift-negative-value',
29 '-Wno-tautological-compare',
31 if CONFIG['CC_TYPE'] == 'clang-cl':
51 LOCAL_INCLUDES += ['include']
53 if CONFIG['INTEL_ARCHITECTURE']:
54 if CONFIG['OS_ARCH'] != 'SunOS':
55 if CONFIG['CC_TYPE'] == 'clang-cl':
56 # clang-cl can't handle libtheora's inline asm.
58 elif CONFIG['OS_ARCH'] != 'WINNT' or CONFIG['CPU_ARCH'] != 'x86_64':
59 DEFINES['OC_X86_ASM'] = True
60 if CONFIG['CPU_ARCH'] == 'x86_64':
61 DEFINES['OC_X86_64_ASM'] = True
62 if CONFIG['CC_TYPE'] == 'clang-cl':
63 # clang-cl can't handle libtheora's inline asm.
66 # 'lib/x86_vc/mmxfrag.c',
67 # 'lib/x86_vc/mmxidct.c',
68 # 'lib/x86_vc/mmxstate.c',
69 # 'lib/x86_vc/x86cpu.c',
70 # 'lib/x86_vc/x86state.c',
83 if CONFIG['CPU_ARCH'] == 'arm':
88 for var in ('OC_ARM_ASM',
94 SOURCES += [ '!%s.s' % f for f in [
101 # These flags are a lie; they're just used to enable the requisite
102 # opcodes; actual arch detection is done at runtime.
106 ASFLAGS += CONFIG['NEON_FLAGS']