1.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000 1.2 +++ b/media/libvpx/moz.build Wed Dec 31 06:09:35 2014 +0100 1.3 @@ -0,0 +1,103 @@ 1.4 +# -*- Mode: python; c-basic-offset: 4; indent-tabs-mode: nil; tab-width: 40 -*- 1.5 +# vim: set filetype=python: 1.6 +# This Source Code Form is subject to the terms of the Mozilla Public 1.7 +# License, v. 2.0. If a copy of the MPL was not distributed with this 1.8 +# file, You can obtain one at http://mozilla.org/MPL/2.0/. 1.9 + 1.10 +include('sources.mozbuild') 1.11 + 1.12 +EXPORTS.vpx += files['EXPORTS'] 1.13 + 1.14 +if CONFIG['VPX_NEED_OBJ_INT_EXTRACT']: 1.15 + HOST_SOURCES += [ 1.16 + 'build/make/obj_int_extract.c', 1.17 + ] 1.18 + 1.19 + HOST_PROGRAM = 'host_obj_int_extract' 1.20 + 1.21 +# Unify fewer files together to reduce the chance of name collision 1.22 +FILES_PER_UNIFIED_FILE = 8 1.23 + 1.24 +SOURCES += files['SOURCES'] 1.25 +UNIFIED_SOURCES += files['UNIFIED_SOURCES'] 1.26 + 1.27 +if CONFIG['MOZ_VPX_ERROR_CONCEALMENT']: 1.28 + SOURCES += files['ERROR_CONCEALMENT'] 1.29 + 1.30 +if CONFIG['VPX_X86_ASM'] and CONFIG['OS_TARGET'] == 'WINNT': 1.31 + offset_sources = [ 1.32 + 'vp8/encoder/vp8_asm_enc_offsets.c', 1.33 + 'vpx_scale/vpx_scale_asm_offsets.c', 1.34 + ] 1.35 + SOURCES += offset_sources 1.36 + if CONFIG['_MSC_VER']: 1.37 + for s in offset_sources: 1.38 + SOURCES[s].no_pgo = True 1.39 + 1.40 +if CONFIG['VPX_X86_ASM']: 1.41 + SOURCES += files['X86_ASM'] 1.42 + 1.43 + if '64' in CONFIG['OS_TEST']: 1.44 + SOURCES += files['X86-64_ASM'] 1.45 + 1.46 + # AVX2 only supported on 1.47 + # Darwin toolchain right now 1.48 + if CONFIG['OS_TARGET'] == 'Darwin': 1.49 + SOURCES += files['AVX2'] 1.50 + 1.51 + #postproc is only enabled on x86 with asm 1.52 + SOURCES += files['VP8_POSTPROC'] 1.53 + 1.54 +arm_asm_files = [] 1.55 +if CONFIG['VPX_ARM_ASM']: 1.56 + arm_asm_files += files['ARM_ASM'] 1.57 + 1.58 + if CONFIG['VPX_AS_CONVERSION']: 1.59 + GENERATED_SOURCES += [ "%s.%s" % (f, CONFIG['VPX_ASM_SUFFIX']) 1.60 + for f in sorted(arm_asm_files) if f.endswith('.asm') 1.61 + ] 1.62 + SOURCES += [ 1.63 + f for f in sorted(arm_asm_files) if not f.endswith('.asm') 1.64 + ] 1.65 + else: 1.66 + SOURCES += sorted(arm_asm_files) 1.67 + 1.68 +# boolhuff_armv5te.asm defines the same functions as boolhuff.c instead of 1.69 +# using RTCD, so we have to make sure we only add one of the two. 1.70 +if 'vp8/encoder/arm/armv5te/boolhuff_armv5te.asm' not in arm_asm_files: 1.71 + SOURCES += [ 1.72 + 'vp8/encoder/boolhuff.c', 1.73 + ] 1.74 + 1.75 +MSVC_ENABLE_PGO = True 1.76 + 1.77 +if CONFIG['GKMEDIAS_SHARED_LIBRARY']: 1.78 + NO_VISIBILITY_FLAGS = True 1.79 + 1.80 +FINAL_LIBRARY = 'gkmedias' 1.81 + 1.82 +DEFINES['HAVE_CONFIG_H'] = 'vpx_config.h' 1.83 + 1.84 +if CONFIG['OS_TARGET'] == 'Android': 1.85 + # Older versions of the Android NDK don't pre-define anything to indicate 1.86 + # the OS they're on, so do it for them. 1.87 + DEFINES['__linux__'] = True 1.88 + 1.89 + if not CONFIG['MOZ_WEBRTC']: 1.90 + SOURCES += [ 1.91 + '%s/sources/android/cpufeatures/cpu-features.c' % CONFIG['ANDROID_NDK'], 1.92 + ] 1.93 + 1.94 +if not CONFIG['_MSC_VER']: 1.95 + for f in SOURCES: 1.96 + if f.endswith('.c'): 1.97 + if 'sse2' in f: 1.98 + SOURCES[f].flags += CONFIG['SSE2_FLAGS'] 1.99 + if 'ssse3' in f: 1.100 + SOURCES[f].flags += ['-mssse3'] 1.101 + if 'avx2' in f: 1.102 + SOURCES[f].flags += ['-mavx2'] 1.103 + 1.104 +# Suppress warnings in third-party code. 1.105 +if CONFIG['GNU_CC']: 1.106 + CFLAGS += ['-Wno-sign-compare']