gecko-dev/media/libjpeg/moz.build

200 строки
5.8 KiB
Python

# -*- 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/.
with Files("**"):
BUG_COMPONENT = ("Core", "ImageLib")
EXPORTS += [
'jconfig.h',
'jerror.h',
'jinclude.h',
'jmorecfg.h',
'jpegint.h',
'jpeglib.h',
]
SOURCES += [
'jcomapi.c',
'jdapimin.c',
'jdapistd.c',
'jdatadst.c',
'jdatasrc.c',
'jdcoefct.c',
'jdcolor.c',
'jddctmgr.c',
'jdhuff.c',
'jdicc.c',
'jdinput.c',
'jdmainct.c',
'jdmarker.c',
'jdmaster.c',
'jdmerge.c',
'jdphuff.c',
'jdpostct.c',
'jdsample.c',
'jdtrans.c',
'jerror.c',
'jfdctflt.c',
'jfdctfst.c',
'jfdctint.c',
'jidctflt.c',
'jidctfst.c',
'jidctint.c',
'jidctred.c',
'jmemmgr.c',
'jmemnobs.c',
'jquant1.c',
'jquant2.c',
'jutils.c',
]
# These files enable support for writing JPEGs
SOURCES += [
'jcapimin.c',
'jcapistd.c',
'jccoefct.c',
'jccolor.c',
'jcdctmgr.c',
'jchuff.c',
'jcicc.c',
'jcinit.c',
'jcmainct.c',
'jcmarker.c',
'jcmaster.c',
'jcparam.c',
'jcphuff.c',
'jcprepct.c',
'jcsample.c',
'jctrans.c',
]
SOURCES += [
'jpeg_nbits_table.c',
]
if CONFIG['LIBJPEG_TURBO_USE_YASM']:
USE_YASM = True
if CONFIG['LIBJPEG_TURBO_ASFLAGS']:
if CONFIG['CPU_ARCH'] == 'arm':
SOURCES += [
'simd/arm/jsimd.c',
'simd/arm/jsimd_neon.S',
]
elif CONFIG['CPU_ARCH'] == 'aarch64':
SOURCES += [
'simd/arm64/jsimd.c',
'simd/arm64/jsimd_neon.S',
]
elif CONFIG['CPU_ARCH'] == 'mips32':
SOURCES += [
'simd/mips/jsimd.c',
'simd/mips/jsimd_dspr2.S',
]
if CONFIG['CC_TYPE'] == 'clang':
SOURCES['simd/mips/jsimd_dspr2.S'].flags += [
'-fno-integrated-as',
]
elif CONFIG['CPU_ARCH'] == 'x86_64':
SOURCES += [
'simd/x86_64/jccolor-avx2.asm',
'simd/x86_64/jccolor-sse2.asm',
'simd/x86_64/jcgray-avx2.asm',
'simd/x86_64/jcgray-sse2.asm',
'simd/x86_64/jchuff-sse2.asm',
'simd/x86_64/jcphuff-sse2.asm',
'simd/x86_64/jcsample-avx2.asm',
'simd/x86_64/jcsample-sse2.asm',
'simd/x86_64/jdcolor-avx2.asm',
'simd/x86_64/jdcolor-sse2.asm',
'simd/x86_64/jdmerge-avx2.asm',
'simd/x86_64/jdmerge-sse2.asm',
'simd/x86_64/jdsample-avx2.asm',
'simd/x86_64/jdsample-sse2.asm',
'simd/x86_64/jfdctflt-sse.asm',
'simd/x86_64/jfdctfst-sse2.asm',
'simd/x86_64/jfdctint-avx2.asm',
'simd/x86_64/jfdctint-sse2.asm',
'simd/x86_64/jidctflt-sse2.asm',
'simd/x86_64/jidctfst-sse2.asm',
'simd/x86_64/jidctint-avx2.asm',
'simd/x86_64/jidctint-sse2.asm',
'simd/x86_64/jidctred-sse2.asm',
'simd/x86_64/jquantf-sse2.asm',
'simd/x86_64/jquanti-avx2.asm',
'simd/x86_64/jquanti-sse2.asm',
'simd/x86_64/jsimd.c',
'simd/x86_64/jsimdcpu.asm',
]
elif CONFIG['CPU_ARCH'] == 'x86':
SOURCES += [
'simd/i386/jccolor-avx2.asm',
'simd/i386/jccolor-mmx.asm',
'simd/i386/jccolor-sse2.asm',
'simd/i386/jcgray-avx2.asm',
'simd/i386/jcgray-mmx.asm',
'simd/i386/jcgray-sse2.asm',
'simd/i386/jchuff-sse2.asm',
'simd/i386/jcphuff-sse2.asm',
'simd/i386/jcsample-avx2.asm',
'simd/i386/jcsample-mmx.asm',
'simd/i386/jcsample-sse2.asm',
'simd/i386/jdcolor-avx2.asm',
'simd/i386/jdcolor-mmx.asm',
'simd/i386/jdcolor-sse2.asm',
'simd/i386/jdmerge-avx2.asm',
'simd/i386/jdmerge-mmx.asm',
'simd/i386/jdmerge-sse2.asm',
'simd/i386/jdsample-avx2.asm',
'simd/i386/jdsample-mmx.asm',
'simd/i386/jdsample-sse2.asm',
'simd/i386/jfdctflt-3dn.asm',
'simd/i386/jfdctflt-sse.asm',
'simd/i386/jfdctfst-mmx.asm',
'simd/i386/jfdctfst-sse2.asm',
'simd/i386/jfdctint-avx2.asm',
'simd/i386/jfdctint-mmx.asm',
'simd/i386/jfdctint-sse2.asm',
'simd/i386/jidctflt-3dn.asm',
'simd/i386/jidctflt-sse.asm',
'simd/i386/jidctflt-sse2.asm',
'simd/i386/jidctfst-mmx.asm',
'simd/i386/jidctfst-sse2.asm',
'simd/i386/jidctint-avx2.asm',
'simd/i386/jidctint-mmx.asm',
'simd/i386/jidctint-sse2.asm',
'simd/i386/jidctred-mmx.asm',
'simd/i386/jidctred-sse2.asm',
'simd/i386/jquant-3dn.asm',
'simd/i386/jquant-mmx.asm',
'simd/i386/jquant-sse.asm',
'simd/i386/jquantf-sse2.asm',
'simd/i386/jquanti-avx2.asm',
'simd/i386/jquanti-sse2.asm',
'simd/i386/jsimd.c',
'simd/i386/jsimdcpu.asm',
]
else: # No SIMD support?
SOURCES += [
'jsimd_none.c',
]
ASFLAGS += CONFIG['LIBJPEG_TURBO_ASFLAGS']
# Make sure the x86 & x86-64 ASM files can see the necessary includes.
if CONFIG['CPU_ARCH'] == 'x86':
ASFLAGS += ['-I%s/media/libjpeg/simd/nasm/' % TOPSRCDIR]
ASFLAGS += ['-I%s/media/libjpeg/simd/i386/' % TOPSRCDIR]
if CONFIG['CPU_ARCH'] == 'x86_64':
ASFLAGS += ['-I%s/media/libjpeg/simd/nasm/' % TOPSRCDIR]
ASFLAGS += ['-I%s/media/libjpeg/simd/x86_64/' % TOPSRCDIR]
# We allow warnings for third-party code that can be updated from upstream.
AllowCompilerWarnings()
FINAL_LIBRARY = 'gkmedias'