2016-07-14 19:16:42 +03:00
|
|
|
# -*- Mode: python; indent-tabs-mode: nil; tab-width: 40 -*-
|
2013-02-26 00:47:22 +04:00
|
|
|
# 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/.
|
|
|
|
|
2017-03-07 21:06:45 +03:00
|
|
|
with Files("**"):
|
|
|
|
BUG_COMPONENT = ("Core", "ImageLib")
|
|
|
|
|
2013-04-16 23:24:43 +04:00
|
|
|
EXPORTS += [
|
|
|
|
'png.h',
|
2014-08-22 15:11:00 +04:00
|
|
|
'pngconf.h',
|
|
|
|
'pnglibconf.h'
|
2013-04-16 23:24:43 +04:00
|
|
|
]
|
|
|
|
|
2013-11-11 20:56:58 +04:00
|
|
|
UNIFIED_SOURCES += [
|
2013-06-04 19:08:44 +04:00
|
|
|
'png.c',
|
|
|
|
'pngerror.c',
|
|
|
|
'pngget.c',
|
|
|
|
'pngmem.c',
|
|
|
|
'pngpread.c',
|
|
|
|
'pngread.c',
|
|
|
|
'pngrio.c',
|
|
|
|
'pngrtran.c',
|
|
|
|
'pngrutil.c',
|
2013-07-18 18:27:21 +04:00
|
|
|
'pngset.c',
|
|
|
|
'pngtrans.c',
|
2013-06-04 19:08:44 +04:00
|
|
|
'pngwio.c',
|
|
|
|
'pngwrite.c',
|
2013-12-20 20:37:47 +04:00
|
|
|
'pngwutil.c'
|
2013-06-04 19:08:44 +04:00
|
|
|
]
|
2013-06-17 23:21:01 +04:00
|
|
|
|
2016-08-24 22:44:00 +03:00
|
|
|
if CONFIG['CPU_ARCH'] == 'arm':
|
2016-09-07 20:30:00 +03:00
|
|
|
DEFINES['MOZ_PNG_USE_ARM_NEON'] = True
|
2013-12-04 17:01:34 +04:00
|
|
|
UNIFIED_SOURCES += [
|
2013-12-20 20:37:47 +04:00
|
|
|
'arm/arm_init.c',
|
|
|
|
'arm/filter_neon_intrinsics.c'
|
2013-07-18 18:27:21 +04:00
|
|
|
]
|
2013-06-17 23:21:01 +04:00
|
|
|
|
2013-10-25 03:23:05 +04:00
|
|
|
SOURCES += [
|
2013-07-18 18:27:21 +04:00
|
|
|
'arm/filter_neon.S'
|
|
|
|
]
|
|
|
|
|
2016-08-11 16:50:00 +03:00
|
|
|
if CONFIG['INTEL_ARCHITECTURE']:
|
2016-09-07 20:30:00 +03:00
|
|
|
DEFINES['MOZ_PNG_USE_INTEL_SSE'] = True
|
2016-08-11 16:50:00 +03:00
|
|
|
UNIFIED_SOURCES += [
|
2017-03-18 17:33:00 +03:00
|
|
|
'intel/filter_sse2_intrinsics.c',
|
|
|
|
'intel/intel_init.c'
|
|
|
|
]
|
|
|
|
|
|
|
|
if CONFIG['HAVE_ALTIVEC']:
|
|
|
|
DEFINES['MOZ_PNG_USE_POWERPC'] = True
|
|
|
|
UNIFIED_SOURCES += [
|
|
|
|
'powerpc/filter_vsx_intrinsics.c',
|
|
|
|
'powerpc/powerpc_init.c'
|
2016-08-11 16:50:00 +03:00
|
|
|
]
|
|
|
|
|
2017-05-22 07:00:33 +03:00
|
|
|
if CONFIG['MOZ_TREE_FREETYPE']:
|
|
|
|
DEFINES['FT_CONFIG_OPTION_USE_PNG'] = True
|
|
|
|
|
2014-09-03 09:10:54 +04:00
|
|
|
Library('mozpng')
|
2013-08-22 10:56:01 +04:00
|
|
|
|
2013-11-19 06:47:14 +04:00
|
|
|
FINAL_LIBRARY = 'gkmedias'
|
2015-12-17 09:57:51 +03:00
|
|
|
|
|
|
|
# We allow warnings for third-party code that can be updated from upstream.
|
2017-10-26 01:12:09 +03:00
|
|
|
AllowCompilerWarnings()
|
2017-06-08 16:29:03 +03:00
|
|
|
|
2017-12-08 00:09:15 +03:00
|
|
|
if CONFIG['CC_TYPE'] in ('clang', 'gcc'):
|
2017-06-08 16:29:03 +03:00
|
|
|
CFLAGS += ['-std=c89']
|