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: EXPORTS.speex += [ michael@0: 'speex_config_types.h', michael@0: 'speex_resampler.h', michael@0: 'speex_types.h', michael@0: ] michael@0: michael@0: SOURCES += [ michael@0: 'sse_detect.cpp', michael@0: ] michael@0: michael@0: SOURCES += [ michael@0: 'resample.c', michael@0: ] michael@0: michael@0: MSVC_ENABLE_PGO = True michael@0: michael@0: FINAL_LIBRARY = 'gkmedias' michael@0: michael@0: # We don't compile the full speex codec, only the resampler. michael@0: DEFINES['OUTSIDE_SPEEX'] = True michael@0: # Speex wants a random prefix when building in another program, to avoid name michael@0: # clashes michael@0: DEFINES['RANDOM_PREFIX'] = 'speex' michael@0: # We don't use -fvisibility=hidden michael@0: DEFINES['SPX_RESAMPLE_EXPORT'] = '' michael@0: michael@0: if CONFIG['OS_TARGET'] == 'Android': michael@0: DEFINES['FIXED_POINT'] = True michael@0: else: michael@0: DEFINES['FLOATING_POINT'] = True michael@0: michael@0: # Only use SSE code when using floating point samples, and on x86 michael@0: if CONFIG['INTEL_ARCHITECTURE'] and CONFIG['OS_TARGET'] != 'Android': michael@0: DEFINES['_USE_SSE'] = True michael@0: DEFINES['_USE_SSE2'] = True michael@0: SOURCES['resample.c'].flags += CONFIG['SSE2_FLAGS'] michael@0: michael@0: # Suppress warnings in third-party code. michael@0: if CONFIG['GNU_CC']: michael@0: CFLAGS += ['-Wno-sign-compare']