2013-04-01 18:36:59 +00:00
|
|
|
# -*- Mode: python; c-basic-offset: 4; indent-tabs-mode: nil; tab-width: 40 -*-
|
2013-02-25 20:47:22 +00:00
|
|
|
# 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/.
|
|
|
|
|
2013-12-06 11:19:00 +00:00
|
|
|
include('sources.mozbuild')
|
|
|
|
|
|
|
|
EXPORTS.vpx += files['EXPORTS']
|
2013-04-16 19:24:43 +00:00
|
|
|
|
2013-06-11 15:31:11 +00:00
|
|
|
if CONFIG['VPX_NEED_OBJ_INT_EXTRACT']:
|
2013-10-24 23:23:05 +00:00
|
|
|
HOST_SOURCES += [
|
2013-10-24 22:58:17 +00:00
|
|
|
'build/make/obj_int_extract.c',
|
2013-06-11 15:31:11 +00:00
|
|
|
]
|
2013-06-17 19:21:01 +00:00
|
|
|
|
2013-11-01 23:44:11 +00:00
|
|
|
HOST_PROGRAM = 'host_obj_int_extract'
|
|
|
|
|
2013-12-11 14:40:07 +00:00
|
|
|
# Unify fewer files together to reduce the chance of name collision
|
|
|
|
FILES_PER_UNIFIED_FILE = 8
|
|
|
|
|
2013-12-09 12:49:00 +00:00
|
|
|
SOURCES += files['SOURCES']
|
2013-12-11 14:40:07 +00:00
|
|
|
UNIFIED_SOURCES += files['UNIFIED_SOURCES']
|
2013-08-22 06:56:02 +00:00
|
|
|
|
2013-12-06 13:16:00 +00:00
|
|
|
if CONFIG['MOZ_VPX_ERROR_CONCEALMENT']:
|
2013-12-06 11:19:00 +00:00
|
|
|
SOURCES += files['ERROR_CONCEALMENT']
|
2013-11-29 14:02:00 +00:00
|
|
|
|
|
|
|
if CONFIG['VPX_X86_ASM'] and CONFIG['OS_TARGET'] == 'WINNT':
|
2013-12-09 04:39:26 +00:00
|
|
|
offset_sources = [
|
2013-12-06 13:16:00 +00:00
|
|
|
'vp8/encoder/vp8_asm_enc_offsets.c',
|
2013-12-06 11:19:00 +00:00
|
|
|
'vpx_scale/vpx_scale_asm_offsets.c',
|
2013-11-29 14:02:00 +00:00
|
|
|
]
|
2013-12-09 04:39:26 +00:00
|
|
|
SOURCES += offset_sources
|
|
|
|
if CONFIG['_MSC_VER']:
|
|
|
|
for s in offset_sources:
|
|
|
|
SOURCES[s].no_pgo = True
|
2013-11-29 14:02:00 +00:00
|
|
|
|
|
|
|
if CONFIG['VPX_X86_ASM']:
|
2013-12-06 11:19:00 +00:00
|
|
|
SOURCES += files['X86_ASM']
|
2013-11-29 14:02:00 +00:00
|
|
|
|
|
|
|
if '64' in CONFIG['OS_TEST']:
|
2013-12-06 11:19:00 +00:00
|
|
|
SOURCES += files['X86-64_ASM']
|
2013-11-29 14:02:00 +00:00
|
|
|
|
2013-12-06 11:19:00 +00:00
|
|
|
# AVX2 only supported on
|
|
|
|
# Darwin toolchain right now
|
|
|
|
if CONFIG['OS_TARGET'] == 'Darwin':
|
|
|
|
SOURCES += files['AVX2']
|
2013-11-29 14:02:00 +00:00
|
|
|
|
2013-12-06 13:16:00 +00:00
|
|
|
#postproc is only enabled on x86 with asm
|
|
|
|
SOURCES += files['VP8_POSTPROC']
|
2013-11-29 14:02:00 +00:00
|
|
|
|
|
|
|
arm_asm_files = []
|
|
|
|
if CONFIG['VPX_ARM_ASM']:
|
2013-12-06 11:19:00 +00:00
|
|
|
arm_asm_files += files['ARM_ASM']
|
2013-11-29 14:02:00 +00:00
|
|
|
|
|
|
|
if CONFIG['VPX_AS_CONVERSION']:
|
|
|
|
GENERATED_SOURCES += [ "%s.%s" % (f, CONFIG['VPX_ASM_SUFFIX'])
|
2013-12-06 11:19:00 +00:00
|
|
|
for f in sorted(arm_asm_files) if f.endswith('.asm')
|
|
|
|
]
|
|
|
|
SOURCES += [
|
|
|
|
f for f in sorted(arm_asm_files) if not f.endswith('.asm')
|
|
|
|
]
|
2013-11-29 14:02:00 +00:00
|
|
|
else:
|
|
|
|
SOURCES += sorted(arm_asm_files)
|
|
|
|
|
|
|
|
# boolhuff_armv5te.asm defines the same functions as boolhuff.c instead of
|
|
|
|
# using RTCD, so we have to make sure we only add one of the two.
|
2013-12-06 13:16:00 +00:00
|
|
|
if 'vp8/encoder/arm/armv5te/boolhuff_armv5te.asm' not in arm_asm_files:
|
2013-11-29 14:02:00 +00:00
|
|
|
SOURCES += [
|
|
|
|
'vp8/encoder/boolhuff.c',
|
|
|
|
]
|
|
|
|
|
2013-08-22 06:56:01 +00:00
|
|
|
MSVC_ENABLE_PGO = True
|
|
|
|
|
2013-11-22 14:03:21 +00:00
|
|
|
if CONFIG['GKMEDIAS_SHARED_LIBRARY']:
|
2013-10-24 19:06:19 +00:00
|
|
|
NO_VISIBILITY_FLAGS = True
|
2013-11-19 02:47:14 +00:00
|
|
|
|
|
|
|
FINAL_LIBRARY = 'gkmedias'
|
2013-11-27 13:55:07 +00:00
|
|
|
|
|
|
|
DEFINES['HAVE_CONFIG_H'] = 'vpx_config.h'
|
|
|
|
|
|
|
|
if CONFIG['OS_TARGET'] == 'Android':
|
|
|
|
# Older versions of the Android NDK don't pre-define anything to indicate
|
|
|
|
# the OS they're on, so do it for them.
|
|
|
|
DEFINES['__linux__'] = True
|
2014-01-09 19:43:29 +00:00
|
|
|
|
|
|
|
if not CONFIG['MOZ_WEBRTC']:
|
|
|
|
SOURCES += [
|
|
|
|
'%s/sources/android/cpufeatures/cpu-features.c' % CONFIG['ANDROID_NDK'],
|
|
|
|
]
|
2014-03-05 22:00:52 +00:00
|
|
|
|
|
|
|
if not CONFIG['_MSC_VER']:
|
|
|
|
for f in SOURCES:
|
|
|
|
if f.endswith('.c'):
|
|
|
|
if 'sse2' in f:
|
2014-03-20 01:55:00 +00:00
|
|
|
SOURCES[f].flags += CONFIG['SSE2_FLAGS']
|
2014-03-05 22:00:52 +00:00
|
|
|
if 'ssse3' in f:
|
|
|
|
SOURCES[f].flags += ['-mssse3']
|
|
|
|
if 'avx2' in f:
|
|
|
|
SOURCES[f].flags += ['-mavx2']
|
2014-03-16 06:21:32 +00:00
|
|
|
|
|
|
|
# Suppress warnings in third-party code.
|
|
|
|
if CONFIG['GNU_CC']:
|
|
|
|
CFLAGS += ['-Wno-sign-compare']
|