## -*- Mode: python; indent-tabs-mode: nil; tab-width: 40 -*-
## 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/.

if not CONFIG['MOZ_FFVPX_AUDIOONLY']:
    SOURCES += [
        'fft_init_aarch64.c',
        'fft_neon.S',
        'h264chroma_init_aarch64.c',
        'h264cmc_neon.S',
        'h264dsp_init_aarch64.c',
        'h264dsp_neon.S',
        'h264idct_neon.S',
        'h264pred_init.c',
        'h264pred_neon.S',
        'hpeldsp_init_aarch64.c',
        'hpeldsp_neon.S',
        'idctdsp_init_aarch64.c',
        'idctdsp_neon.S',
        'mdct_neon.S',
        'mpegaudiodsp_init.c',
        'mpegaudiodsp_neon.S',
        'neon.S',
        'simple_idct_neon.S',
        'videodsp.S',
        'videodsp_init.c',
        'vp8dsp_init_aarch64.c',
        'vp8dsp_neon.S',
        'vp9dsp_init_10bpp_aarch64.c',
        'vp9dsp_init_12bpp_aarch64.c',
        'vp9dsp_init_aarch64.c',
        'vp9itxfm_16bpp_neon.S',
        'vp9itxfm_neon.S',
        'vp9lpf_16bpp_neon.S',
        'vp9lpf_neon.S',
        'vp9mc_16bpp_neon.S',
        'vp9mc_aarch64.S',
        'vp9mc_neon.S',
    ]
else:
    SOURCES += [
        'fft_init_aarch64.c',
        'fft_neon.S',
        'idctdsp_init_aarch64.c',
        'idctdsp_neon.S',
        'mpegaudiodsp_init.c',
        'mpegaudiodsp_neon.S',
        'simple_idct_neon.S',
    ]

if CONFIG['OS_ARCH'] == 'WINNT':
    USE_INTEGRATED_CLANGCL_AS = True
    DEFINES['EXTERN_ASM'] = ''

FINAL_LIBRARY = 'mozavcodec'

include('/media/ffvpx/ffvpxcommon.mozbuild')