michael@0: # -*- Mode: python; c-basic-offset: 4; indent-tabs-mode: nil; tab-width: 40 -*- michael@0: # vim: set filetype=python: michael@0: # This Source Code Form is subject to the terms of the Mozilla Public michael@0: # License, v. 2.0. If a copy of the MPL was not distributed with this michael@0: # file, You can obtain one at http://mozilla.org/MPL/2.0/. michael@0: michael@0: EXPORTS += [ michael@0: 'pixman-version.h', michael@0: 'pixman.h', michael@0: ] michael@0: michael@0: # Apple's arm assembler doesn't support the same syntax as michael@0: # the standard GNU assembler, so use the C fallback paths for now. michael@0: # This may be fixable if clang's ARM/iOS assembler improves into a michael@0: # viable solution in the future. michael@0: if CONFIG['OS_ARCH'] != 'Darwin' and CONFIG['GNU_CC']: michael@0: if CONFIG['HAVE_ARM_NEON']: michael@0: SOURCES += [ michael@0: 'pixman-arm-neon-asm-bilinear.S', michael@0: 'pixman-arm-neon-asm.S', michael@0: ] michael@0: if CONFIG['HAVE_ARM_SIMD']: michael@0: SOURCES += [ michael@0: 'pixman-arm-simd-asm-scaled.S', michael@0: 'pixman-arm-simd-asm.S', michael@0: ] michael@0: michael@0: SOURCES += [ michael@0: 'pixman-access-accessors.c', michael@0: 'pixman-access.c', michael@0: 'pixman-arm.c', michael@0: 'pixman-bits-image.c', michael@0: 'pixman-combine-float.c', michael@0: 'pixman-combine16.c', michael@0: 'pixman-combine32.c', michael@0: 'pixman-conical-gradient.c', michael@0: 'pixman-edge-accessors.c', michael@0: 'pixman-edge.c', michael@0: 'pixman-fast-path.c', michael@0: 'pixman-filter.c', michael@0: 'pixman-general.c', michael@0: 'pixman-glyph.c', michael@0: 'pixman-gradient-walker.c', michael@0: 'pixman-image.c', michael@0: 'pixman-implementation.c', michael@0: 'pixman-linear-gradient.c', michael@0: 'pixman-matrix.c', michael@0: 'pixman-mips.c', michael@0: 'pixman-noop.c', michael@0: 'pixman-ppc.c', michael@0: 'pixman-radial-gradient.c', michael@0: 'pixman-region16.c', michael@0: 'pixman-region32.c', michael@0: 'pixman-solid-fill.c', michael@0: 'pixman-trap.c', michael@0: 'pixman-utils.c', michael@0: 'pixman-x86.c', michael@0: 'pixman.c', michael@0: ] michael@0: michael@0: MSVC_ENABLE_PGO = True michael@0: michael@0: FINAL_LIBRARY = 'gkmedias' michael@0: LOCAL_INCLUDES += [ michael@0: '../../cairo/src', michael@0: ] michael@0: michael@0: if CONFIG['MOZ_USE_PTHREADS']: michael@0: DEFINES['HAVE_PTHREAD_SETSPECIFIC'] = True michael@0: michael@0: if CONFIG['_MSC_VER']: michael@0: DEFINES['PIXMAN_USE_XP_DLL_TLS_WORKAROUND'] = True michael@0: michael@0: DEFINES['PACKAGE'] = 'mozpixman' michael@0: michael@0: DEFINES['_USE_MATH_DEFINES'] = True michael@0: michael@0: use_mmx = False michael@0: use_sse2 = False michael@0: use_vmx = False michael@0: use_arm_simd_gcc = False michael@0: use_arm_neon_gcc = False michael@0: if '86' in CONFIG['OS_TEST']: michael@0: if '64' in CONFIG['OS_TEST']: michael@0: if CONFIG['GNU_CC']: michael@0: use_sse2 = True michael@0: else: michael@0: if CONFIG['_MSC_VER']: michael@0: use_mmx = True michael@0: if CONFIG['HAVE_GCC_ALIGN_ARG_POINTER']: michael@0: use_sse2 = True michael@0: if CONFIG['GNU_CC']: michael@0: use_mmx = True michael@0: if CONFIG['_MSC_VER']: michael@0: use_sse2 = True michael@0: elif 'ppc' in CONFIG['OS_TEST']: michael@0: if CONFIG['GNU_CC']: michael@0: use_vmx = True michael@0: # Apple's arm assembler doesn't support the same syntax as michael@0: # the standard GNU assembler, so use the C fallback paths for now. michael@0: # This may be fixable if clang's ARM/iOS assembler improves into a michael@0: # viable solution in the future. michael@0: elif 'arm' in CONFIG['OS_TEST']: michael@0: if CONFIG['OS_ARCH'] != 'Darwin': michael@0: if CONFIG['HAVE_ARM_SIMD']: michael@0: use_arm_simd_gcc = True michael@0: if CONFIG['HAVE_ARM_NEON']: michael@0: use_arm_neon_gcc = True michael@0: michael@0: if use_mmx: michael@0: DEFINES['USE_MMX'] = True michael@0: SOURCES += ['pixman-mmx.c'] michael@0: SOURCES['pixman-mmx.c'].flags += CONFIG['MMX_FLAGS'] michael@0: if CONFIG['GNU_CC']: michael@0: SOURCES['pixman-mmx.c'].flags += [ michael@0: '-Winline', michael@0: '--param inline-unit-growth=10000', michael@0: '--param large-function-growth=10000', michael@0: ] michael@0: michael@0: if use_sse2: michael@0: DEFINES['USE_SSE'] = True michael@0: DEFINES['USE_SSE2'] = True michael@0: SOURCES += ['pixman-sse2.c'] michael@0: SOURCES['pixman-sse2.c'].flags += CONFIG['SSE_FLAGS'] + CONFIG['SSE2_FLAGS'] michael@0: if CONFIG['GNU_CC']: michael@0: SOURCES['pixman-sse2.c'].flags += ['-Winline'] michael@0: michael@0: if use_vmx: michael@0: DEFINES['USE_VMX'] = True michael@0: SOURCES += ['pixman-vmx.c'] michael@0: SOURCES['pixman-vmx.c'].flags += ['-maltivec'] michael@0: michael@0: if use_arm_simd_gcc: michael@0: DEFINES['USE_ARM_SIMD'] = True michael@0: SOURCES += ['pixman-arm-simd.c'] michael@0: michael@0: if use_arm_neon_gcc: michael@0: DEFINES['USE_ARM_NEON'] = True michael@0: SOURCES += ['pixman-arm-neon.c'] michael@0: SOURCES['pixman-arm-neon.c'].flags += ['-mfpu=neon'] michael@0: michael@0: # Suppress warnings in third-party code. michael@0: if CONFIG['GNU_CC']: michael@0: CFLAGS += [ michael@0: '-Wno-address', michael@0: '-Wno-sign-compare' michael@0: ] michael@0: if CONFIG['CLANG_CXX']: michael@0: CFLAGS += [ michael@0: '-Wno-incompatible-pointer-types', michael@0: '-Wno-tautological-compare', michael@0: '-Wno-tautological-constant-out-of-range-compare', michael@0: ]