fbarchard@google.com | b0c9797 | 2012-08-08 19:04:24 +0000 | [diff] [blame] | 1 | # Copyright 2011 The LibYuv Project Authors. All rights reserved. |
mikhal@webrtc.org | aed1cc9 | 2011-09-28 00:06:25 +0000 | [diff] [blame] | 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 |
fbarchard@google.com | cde5870 | 2013-01-28 00:02:35 +0000 | [diff] [blame] | 6 | # in the file PATENTS. All contributing project authors may |
mikhal@webrtc.org | aed1cc9 | 2011-09-28 00:06:25 +0000 | [diff] [blame] | 7 | # be found in the AUTHORS file in the root of the source tree. |
| 8 | |
| 9 | { |
sergeyu@google.com | 0d8da8a | 2014-01-14 01:01:19 +0000 | [diff] [blame] | 10 | 'includes': [ |
| 11 | 'libyuv.gypi', |
| 12 | ], |
fbarchard@google.com | 4f45c11 | 2012-07-24 18:32:05 +0000 | [diff] [blame] | 13 | 'variables': { |
fbarchard@google.com | 0ba7b23 | 2014-01-07 01:01:07 +0000 | [diff] [blame] | 14 | 'use_system_libjpeg%': 0, |
fbarchard@google.com | 455c66b | 2014-07-28 21:48:43 +0000 | [diff] [blame] | 15 | 'libyuv_disable_jpeg%': 0, |
fbarchard@google.com | 0ba7b23 | 2014-01-07 01:01:07 +0000 | [diff] [blame] | 16 | 'build_neon': 0, |
| 17 | 'conditions': [ |
fbarchard@google.com | c99fa63 | 2014-03-29 00:19:06 +0000 | [diff] [blame] | 18 | [ '(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)', { |
fbarchard@google.com | 0ba7b23 | 2014-01-07 01:01:07 +0000 | [diff] [blame] | 19 | 'build_neon': 1, |
| 20 | }], |
| 21 | ], |
fbarchard@google.com | 4f45c11 | 2012-07-24 18:32:05 +0000 | [diff] [blame] | 22 | }, |
fbarchard@google.com | 0ba7b23 | 2014-01-07 01:01:07 +0000 | [diff] [blame] | 23 | 'conditions': [ |
| 24 | [ 'build_neon != 0', { |
| 25 | 'targets': [ |
| 26 | # The NEON-specific components. |
| 27 | { |
| 28 | 'target_name': 'libyuv_neon', |
| 29 | 'type': 'static_library', |
| 30 | 'standalone_static_library': 1, |
fbarchard@google.com | 0ba7b23 | 2014-01-07 01:01:07 +0000 | [diff] [blame] | 31 | # TODO(noahric): This should remove whatever mfpu is set, not |
| 32 | # just vfpv3-d16. |
| 33 | 'cflags!': [ |
| 34 | '-mfpu=vfp', |
| 35 | '-mfpu=vfpv3', |
| 36 | '-mfpu=vfpv3-d16', |
| 37 | ], |
| 38 | 'cflags': [ |
| 39 | '-mfpu=neon', |
| 40 | ], |
| 41 | 'include_dirs': [ |
| 42 | 'include', |
| 43 | '.', |
| 44 | ], |
| 45 | 'direct_dependent_settings': { |
| 46 | 'include_dirs': [ |
| 47 | 'include', |
| 48 | '.', |
| 49 | ], |
| 50 | }, |
| 51 | 'sources': [ |
| 52 | # sources. |
| 53 | 'source/compare_neon.cc', |
| 54 | 'source/rotate_neon.cc', |
| 55 | 'source/row_neon.cc', |
| 56 | 'source/scale_neon.cc', |
| 57 | ], |
| 58 | }, |
| 59 | ], |
| 60 | }], |
| 61 | ], |
mikhal@webrtc.org | aed1cc9 | 2011-09-28 00:06:25 +0000 | [diff] [blame] | 62 | 'targets': [ |
| 63 | { |
| 64 | 'target_name': 'libyuv', |
fbarchard@google.com | 5ff0e97 | 2013-04-03 22:51:42 +0000 | [diff] [blame] | 65 | # Change type to 'shared_library' to build .so or .dll files. |
mikhal@webrtc.org | aed1cc9 | 2011-09-28 00:06:25 +0000 | [diff] [blame] | 66 | 'type': 'static_library', |
fbarchard@google.com | 4154163 | 2013-05-01 19:14:28 +0000 | [diff] [blame] | 67 | # Allows libyuv.a redistributable library without external dependencies. |
| 68 | 'standalone_static_library': 1, |
fbarchard@google.com | 4f45c11 | 2012-07-24 18:32:05 +0000 | [diff] [blame] | 69 | 'conditions': [ |
fbarchard@google.com | c99fa63 | 2014-03-29 00:19:06 +0000 | [diff] [blame] | 70 | [ 'OS == "ios" and target_subarch == 64', { |
| 71 | 'defines': [ |
| 72 | 'LIBYUV_DISABLE_NEON' |
| 73 | ], |
| 74 | }], |
fbarchard@google.com | 455c66b | 2014-07-28 21:48:43 +0000 | [diff] [blame] | 75 | [ 'OS != "ios" and libyuv_disable_jpeg != 1', { |
fbarchard@google.com | 5ff0e97 | 2013-04-03 22:51:42 +0000 | [diff] [blame] | 76 | 'defines': [ |
| 77 | 'HAVE_JPEG' |
fbarchard@google.com | 4f45c11 | 2012-07-24 18:32:05 +0000 | [diff] [blame] | 78 | ], |
fbarchard@google.com | 5ff0e97 | 2013-04-03 22:51:42 +0000 | [diff] [blame] | 79 | 'conditions': [ |
fbarchard@google.com | 9a46283 | 2014-01-18 02:07:16 +0000 | [diff] [blame] | 80 | # Caveat system jpeg support may not support motion jpeg |
| 81 | [ 'use_system_libjpeg == 1', { |
fbarchard@google.com | 31ca874 | 2013-12-13 00:25:28 +0000 | [diff] [blame] | 82 | 'dependencies': [ |
| 83 | '<(DEPTH)/third_party/libjpeg/libjpeg.gyp:libjpeg', |
| 84 | ], |
| 85 | }, { |
fbarchard@google.com | 5ff0e97 | 2013-04-03 22:51:42 +0000 | [diff] [blame] | 86 | 'dependencies': [ |
| 87 | '<(DEPTH)/third_party/libjpeg_turbo/libjpeg.gyp:libjpeg', |
| 88 | ], |
fbarchard@google.com | 31ca874 | 2013-12-13 00:25:28 +0000 | [diff] [blame] | 89 | }], |
| 90 | [ 'use_system_libjpeg == 1', { |
fbarchard@google.com | 5ff0e97 | 2013-04-03 22:51:42 +0000 | [diff] [blame] | 91 | 'link_settings': { |
| 92 | 'libraries': [ |
| 93 | '-ljpeg', |
| 94 | ], |
fbarchard@google.com | 31ca874 | 2013-12-13 00:25:28 +0000 | [diff] [blame] | 95 | } |
fbarchard@google.com | 5ff0e97 | 2013-04-03 22:51:42 +0000 | [diff] [blame] | 96 | }], |
| 97 | ], |
fbarchard@google.com | 4f45c11 | 2012-07-24 18:32:05 +0000 | [diff] [blame] | 98 | }], |
fbarchard@google.com | 0ba7b23 | 2014-01-07 01:01:07 +0000 | [diff] [blame] | 99 | [ 'build_neon != 0', { |
| 100 | 'dependencies': [ |
| 101 | 'libyuv_neon', |
| 102 | ], |
| 103 | 'defines': [ |
| 104 | 'LIBYUV_NEON', |
| 105 | ] |
| 106 | }], |
kjellander@google.com | 1034277 | 2014-07-03 18:39:32 +0000 | [diff] [blame] | 107 | # MemorySanitizer does not support assembly code yet. |
| 108 | # http://crbug.com/344505 |
| 109 | [ 'msan == 1', { |
| 110 | 'defines': [ |
| 111 | 'LIBYUV_DISABLE_X86', |
| 112 | ], |
| 113 | }], |
fbarchard@google.com | 145998b | 2012-02-23 04:03:15 +0000 | [diff] [blame] | 114 | ], |
fbarchard@google.com | 2842f25 | 2012-02-22 18:52:29 +0000 | [diff] [blame] | 115 | 'defines': [ |
fbarchard@google.com | f4951e7 | 2013-02-28 04:48:17 +0000 | [diff] [blame] | 116 | # Enable the following 3 macros to turn off assembly for specified CPU. |
fbarchard@google.com | 83a63e6 | 2013-02-27 00:20:29 +0000 | [diff] [blame] | 117 | # 'LIBYUV_DISABLE_X86', |
| 118 | # 'LIBYUV_DISABLE_NEON', |
| 119 | # 'LIBYUV_DISABLE_MIPS', |
fbarchard@google.com | f4951e7 | 2013-02-28 04:48:17 +0000 | [diff] [blame] | 120 | # Enable the following macro to build libyuv as a shared library (dll). |
| 121 | # 'LIBYUV_USING_SHARED_LIBRARY', |
fbarchard@google.com | 2842f25 | 2012-02-22 18:52:29 +0000 | [diff] [blame] | 122 | ], |
mikhal@webrtc.org | aed1cc9 | 2011-09-28 00:06:25 +0000 | [diff] [blame] | 123 | 'include_dirs': [ |
mikhal@webrtc.org | d191b43 | 2011-10-07 20:00:23 +0000 | [diff] [blame] | 124 | 'include', |
mikhal@webrtc.org | 82ca395 | 2011-10-28 01:01:57 +0000 | [diff] [blame] | 125 | '.', |
mikhal@webrtc.org | aed1cc9 | 2011-09-28 00:06:25 +0000 | [diff] [blame] | 126 | ], |
mikhal@webrtc.org | d191b43 | 2011-10-07 20:00:23 +0000 | [diff] [blame] | 127 | 'direct_dependent_settings': { |
| 128 | 'include_dirs': [ |
mikhal@webrtc.org | d191b43 | 2011-10-07 20:00:23 +0000 | [diff] [blame] | 129 | 'include', |
mikhal@webrtc.org | 82ca395 | 2011-10-28 01:01:57 +0000 | [diff] [blame] | 130 | '.', |
mikhal@webrtc.org | d191b43 | 2011-10-07 20:00:23 +0000 | [diff] [blame] | 131 | ], |
| 132 | }, |
mikhal@webrtc.org | aed1cc9 | 2011-09-28 00:06:25 +0000 | [diff] [blame] | 133 | 'sources': [ |
sergeyu@google.com | 0d8da8a | 2014-01-14 01:01:19 +0000 | [diff] [blame] | 134 | '<@(libyuv_sources)', |
mikhal@webrtc.org | aed1cc9 | 2011-09-28 00:06:25 +0000 | [diff] [blame] | 135 | ], |
| 136 | }, |
fbarchard@google.com | d51c342 | 2012-06-26 23:46:25 +0000 | [diff] [blame] | 137 | ], # targets. |
mikhal@webrtc.org | aed1cc9 | 2011-09-28 00:06:25 +0000 | [diff] [blame] | 138 | } |
| 139 | |
| 140 | # Local Variables: |
| 141 | # tab-width:2 |
| 142 | # indent-tabs-mode:nil |
| 143 | # End: |
| 144 | # vim: set expandtab tabstop=2 shiftwidth=2: |