diff options
Diffstat (limited to 'media/libtheora/moz.build')
-rw-r--r-- | media/libtheora/moz.build | 52 |
1 files changed, 27 insertions, 25 deletions
diff --git a/media/libtheora/moz.build b/media/libtheora/moz.build index aaec4c2ad8..8bcdb5fd47 100644 --- a/media/libtheora/moz.build +++ b/media/libtheora/moz.build @@ -1,5 +1,4 @@ # -*- Mode: python; 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/. @@ -10,6 +9,7 @@ with Files('*'): EXPORTS.theora += [ 'include/theora/codec.h', 'include/theora/theoradec.h', + 'include/theora/theoraenc.h', ] # We allow warnings for third-party code that can be updated from upstream. @@ -24,20 +24,20 @@ if CONFIG['GKMEDIAS_SHARED_LIBRARY']: DEFINES['THEORA_DISABLE_ENCODE'] = True # Suppress warnings in third-party code. -CFLAGS += ['-Wno-type-limits'] -if CONFIG['CC_TYPE'] in ('clang', 'clang-cl'): +if CONFIG['GNU_CC'] or CONFIG['CLANG_CL']: + CFLAGS += ['-Wno-type-limits'] +if CONFIG['CLANG_CXX'] or CONFIG['CLANG_CL']: + CFLAGS += ['-Wno-tautological-compare'] +if CONFIG['CLANG_CL']: CFLAGS += [ - '-Wno-shift-negative-value', - '-Wno-tautological-compare', - ] -if CONFIG['CC_TYPE'] == 'clang-cl': - CFLAGS += [ - '-Wno-parentheses', '-Wno-pointer-sign', + '-Wno-shift-op-parentheses', ] UNIFIED_SOURCES += [ + 'lib/apiwrapper.c', 'lib/bitpack.c', + 'lib/decapiwrapper.c', 'lib/decinfo.c', 'lib/decode.c', 'lib/dequant.c', @@ -52,25 +52,27 @@ UNIFIED_SOURCES += [ LOCAL_INCLUDES += ['include'] -if CONFIG['INTEL_ARCHITECTURE']: +if '86' in CONFIG['OS_TEST']: if CONFIG['OS_ARCH'] != 'SunOS': - if CONFIG['CC_TYPE'] == 'clang-cl': + if CONFIG['CLANG_CL']: # clang-cl can't handle libtheora's inline asm. pass - elif CONFIG['OS_ARCH'] != 'WINNT' or CONFIG['CPU_ARCH'] != 'x86_64': + elif CONFIG['OS_ARCH'] != 'WINNT' or CONFIG['OS_TEST'] != 'x86_64': DEFINES['OC_X86_ASM'] = True - if CONFIG['CPU_ARCH'] == 'x86_64': + if '64' in CONFIG['OS_TEST']: DEFINES['OC_X86_64_ASM'] = True - if CONFIG['CC_TYPE'] == 'clang-cl': - # clang-cl can't handle libtheora's inline asm. - pass - #SOURCES += [ - # 'lib/x86_vc/mmxfrag.c', - # 'lib/x86_vc/mmxidct.c', - # 'lib/x86_vc/mmxstate.c', - # 'lib/x86_vc/x86cpu.c', - # 'lib/x86_vc/x86state.c', - #] + if CONFIG['_MSC_VER']: + if CONFIG['CLANG_CL']: + # clang-cl can't handle libtheora's inline asm. + pass + elif '64' not in CONFIG['OS_TEST']: + SOURCES += [ + 'lib/x86_vc/mmxfrag.c', + 'lib/x86_vc/mmxidct.c', + 'lib/x86_vc/mmxstate.c', + 'lib/x86_vc/x86cpu.c', + 'lib/x86_vc/x86state.c', + ] else: SOURCES += [ 'lib/x86/mmxfrag.c', @@ -82,7 +84,7 @@ if CONFIG['INTEL_ARCHITECTURE']: ] if CONFIG['GNU_AS']: - if CONFIG['CPU_ARCH'] == 'arm': + if 'arm' in CONFIG['OS_TEST']: SOURCES += [ 'lib/arm/armcpu.c', 'lib/arm/armstate.c', @@ -107,7 +109,7 @@ if CONFIG['GNU_AS']: ] ASFLAGS += CONFIG['NEON_FLAGS'] - if CONFIG['CC_TYPE'] == 'clang': + if CONFIG['CLANG_CXX']: ASFLAGS += [ '-no-integrated-as', ] |