1.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000 1.2 +++ b/media/libyuv/libyuv.gyp Wed Dec 31 06:09:35 2014 +0100 1.3 @@ -0,0 +1,171 @@ 1.4 +# Copyright 2011 The LibYuv Project Authors. All rights reserved. 1.5 +# 1.6 +# Use of this source code is governed by a BSD-style license 1.7 +# that can be found in the LICENSE file in the root of the source 1.8 +# tree. An additional intellectual property rights grant can be found 1.9 +# in the file PATENTS. All contributing project authors may 1.10 +# be found in the AUTHORS file in the root of the source tree. 1.11 + 1.12 +{ 1.13 + 'includes': [ 1.14 + 'libyuv.gypi', 1.15 + ], 1.16 + 'variables': { 1.17 + 'use_system_libjpeg%': 0, 1.18 + 'yuv_disable_asm%': 0, 1.19 + 'yuv_disable_avx2%': 0, 1.20 + 'build_neon': 0, 1.21 + 'conditions': [ 1.22 + ['target_arch == "arm" and arm_version >= 7 and (arm_neon == 1 or arm_neon_optional == 1)', { 1.23 + 'build_neon': 1, 1.24 + }], 1.25 + ], 1.26 + }, 1.27 + 'conditions': [ 1.28 + [ 'build_neon != 0', { 1.29 + 'targets': [ 1.30 + # The NEON-specific components. 1.31 + { 1.32 + 'target_name': 'libyuv_neon', 1.33 + 'type': 'static_library', 1.34 + 'standalone_static_library': 1, 1.35 + 'defines': [ 1.36 + 'LIBYUV_NEON', 1.37 + ], 1.38 + # TODO(noahric): This should remove whatever mfpu is set, not 1.39 + # just vfpv3-d16. 1.40 + 'cflags!': [ 1.41 + '-mfpu=vfp', 1.42 + '-mfpu=vfpv3', 1.43 + '-mfpu=vfpv3-d16', 1.44 + ], 1.45 + # XXX Doesn't work currently 1.46 + 'cflags_mozilla!': [ 1.47 + '-mfpu=vfp', 1.48 + '-mfpu=vfpv3', 1.49 + '-mfpu=vfpv3-d16', 1.50 + ], 1.51 + 'cflags': [ 1.52 + '-mfpu=neon', 1.53 + ], 1.54 + 'cflags_mozilla': [ 1.55 + '-mfpu=neon', 1.56 + ], 1.57 + 'include_dirs': [ 1.58 + 'include', 1.59 + '.', 1.60 + ], 1.61 + 'direct_dependent_settings': { 1.62 + 'include_dirs': [ 1.63 + 'include', 1.64 + '.', 1.65 + ], 1.66 + }, 1.67 + 'sources': [ 1.68 + # sources. 1.69 + 'source/compare_neon.cc', 1.70 + 'source/rotate_neon.cc', 1.71 + 'source/row_neon.cc', 1.72 + 'source/scale_neon.cc', 1.73 + ], 1.74 + }, 1.75 + ], 1.76 + }], 1.77 + ], 1.78 + 'targets': [ 1.79 + { 1.80 + 'target_name': 'libyuv', 1.81 + # Change type to 'shared_library' to build .so or .dll files. 1.82 + 'type': 'static_library', 1.83 + # Allows libyuv.a redistributable library without external dependencies. 1.84 + # 'standalone_static_library': 1, 1.85 + 'conditions': [ 1.86 + # TODO(fbarchard): Use gyp define to enable jpeg. 1.87 + [ 'OS != "ios" and build_with_mozilla!=1', { 1.88 + 'defines': [ 1.89 + 'HAVE_JPEG' 1.90 + ], 1.91 + 'conditions': [ 1.92 + # Android uses libjpeg for system jpeg support. 1.93 + [ 'OS == "android" and use_system_libjpeg == 1', { 1.94 + 'dependencies': [ 1.95 + '<(DEPTH)/third_party/libjpeg/libjpeg.gyp:libjpeg', 1.96 + ], 1.97 + }, { 1.98 + 'dependencies': [ 1.99 + '<(DEPTH)/third_party/libjpeg_turbo/libjpeg.gyp:libjpeg', 1.100 + ], 1.101 + }], 1.102 + [ 'use_system_libjpeg == 1', { 1.103 + 'link_settings': { 1.104 + 'libraries': [ 1.105 + '-ljpeg', 1.106 + ], 1.107 + } 1.108 + }], 1.109 + ], 1.110 + }], 1.111 + [ 'build_neon != 0', { 1.112 + 'dependencies': [ 1.113 + 'libyuv_neon', 1.114 + ], 1.115 + 'defines': [ 1.116 + 'LIBYUV_NEON', 1.117 + ] 1.118 + }], 1.119 + [ 'yuv_disable_asm!=0', { 1.120 + 'defines': [ 1.121 + # Enable the following 3 macros to turn off assembly for specified CPU. 1.122 + 'LIBYUV_DISABLE_X86', 1.123 + 'LIBYUV_DISABLE_NEON', 1.124 + 'LIBYUV_DISABLE_MIPS', 1.125 + ], 1.126 + }], 1.127 + [ 'yuv_disable_avx2==1', { 1.128 + 'defines': [ 1.129 + 'LIBYUV_DISABLE_AVX2', 1.130 + ] 1.131 + }], 1.132 + ['build_with_mozilla==1', { 1.133 + 'include_dirs': [ 1.134 + '$(DEPTH)/dist/include', 1.135 + ], 1.136 + 'direct_dependent_settings': { 1.137 + 'include_dirs': [ 1.138 + '$(DEPTH)/dist/include', 1.139 + ], 1.140 + }, 1.141 + }], 1.142 + ], 1.143 + 'defines': [ 1.144 + # Enable the following 3 macros to turn off assembly for specified CPU. 1.145 + # 'LIBYUV_DISABLE_X86', 1.146 + # 'LIBYUV_DISABLE_NEON', 1.147 + # 'LIBYUV_DISABLE_MIPS', 1.148 + # This disables AVX2 (Haswell) support, overriding compiler checks 1.149 + # 'LIBYUV_DISABLE_AVX2', 1.150 + # Enable the following macro to build libyuv as a shared library (dll). 1.151 + # 'LIBYUV_USING_SHARED_LIBRARY', 1.152 + ], 1.153 + 'include_dirs': [ 1.154 + 'include', 1.155 + '.', 1.156 + ], 1.157 + 'direct_dependent_settings': { 1.158 + 'include_dirs': [ 1.159 + 'include', 1.160 + '.', 1.161 + ], 1.162 + }, 1.163 + 'sources': [ 1.164 + '<@(libyuv_sources)', 1.165 + ], 1.166 + }, 1.167 + ], # targets. 1.168 +} 1.169 + 1.170 +# Local Variables: 1.171 +# tab-width:2 1.172 +# indent-tabs-mode:nil 1.173 +# End: 1.174 +# vim: set expandtab tabstop=2 shiftwidth=2: