michael@0: # -*- Mode: python; c-basic-offset: 4; indent-tabs-mode: nil; tab-width: 40 -*- michael@0: # vim: set filetype=python: michael@0: # This Source Code Form is subject to the terms of the Mozilla Public michael@0: # License, v. 2.0. If a copy of the MPL was not distributed with this michael@0: # file, You can obtain one at http://mozilla.org/MPL/2.0/. michael@0: michael@0: UNIFIED_SOURCES += [ michael@0: 'apiwrapper.c', michael@0: 'bitpack.c', michael@0: 'decapiwrapper.c', michael@0: 'decinfo.c', michael@0: 'decode.c', michael@0: 'dequant.c', michael@0: 'fragment.c', michael@0: 'huffdec.c', michael@0: 'idct.c', michael@0: 'info.c', michael@0: 'internal.c', michael@0: 'quant.c', michael@0: 'state.c', michael@0: ] michael@0: michael@0: if CONFIG['CPU_ARCH'] == 'arm' and CONFIG['GNU_AS']: michael@0: GENERATED_SOURCES += [ '%s.%s' % (f, CONFIG['ASM_SUFFIX']) for f in [ michael@0: 'armbits-gnu', michael@0: 'armfrag-gnu', michael@0: 'armidct-gnu', michael@0: 'armloop-gnu', michael@0: ]] michael@0: michael@0: if '86' in CONFIG['OS_TEST']: michael@0: if CONFIG['OS_ARCH'] != 'SunOS': michael@0: if CONFIG['OS_ARCH'] != 'WINNT' or CONFIG['OS_TEST'] != 'x86_64': michael@0: DEFINES['OC_X86_ASM'] = True michael@0: if '64' in CONFIG['OS_TEST']: michael@0: DEFINES['OC_X86_64_ASM'] = True michael@0: if CONFIG['_MSC_VER']: michael@0: if '64' not in CONFIG['OS_TEST']: michael@0: SOURCES += [ michael@0: 'x86_vc/mmxfrag.c', michael@0: 'x86_vc/mmxidct.c', michael@0: 'x86_vc/mmxstate.c', michael@0: 'x86_vc/x86cpu.c', michael@0: 'x86_vc/x86state.c', michael@0: ] michael@0: else: michael@0: SOURCES += [ michael@0: 'x86/mmxfrag.c', michael@0: 'x86/mmxidct.c', michael@0: 'x86/mmxstate.c', michael@0: 'x86/sse2idct.c', michael@0: 'x86/x86cpu.c', michael@0: 'x86/x86state.c', michael@0: ] michael@0: michael@0: if CONFIG['GNU_AS']: michael@0: if 'arm' in CONFIG['OS_TEST']: michael@0: SOURCES += [ michael@0: 'arm/armcpu.c', michael@0: 'arm/armstate.c', michael@0: ] michael@0: for var in ('OC_ARM_ASM', 'OC_ARM_ASM_EDSP', 'OC_ARM_ASM_MEDIA', michael@0: 'OC_ARM_ASM_NEON'): michael@0: DEFINES[var] = True michael@0: # The Android NDK doesn't pre-define anything to indicate the OS it's michael@0: # on, so do it for them. michael@0: if CONFIG['OS_TARGET'] == 'Android': michael@0: DEFINES['__linux__'] = True michael@0: michael@0: MSVC_ENABLE_PGO = True michael@0: michael@0: if CONFIG['GKMEDIAS_SHARED_LIBRARY']: michael@0: NO_VISIBILITY_FLAGS = True michael@0: michael@0: FINAL_LIBRARY = 'gkmedias' michael@0: michael@0: # The encoder is currently not included. michael@0: DEFINES['THEORA_DISABLE_ENCODE'] = True michael@0: michael@0: # Suppress warnings in third-party code. michael@0: if CONFIG['GNU_CC']: michael@0: CFLAGS += ['-Wno-type-limits'] michael@0: if CONFIG['CLANG_CXX']: michael@0: CFLAGS += ['-Wno-tautological-compare']