1 # Copyright 2011 The LibYuv Project Authors. All rights reserved. 2 # 3 # Use of this source code is governed by a BSD-style license 4 # that can be found in the LICENSE file in the root of the source 5 # tree. An additional intellectual property rights grant can be found 6 # in the file PATENTS. All contributing project authors may 7 # be found in the AUTHORS file in the root of the source tree. 8 9 { 10 'includes': [ 11 'libyuv.gypi', 12 ], 13 'variables': { 14 'use_system_libjpeg%': 0, 15 'build_neon': 0, 16 'conditions': [ 17 [ '(target_arch == "armv7" or target_arch == "armv7s" or (target_arch == "arm" and arm_version >= 7)) and target_subarch != 64 and (arm_neon == 1 or arm_neon_optional == 1)', { 18 'build_neon': 1, 19 }], 20 ], 21 }, 22 'conditions': [ 23 [ 'build_neon != 0', { 24 'targets': [ 25 # The NEON-specific components. 26 { 27 'target_name': 'libyuv_neon', 28 'type': 'static_library', 29 'standalone_static_library': 1, 30 # TODO(noahric): This should remove whatever mfpu is set, not 31 # just vfpv3-d16. 32 'cflags!': [ 33 '-mfpu=vfp', 34 '-mfpu=vfpv3', 35 '-mfpu=vfpv3-d16', 36 ], 37 'cflags': [ 38 '-mfpu=neon', 39 ], 40 'include_dirs': [ 41 'include', 42 '.', 43 ], 44 'direct_dependent_settings': { 45 'include_dirs': [ 46 'include', 47 '.', 48 ], 49 }, 50 'sources': [ 51 # sources. 52 'source/compare_neon.cc', 53 'source/rotate_neon.cc', 54 'source/row_neon.cc', 55 'source/scale_neon.cc', 56 ], 57 }, 58 ], 59 }], 60 ], 61 'targets': [ 62 { 63 'target_name': 'libyuv', 64 # Change type to 'shared_library' to build .so or .dll files. 65 'type': 'static_library', 66 # Allows libyuv.a redistributable library without external dependencies. 67 'standalone_static_library': 1, 68 'conditions': [ 69 [ 'OS == "ios" and target_subarch == 64', { 70 'defines': [ 71 'LIBYUV_DISABLE_NEON' 72 ], 73 }], 74 # TODO(fbarchard): Use gyp define to enable jpeg. 75 [ 'OS != "ios"', { 76 'defines': [ 77 'HAVE_JPEG' 78 ], 79 'conditions': [ 80 # Caveat system jpeg support may not support motion jpeg 81 [ 'use_system_libjpeg == 1', { 82 'dependencies': [ 83 '<(DEPTH)/third_party/libjpeg/libjpeg.gyp:libjpeg', 84 ], 85 }, { 86 'dependencies': [ 87 '<(DEPTH)/third_party/libjpeg_turbo/libjpeg.gyp:libjpeg', 88 ], 89 }], 90 [ 'use_system_libjpeg == 1', { 91 'link_settings': { 92 'libraries': [ 93 '-ljpeg', 94 ], 95 } 96 }], 97 ], 98 }], 99 [ 'build_neon != 0', { 100 'dependencies': [ 101 'libyuv_neon', 102 ], 103 'defines': [ 104 'LIBYUV_NEON', 105 ] 106 }], 107 ], 108 'defines': [ 109 # Enable the following 3 macros to turn off assembly for specified CPU. 110 # 'LIBYUV_DISABLE_X86', 111 # 'LIBYUV_DISABLE_NEON', 112 # 'LIBYUV_DISABLE_MIPS', 113 # Enable the following macro to build libyuv as a shared library (dll). 114 # 'LIBYUV_USING_SHARED_LIBRARY', 115 ], 116 'include_dirs': [ 117 'include', 118 '.', 119 ], 120 'direct_dependent_settings': { 121 'include_dirs': [ 122 'include', 123 '.', 124 ], 125 }, 126 'sources': [ 127 '<@(libyuv_sources)', 128 ], 129 }, 130 ], # targets. 131 } 132 133 # Local Variables: 134 # tab-width:2 135 # indent-tabs-mode:nil 136 # End: 137 # vim: set expandtab tabstop=2 shiftwidth=2: 138