Bug 1885602 - Part 1: Add strings for the sign in header in the menu redesign r=andro...
[gecko.git] / media / libpng / moz.build
blob35e34d28730948578b459153e638c64df159f8ad
1 # -*- Mode: python; indent-tabs-mode: nil; tab-width: 40 -*-
2 # vim: set filetype=python:
3 # This Source Code Form is subject to the terms of the Mozilla Public
4 # License, v. 2.0. If a copy of the MPL was not distributed with this
5 # file, You can obtain one at http://mozilla.org/MPL/2.0/.
7 with Files("**"):
8     BUG_COMPONENT = ("Core", "Graphics: ImageLib")
10 EXPORTS += [
11     'png.h',
12     'pngconf.h',
13     'pnglibconf.h'
16 UNIFIED_SOURCES += [
17     'png.c',
18     'pngerror.c',
19     'pngget.c',
20     'pngmem.c',
21     'pngpread.c',
22     'pngread.c',
23     'pngrio.c',
24     'pngrtran.c',
25     'pngrutil.c',
26     'pngset.c',
27     'pngtrans.c',
28     'pngwio.c',
29     'pngwrite.c',
30     'pngwutil.c'
33 if CONFIG['TARGET_CPU'] == 'arm' or CONFIG['TARGET_CPU'] == 'aarch64':
34     DEFINES['MOZ_PNG_USE_ARM_NEON'] = True
35     UNIFIED_SOURCES += [
36         'arm/arm_init.c',
37         'arm/filter_neon_intrinsics.c',
38         'arm/palette_neon_intrinsics.c'
39     ]
41     if CONFIG['TARGET_CPU'] == 'arm':
42         SOURCES += [
43             'arm/filter_neon.S'
44         ]
46 if CONFIG['INTEL_ARCHITECTURE']:
47     DEFINES['MOZ_PNG_USE_INTEL_SSE'] = True
48     UNIFIED_SOURCES += [
49         'intel/filter_sse2_intrinsics.c',
50         'intel/intel_init.c'
51     ]
53 if CONFIG['TARGET_CPU'] in ('mips32', 'mips64'):
54     DEFINES['MOZ_PNG_USE_MIPS_MSA'] = True
55     UNIFIED_SOURCES += [
56         'mips/filter_mmi_inline_assembly.c',
57         'mips/filter_msa_intrinsics.c',
58         'mips/mips_init.c'
59     ]
61 if CONFIG['HAVE_ALTIVEC']:
62     DEFINES['MOZ_PNG_USE_POWERPC'] = True
63     UNIFIED_SOURCES += [
64         'powerpc/filter_vsx_intrinsics.c',
65         'powerpc/powerpc_init.c'
66     ]
68 if CONFIG['MOZ_TREE_FREETYPE']:
69     DEFINES['FT_CONFIG_OPTION_USE_PNG'] = True
71 Library('mozpng')
73 FINAL_LIBRARY = 'gkmedias'
75 # We allow warnings for third-party code that can be updated from upstream.
76 AllowCompilerWarnings()
78 if CONFIG['CC_TYPE'] in ('clang', 'gcc'):
79     CFLAGS += ['-std=gnu89']