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 = 'gkmedias'
20 # The encoder is currently not included.
21 DEFINES['THEORA_DISABLE_ENCODE'] = True
23 # Suppress warnings in third-party code.
24 CFLAGS += ['-Wno-type-limits']
25 if CONFIG['CC_TYPE'] in ('clang', 'clang-cl'):
27 '-Wno-shift-negative-value',
28 '-Wno-tautological-compare',
30 if CONFIG['CC_TYPE'] == 'clang-cl':
50 LOCAL_INCLUDES += ['include']
52 if CONFIG['INTEL_ARCHITECTURE']:
53 if CONFIG['OS_ARCH'] != 'SunOS':
54 if CONFIG['CC_TYPE'] == 'clang-cl':
55 # clang-cl can't handle libtheora's inline asm.
57 elif CONFIG['OS_ARCH'] != 'WINNT' or CONFIG['CPU_ARCH'] != 'x86_64':
58 DEFINES['OC_X86_ASM'] = True
59 if CONFIG['CPU_ARCH'] == 'x86_64':
60 DEFINES['OC_X86_64_ASM'] = True
61 if CONFIG['CC_TYPE'] == 'clang-cl':
62 # clang-cl can't handle libtheora's inline asm.
65 # 'lib/x86_vc/mmxfrag.c',
66 # 'lib/x86_vc/mmxidct.c',
67 # 'lib/x86_vc/mmxstate.c',
68 # 'lib/x86_vc/x86cpu.c',
69 # 'lib/x86_vc/x86state.c',
82 if CONFIG['CPU_ARCH'] == 'arm':
87 for var in ('OC_ARM_ASM',
93 SOURCES += [ '!%s.s' % f for f in [
100 # These flags are a lie; they're just used to enable the requisite
101 # opcodes; actual arch detection is done at runtime.
105 ASFLAGS += CONFIG['NEON_FLAGS']