Thu, 22 Jan 2015 13:21:57 +0100
Incorporate requested changes from Mozilla in review:
https://bugzilla.mozilla.org/show_bug.cgi?id=1123480#c6
michael@0 | 1 | # -*- Mode: python; c-basic-offset: 4; indent-tabs-mode: nil; tab-width: 40 -*- |
michael@0 | 2 | # vim: set filetype=python: |
michael@0 | 3 | # This Source Code Form is subject to the terms of the Mozilla Public |
michael@0 | 4 | # License, v. 2.0. If a copy of the MPL was not distributed with this |
michael@0 | 5 | # file, You can obtain one at http://mozilla.org/MPL/2.0/. |
michael@0 | 6 | |
michael@0 | 7 | EXPORTS.speex += [ |
michael@0 | 8 | 'speex_config_types.h', |
michael@0 | 9 | 'speex_resampler.h', |
michael@0 | 10 | 'speex_types.h', |
michael@0 | 11 | ] |
michael@0 | 12 | |
michael@0 | 13 | SOURCES += [ |
michael@0 | 14 | 'sse_detect.cpp', |
michael@0 | 15 | ] |
michael@0 | 16 | |
michael@0 | 17 | SOURCES += [ |
michael@0 | 18 | 'resample.c', |
michael@0 | 19 | ] |
michael@0 | 20 | |
michael@0 | 21 | MSVC_ENABLE_PGO = True |
michael@0 | 22 | |
michael@0 | 23 | FINAL_LIBRARY = 'gkmedias' |
michael@0 | 24 | |
michael@0 | 25 | # We don't compile the full speex codec, only the resampler. |
michael@0 | 26 | DEFINES['OUTSIDE_SPEEX'] = True |
michael@0 | 27 | # Speex wants a random prefix when building in another program, to avoid name |
michael@0 | 28 | # clashes |
michael@0 | 29 | DEFINES['RANDOM_PREFIX'] = 'speex' |
michael@0 | 30 | # We don't use -fvisibility=hidden |
michael@0 | 31 | DEFINES['SPX_RESAMPLE_EXPORT'] = '' |
michael@0 | 32 | |
michael@0 | 33 | if CONFIG['OS_TARGET'] == 'Android': |
michael@0 | 34 | DEFINES['FIXED_POINT'] = True |
michael@0 | 35 | else: |
michael@0 | 36 | DEFINES['FLOATING_POINT'] = True |
michael@0 | 37 | |
michael@0 | 38 | # Only use SSE code when using floating point samples, and on x86 |
michael@0 | 39 | if CONFIG['INTEL_ARCHITECTURE'] and CONFIG['OS_TARGET'] != 'Android': |
michael@0 | 40 | DEFINES['_USE_SSE'] = True |
michael@0 | 41 | DEFINES['_USE_SSE2'] = True |
michael@0 | 42 | SOURCES['resample.c'].flags += CONFIG['SSE2_FLAGS'] |
michael@0 | 43 | |
michael@0 | 44 | # Suppress warnings in third-party code. |
michael@0 | 45 | if CONFIG['GNU_CC']: |
michael@0 | 46 | CFLAGS += ['-Wno-sign-compare'] |