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-11-12 19:32:18 +00:00
|
|
|
UNIFIED_SOURCES += [
|
2013-08-22 06:56:02 +00:00
|
|
|
'apiwrapper.c',
|
|
|
|
'bitpack.c',
|
|
|
|
'decapiwrapper.c',
|
|
|
|
'decinfo.c',
|
|
|
|
'decode.c',
|
|
|
|
'dequant.c',
|
|
|
|
'fragment.c',
|
|
|
|
'huffdec.c',
|
|
|
|
'idct.c',
|
|
|
|
'info.c',
|
|
|
|
'internal.c',
|
|
|
|
'quant.c',
|
|
|
|
'state.c',
|
|
|
|
]
|
|
|
|
|
2014-01-23 07:50:30 +00:00
|
|
|
if CONFIG['CPU_ARCH'] == 'arm' and CONFIG['GNU_AS']:
|
2013-10-29 22:45:01 +00:00
|
|
|
GENERATED_SOURCES += [ '%s.%s' % (f, CONFIG['ASM_SUFFIX']) for f in [
|
|
|
|
'armbits-gnu',
|
|
|
|
'armfrag-gnu',
|
|
|
|
'armidct-gnu',
|
|
|
|
'armloop-gnu',
|
|
|
|
]]
|
|
|
|
|
2013-11-01 01:30:45 +00:00
|
|
|
if '86' in CONFIG['OS_TEST']:
|
2013-11-27 13:55:07 +00:00
|
|
|
if CONFIG['OS_ARCH'] != 'SunOS':
|
|
|
|
if CONFIG['OS_ARCH'] != 'WINNT' or CONFIG['OS_TEST'] != 'x86_64':
|
|
|
|
DEFINES['OC_X86_ASM'] = True
|
|
|
|
if '64' in CONFIG['OS_TEST']:
|
|
|
|
DEFINES['OC_X86_64_ASM'] = True
|
2013-11-01 01:30:45 +00:00
|
|
|
if CONFIG['_MSC_VER']:
|
|
|
|
if '64' not in CONFIG['OS_TEST']:
|
|
|
|
SOURCES += [
|
|
|
|
'x86_vc/mmxfrag.c',
|
|
|
|
'x86_vc/mmxidct.c',
|
|
|
|
'x86_vc/mmxstate.c',
|
|
|
|
'x86_vc/x86cpu.c',
|
|
|
|
'x86_vc/x86state.c',
|
|
|
|
]
|
|
|
|
else:
|
|
|
|
SOURCES += [
|
|
|
|
'x86/mmxfrag.c',
|
|
|
|
'x86/mmxidct.c',
|
|
|
|
'x86/mmxstate.c',
|
|
|
|
'x86/sse2idct.c',
|
|
|
|
'x86/x86cpu.c',
|
|
|
|
'x86/x86state.c',
|
|
|
|
]
|
|
|
|
|
|
|
|
if CONFIG['GNU_AS']:
|
|
|
|
if 'arm' in CONFIG['OS_TEST']:
|
|
|
|
SOURCES += [
|
|
|
|
'arm/armcpu.c',
|
|
|
|
'arm/armstate.c',
|
|
|
|
]
|
2013-11-27 13:55:07 +00:00
|
|
|
for var in ('OC_ARM_ASM', 'OC_ARM_ASM_EDSP', 'OC_ARM_ASM_MEDIA',
|
|
|
|
'OC_ARM_ASM_NEON'):
|
|
|
|
DEFINES[var] = True
|
|
|
|
# The Android NDK doesn't pre-define anything to indicate the OS it's
|
|
|
|
# on, so do it for them.
|
|
|
|
if CONFIG['OS_TARGET'] == 'Android':
|
|
|
|
DEFINES['__linux__'] = True
|
2013-11-01 01:30:45 +00:00
|
|
|
|
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
|
|
|
|
|
|
|
# The encoder is currently not included.
|
|
|
|
DEFINES['THEORA_DISABLE_ENCODE'] = True
|
2014-03-06 05:38:52 +00:00
|
|
|
|
|
|
|
# Suppress warnings in third-party code.
|
2014-03-22 07:03:21 +00:00
|
|
|
if CONFIG['GNU_CC']:
|
|
|
|
CFLAGS += ['-Wno-type-limits']
|
|
|
|
if CONFIG['CLANG_CXX']:
|
|
|
|
CFLAGS += ['-Wno-tautological-compare']
|