michael@0: # Copyright 2011 The LibYuv Project Authors. All rights reserved. michael@0: # michael@0: # Use of this source code is governed by a BSD-style license michael@0: # that can be found in the LICENSE file in the root of the source michael@0: # tree. An additional intellectual property rights grant can be found michael@0: # in the file PATENTS. All contributing project authors may michael@0: # be found in the AUTHORS file in the root of the source tree. michael@0: michael@0: { michael@0: 'includes': [ michael@0: 'libyuv.gypi', michael@0: ], michael@0: 'variables': { michael@0: 'use_system_libjpeg%': 0, michael@0: 'yuv_disable_asm%': 0, michael@0: 'yuv_disable_avx2%': 0, michael@0: 'build_neon': 0, michael@0: 'conditions': [ michael@0: ['target_arch == "arm" and arm_version >= 7 and (arm_neon == 1 or arm_neon_optional == 1)', { michael@0: 'build_neon': 1, michael@0: }], michael@0: ], michael@0: }, michael@0: 'conditions': [ michael@0: [ 'build_neon != 0', { michael@0: 'targets': [ michael@0: # The NEON-specific components. michael@0: { michael@0: 'target_name': 'libyuv_neon', michael@0: 'type': 'static_library', michael@0: 'standalone_static_library': 1, michael@0: 'defines': [ michael@0: 'LIBYUV_NEON', michael@0: ], michael@0: # TODO(noahric): This should remove whatever mfpu is set, not michael@0: # just vfpv3-d16. michael@0: 'cflags!': [ michael@0: '-mfpu=vfp', michael@0: '-mfpu=vfpv3', michael@0: '-mfpu=vfpv3-d16', michael@0: ], michael@0: # XXX Doesn't work currently michael@0: 'cflags_mozilla!': [ michael@0: '-mfpu=vfp', michael@0: '-mfpu=vfpv3', michael@0: '-mfpu=vfpv3-d16', michael@0: ], michael@0: 'cflags': [ michael@0: '-mfpu=neon', michael@0: ], michael@0: 'cflags_mozilla': [ michael@0: '-mfpu=neon', michael@0: ], michael@0: 'include_dirs': [ michael@0: 'include', michael@0: '.', michael@0: ], michael@0: 'direct_dependent_settings': { michael@0: 'include_dirs': [ michael@0: 'include', michael@0: '.', michael@0: ], michael@0: }, michael@0: 'sources': [ michael@0: # sources. michael@0: 'source/compare_neon.cc', michael@0: 'source/rotate_neon.cc', michael@0: 'source/row_neon.cc', michael@0: 'source/scale_neon.cc', michael@0: ], michael@0: }, michael@0: ], michael@0: }], michael@0: ], michael@0: 'targets': [ michael@0: { michael@0: 'target_name': 'libyuv', michael@0: # Change type to 'shared_library' to build .so or .dll files. michael@0: 'type': 'static_library', michael@0: # Allows libyuv.a redistributable library without external dependencies. michael@0: # 'standalone_static_library': 1, michael@0: 'conditions': [ michael@0: # TODO(fbarchard): Use gyp define to enable jpeg. michael@0: [ 'OS != "ios" and build_with_mozilla!=1', { michael@0: 'defines': [ michael@0: 'HAVE_JPEG' michael@0: ], michael@0: 'conditions': [ michael@0: # Android uses libjpeg for system jpeg support. michael@0: [ 'OS == "android" and use_system_libjpeg == 1', { michael@0: 'dependencies': [ michael@0: '<(DEPTH)/third_party/libjpeg/libjpeg.gyp:libjpeg', michael@0: ], michael@0: }, { michael@0: 'dependencies': [ michael@0: '<(DEPTH)/third_party/libjpeg_turbo/libjpeg.gyp:libjpeg', michael@0: ], michael@0: }], michael@0: [ 'use_system_libjpeg == 1', { michael@0: 'link_settings': { michael@0: 'libraries': [ michael@0: '-ljpeg', michael@0: ], michael@0: } michael@0: }], michael@0: ], michael@0: }], michael@0: [ 'build_neon != 0', { michael@0: 'dependencies': [ michael@0: 'libyuv_neon', michael@0: ], michael@0: 'defines': [ michael@0: 'LIBYUV_NEON', michael@0: ] michael@0: }], michael@0: [ 'yuv_disable_asm!=0', { michael@0: 'defines': [ michael@0: # Enable the following 3 macros to turn off assembly for specified CPU. michael@0: 'LIBYUV_DISABLE_X86', michael@0: 'LIBYUV_DISABLE_NEON', michael@0: 'LIBYUV_DISABLE_MIPS', michael@0: ], michael@0: }], michael@0: [ 'yuv_disable_avx2==1', { michael@0: 'defines': [ michael@0: 'LIBYUV_DISABLE_AVX2', michael@0: ] michael@0: }], michael@0: ['build_with_mozilla==1', { michael@0: 'include_dirs': [ michael@0: '$(DEPTH)/dist/include', michael@0: ], michael@0: 'direct_dependent_settings': { michael@0: 'include_dirs': [ michael@0: '$(DEPTH)/dist/include', michael@0: ], michael@0: }, michael@0: }], michael@0: ], michael@0: 'defines': [ michael@0: # Enable the following 3 macros to turn off assembly for specified CPU. michael@0: # 'LIBYUV_DISABLE_X86', michael@0: # 'LIBYUV_DISABLE_NEON', michael@0: # 'LIBYUV_DISABLE_MIPS', michael@0: # This disables AVX2 (Haswell) support, overriding compiler checks michael@0: # 'LIBYUV_DISABLE_AVX2', michael@0: # Enable the following macro to build libyuv as a shared library (dll). michael@0: # 'LIBYUV_USING_SHARED_LIBRARY', michael@0: ], michael@0: 'include_dirs': [ michael@0: 'include', michael@0: '.', michael@0: ], michael@0: 'direct_dependent_settings': { michael@0: 'include_dirs': [ michael@0: 'include', michael@0: '.', michael@0: ], michael@0: }, michael@0: 'sources': [ michael@0: '<@(libyuv_sources)', michael@0: ], michael@0: }, michael@0: ], # targets. michael@0: } michael@0: michael@0: # Local Variables: michael@0: # tab-width:2 michael@0: # indent-tabs-mode:nil michael@0: # End: michael@0: # vim: set expandtab tabstop=2 shiftwidth=2: