OLD | NEW |
(Empty) | |
| 1 # Copyright (c) 2012 The Chromium Authors. All rights reserved. |
| 2 # Use of this source code is governed by a BSD-style license that can be |
| 3 # found in the LICENSE file. |
| 4 |
| 5 { |
| 6 'xcode_settings': { |
| 7 'SYMROOT': '<(DEPTH)/xcodebuild', |
| 8 }, |
| 9 'variables': { |
| 10 'shared_generated_dir': '<(SHARED_INTERMEDIATE_DIR)/third_party/externals/li
bjpeg-turbo', |
| 11 'conditions': [ |
| 12 [ 'skia_os == "win"', { |
| 13 'object_suffix': 'obj', |
| 14 }, { |
| 15 'object_suffix': 'o', |
| 16 }], |
| 17 ], |
| 18 }, |
| 19 'targets': [ |
| 20 { |
| 21 'target_name': 'libjpeg-turbo', |
| 22 'type': 'static_library', |
| 23 'include_dirs': [ |
| 24 '../third_party/externals/libjpeg-turbo/', |
| 25 ], |
| 26 'defines': [ |
| 27 'WITH_SIMD', |
| 28 'MOTION_JPEG_SUPPORTED', |
| 29 'NO_GETENV', |
| 30 ], |
| 31 'cflags': [ |
| 32 '-w', # supresses warnings |
| 33 ], |
| 34 'msvs_settings': { |
| 35 'VCCLCompilerTool': { |
| 36 'AdditionalOptions': [ |
| 37 '/w', |
| 38 ], |
| 39 }, |
| 40 }, |
| 41 'xcode_settings': { |
| 42 'WARNING_CFLAGS': [ |
| 43 '-w', |
| 44 ], |
| 45 }, |
| 46 'sources': [ |
| 47 '../third_party/externals/libjpeg-turbo/jaricom.c', |
| 48 '../third_party/externals/libjpeg-turbo/jcapimin.c', |
| 49 '../third_party/externals/libjpeg-turbo/jcapistd.c', |
| 50 '../third_party/externals/libjpeg-turbo/jcarith.c', |
| 51 '../third_party/externals/libjpeg-turbo/jccoefct.c', |
| 52 '../third_party/externals/libjpeg-turbo/jccolor.c', |
| 53 '../third_party/externals/libjpeg-turbo/jcdctmgr.c', |
| 54 '../third_party/externals/libjpeg-turbo/jchuff.c', |
| 55 '../third_party/externals/libjpeg-turbo/jchuff.h', |
| 56 '../third_party/externals/libjpeg-turbo/jcinit.c', |
| 57 '../third_party/externals/libjpeg-turbo/jcmainct.c', |
| 58 '../third_party/externals/libjpeg-turbo/jcmarker.c', |
| 59 '../third_party/externals/libjpeg-turbo/jcmaster.c', |
| 60 '../third_party/externals/libjpeg-turbo/jcomapi.c', |
| 61 '../third_party/externals/libjpeg-turbo/jconfig.h', |
| 62 '../third_party/externals/libjpeg-turbo/jconfigint.h', |
| 63 '../third_party/externals/libjpeg-turbo/jcparam.c', |
| 64 '../third_party/externals/libjpeg-turbo/jcphuff.c', |
| 65 '../third_party/externals/libjpeg-turbo/jcprepct.c', |
| 66 '../third_party/externals/libjpeg-turbo/jcsample.c', |
| 67 '../third_party/externals/libjpeg-turbo/jdapimin.c', |
| 68 '../third_party/externals/libjpeg-turbo/jdapistd.c', |
| 69 '../third_party/externals/libjpeg-turbo/jdarith.c', |
| 70 '../third_party/externals/libjpeg-turbo/jdcoefct.c', |
| 71 '../third_party/externals/libjpeg-turbo/jdcolor.c', |
| 72 '../third_party/externals/libjpeg-turbo/jdct.h', |
| 73 '../third_party/externals/libjpeg-turbo/jddctmgr.c', |
| 74 '../third_party/externals/libjpeg-turbo/jdhuff.c', |
| 75 '../third_party/externals/libjpeg-turbo/jdhuff.h', |
| 76 '../third_party/externals/libjpeg-turbo/jdinput.c', |
| 77 '../third_party/externals/libjpeg-turbo/jdmainct.c', |
| 78 '../third_party/externals/libjpeg-turbo/jdmarker.c', |
| 79 '../third_party/externals/libjpeg-turbo/jdmaster.c', |
| 80 '../third_party/externals/libjpeg-turbo/jdmerge.c', |
| 81 '../third_party/externals/libjpeg-turbo/jdphuff.c', |
| 82 '../third_party/externals/libjpeg-turbo/jdpostct.c', |
| 83 '../third_party/externals/libjpeg-turbo/jdsample.c', |
| 84 '../third_party/externals/libjpeg-turbo/jerror.c', |
| 85 '../third_party/externals/libjpeg-turbo/jerror.h', |
| 86 '../third_party/externals/libjpeg-turbo/jfdctflt.c', |
| 87 '../third_party/externals/libjpeg-turbo/jfdctfst.c', |
| 88 '../third_party/externals/libjpeg-turbo/jfdctint.c', |
| 89 '../third_party/externals/libjpeg-turbo/jidctflt.c', |
| 90 '../third_party/externals/libjpeg-turbo/jidctfst.c', |
| 91 '../third_party/externals/libjpeg-turbo/jidctint.c', |
| 92 '../third_party/externals/libjpeg-turbo/jidctred.c', |
| 93 '../third_party/externals/libjpeg-turbo/jinclude.h', |
| 94 '../third_party/externals/libjpeg-turbo/jmemmgr.c', |
| 95 '../third_party/externals/libjpeg-turbo/jmemnobs.c', |
| 96 '../third_party/externals/libjpeg-turbo/jmemsys.h', |
| 97 '../third_party/externals/libjpeg-turbo/jmorecfg.h', |
| 98 '../third_party/externals/libjpeg-turbo/jpegint.h', |
| 99 '../third_party/externals/libjpeg-turbo/jpeglib.h', |
| 100 '../third_party/externals/libjpeg-turbo/jpeglibmangler.h', |
| 101 '../third_party/externals/libjpeg-turbo/jquant1.c', |
| 102 '../third_party/externals/libjpeg-turbo/jquant2.c', |
| 103 '../third_party/externals/libjpeg-turbo/jutils.c', |
| 104 '../third_party/externals/libjpeg-turbo/jversion.h', |
| 105 ], |
| 106 'direct_dependent_settings': { |
| 107 'include_dirs': [ |
| 108 '../third_party/externals/libjpeg-turbo/', |
| 109 ], |
| 110 }, |
| 111 'msvs_disabled_warnings': [4018, 4101], |
| 112 # VS2010 does not correctly incrementally link obj files generated |
| 113 # from asm files. This flag disables UseLibraryDependencyInputs to |
| 114 # avoid this problem. |
| 115 'msvs_2010_disable_uldi_when_referenced': 1, |
| 116 |
| 117 # Add target-specific source files. |
| 118 'conditions': [ |
| 119 [ 'skia_arch_type == "x86"', { |
| 120 'sources': [ |
| 121 '../third_party/externals/libjpeg-turbo/simd/jsimd_i386.c', |
| 122 '../third_party/externals/libjpeg-turbo/simd/jccolor-mmx.asm', |
| 123 '../third_party/externals/libjpeg-turbo/simd/jccolor-sse2.asm', |
| 124 '../third_party/externals/libjpeg-turbo/simd/jcgray-mmx.asm', |
| 125 '../third_party/externals/libjpeg-turbo/simd/jcgray-sse2.asm', |
| 126 '../third_party/externals/libjpeg-turbo/simd/jcsample-mmx.asm', |
| 127 '../third_party/externals/libjpeg-turbo/simd/jcsample-sse2.asm', |
| 128 '../third_party/externals/libjpeg-turbo/simd/jdcolor-mmx.asm', |
| 129 '../third_party/externals/libjpeg-turbo/simd/jdcolor-sse2.asm', |
| 130 '../third_party/externals/libjpeg-turbo/simd/jdmerge-mmx.asm', |
| 131 '../third_party/externals/libjpeg-turbo/simd/jdmerge-sse2.asm', |
| 132 '../third_party/externals/libjpeg-turbo/simd/jdsample-mmx.asm', |
| 133 '../third_party/externals/libjpeg-turbo/simd/jdsample-sse2.asm', |
| 134 '../third_party/externals/libjpeg-turbo/simd/jfdctflt-3dn.asm', |
| 135 '../third_party/externals/libjpeg-turbo/simd/jfdctflt-sse.asm', |
| 136 '../third_party/externals/libjpeg-turbo/simd/jfdctfst-mmx.asm', |
| 137 '../third_party/externals/libjpeg-turbo/simd/jfdctfst-sse2.asm', |
| 138 '../third_party/externals/libjpeg-turbo/simd/jfdctint-mmx.asm', |
| 139 '../third_party/externals/libjpeg-turbo/simd/jfdctint-sse2.asm', |
| 140 '../third_party/externals/libjpeg-turbo/simd/jidctflt-3dn.asm', |
| 141 '../third_party/externals/libjpeg-turbo/simd/jidctflt-sse2.asm', |
| 142 '../third_party/externals/libjpeg-turbo/simd/jidctflt-sse.asm', |
| 143 '../third_party/externals/libjpeg-turbo/simd/jidctfst-mmx.asm', |
| 144 '../third_party/externals/libjpeg-turbo/simd/jidctfst-sse2.asm', |
| 145 '../third_party/externals/libjpeg-turbo/simd/jidctint-mmx.asm', |
| 146 '../third_party/externals/libjpeg-turbo/simd/jidctint-sse2.asm', |
| 147 '../third_party/externals/libjpeg-turbo/simd/jidctred-mmx.asm', |
| 148 '../third_party/externals/libjpeg-turbo/simd/jidctred-sse2.asm', |
| 149 '../third_party/externals/libjpeg-turbo/simd/jquant-3dn.asm', |
| 150 '../third_party/externals/libjpeg-turbo/simd/jquantf-sse2.asm', |
| 151 '../third_party/externals/libjpeg-turbo/simd/jquanti-sse2.asm', |
| 152 '../third_party/externals/libjpeg-turbo/simd/jquant-mmx.asm', |
| 153 '../third_party/externals/libjpeg-turbo/simd/jquant-sse.asm', |
| 154 '../third_party/externals/libjpeg-turbo/simd/jsimdcpu.asm', |
| 155 ], |
| 156 }], |
| 157 [ 'skia_arch_type == "x86_64"', { |
| 158 'sources': [ |
| 159 '../third_party/externals/libjpeg-turbo/simd/jsimd_x86_64.c', |
| 160 '../third_party/externals/libjpeg-turbo/simd/jccolor-sse2-64.asm', |
| 161 '../third_party/externals/libjpeg-turbo/simd/jcgray-sse2-64.asm', |
| 162 '../third_party/externals/libjpeg-turbo/simd/jcsample-sse2-64.asm', |
| 163 '../third_party/externals/libjpeg-turbo/simd/jdcolor-sse2-64.asm', |
| 164 '../third_party/externals/libjpeg-turbo/simd/jdmerge-sse2-64.asm', |
| 165 '../third_party/externals/libjpeg-turbo/simd/jdsample-sse2-64.asm', |
| 166 '../third_party/externals/libjpeg-turbo/simd/jfdctflt-sse-64.asm', |
| 167 '../third_party/externals/libjpeg-turbo/simd/jfdctfst-sse2-64.asm', |
| 168 '../third_party/externals/libjpeg-turbo/simd/jfdctint-sse2-64.asm', |
| 169 '../third_party/externals/libjpeg-turbo/simd/jidctflt-sse2-64.asm', |
| 170 '../third_party/externals/libjpeg-turbo/simd/jidctfst-sse2-64.asm', |
| 171 '../third_party/externals/libjpeg-turbo/simd/jidctint-sse2-64.asm', |
| 172 '../third_party/externals/libjpeg-turbo/simd/jidctred-sse2-64.asm', |
| 173 '../third_party/externals/libjpeg-turbo/simd/jquantf-sse2-64.asm', |
| 174 '../third_party/externals/libjpeg-turbo/simd/jquanti-sse2-64.asm', |
| 175 ], |
| 176 }], |
| 177 [ 'skia_arch_type == "arm64"', { |
| 178 'sources': [ |
| 179 '../third_party/externals/libjpeg-turbo/simd/jsimd_arm64.c', |
| 180 '../third_party/externals/libjpeg-turbo/simd/jsimd_arm64_neon.S', |
| 181 ], |
| 182 }], |
| 183 [ 'skia_arch_type == "arm"', { |
| 184 'conditions': [ |
| 185 [ 'arm_version >= 7 and (arm_neon == 1 or arm_neon_optional == 1)',
{ |
| 186 'sources': [ |
| 187 '../third_party/externals/libjpeg-turbo/simd/jsimd_arm.c', |
| 188 '../third_party/externals/libjpeg-turbo/simd/jsimd_arm_neon.S', |
| 189 ], |
| 190 }, { |
| 191 'sources': [ |
| 192 '../third_party/externals/libjpeg-turbo/jsimd_none.c', |
| 193 ], |
| 194 }], |
| 195 ], |
| 196 }], |
| 197 [ 'skia_arch_type == "mips"', { |
| 198 'conditions': [ |
| 199 [ 'skia_arch_width == 64', { |
| 200 'sources': [ |
| 201 '../third_party/externals/libjpeg-turbo/simd/jsimd_mips.c', |
| 202 '../third_party/externals/libjpeg-turbo/simd/jsimd_mips_dspr2_as
m.h', |
| 203 '../third_party/externals/libjpeg-turbo/simd/jsimd_mips_dspr2.S'
, |
| 204 ], |
| 205 }, { |
| 206 'sources': [ |
| 207 '../third_party/externals/libjpeg-turbo/jsimd_none.c', |
| 208 ], |
| 209 }], |
| 210 ], |
| 211 }], |
| 212 |
| 213 # Build rules for an asm file. |
| 214 # On Windows, we use the precompiled yasm binary. |
| 215 # On Linux, we build our patched yasm and use it except when use_system_
yasm is 1. |
| 216 # On Mac, we always build our patched yasm and use it. |
| 217 [ 'skia_os == "win"', { |
| 218 'variables': { |
| 219 'yasm_path': '../third_party/externals/yasm/binaries/win/yasm.exe', |
| 220 'conditions': [ |
| 221 [ 'skia_arch_type == "x86"', { |
| 222 'yasm_format': '-fwin32', |
| 223 'yasm_flags': [ |
| 224 '-D__x86__', |
| 225 '-DWIN32', |
| 226 '-DMSVC', |
| 227 '-Iwin/' |
| 228 ], |
| 229 }, { |
| 230 'yasm_format': '-fwin64', |
| 231 'yasm_flags': [ |
| 232 '-D__x86_64__', |
| 233 '-DWIN64', |
| 234 '-DMSVC', |
| 235 '-Iwin/' |
| 236 ], |
| 237 }], |
| 238 ], |
| 239 }, |
| 240 }], |
| 241 [ 'skia_os == "android" and (skia_arch_type == "x86" or skia_arch_type =
= "x86_64")', { |
| 242 'variables': { |
| 243 'yasm_path': '../third_party/yasm/config/android/yasm', |
| 244 'conditions': [ |
| 245 [ 'skia_arch_type == "x86"', { |
| 246 'yasm_format': '-felf', |
| 247 'yasm_flags': [ |
| 248 '-D__x86__', |
| 249 '-DELF', |
| 250 '-Ilinux/' |
| 251 ], |
| 252 }, { |
| 253 'yasm_format': '-felf64', |
| 254 'yasm_flags': [ |
| 255 '-D__x86_64__', |
| 256 '-DELF', |
| 257 '-Ilinux/' |
| 258 ], |
| 259 }], |
| 260 ], |
| 261 }, |
| 262 }], |
| 263 [ '(skia_os == "mac" or skia_os == "ios") and \ |
| 264 (skia_arch_type == "x86" or skia_arch_type == "x86_64")', { |
| 265 'dependencies': [ |
| 266 'yasm.gyp:yasm#host', |
| 267 ], |
| 268 'variables': { |
| 269 'yasm_path': '<(PRODUCT_DIR)/yasm', |
| 270 'conditions': [ |
| 271 [ 'skia_arch_type == "x86"', { |
| 272 'yasm_format': '-fmacho', |
| 273 'yasm_flags': [ |
| 274 '-D__x86__', |
| 275 '-DMACHO', |
| 276 '-Imac/' |
| 277 ], |
| 278 }, { |
| 279 'yasm_format': '-fmacho64', |
| 280 'yasm_flags': [ |
| 281 '-D__x86_64__', |
| 282 '-DMACHO', |
| 283 '-Imac/' |
| 284 ], |
| 285 }], |
| 286 ], |
| 287 }, |
| 288 }], |
| 289 [ '(skia_os == "linux" or skia_os == "freebsd" or skia_os == "openbsd" o
r \ |
| 290 skia_os == "solaris" or skia_os == "chromeos")', { |
| 291 'dependencies': [ |
| 292 'yasm.gyp:yasm#host', |
| 293 ], |
| 294 'variables': { |
| 295 'yasm_path': '<(PRODUCT_DIR)/yasm', |
| 296 'conditions': [ |
| 297 [ 'skia_arch_type == "x86"', { |
| 298 'yasm_format': '-felf', |
| 299 'yasm_flags': [ |
| 300 '-D__x86__', |
| 301 '-DELF', |
| 302 '-Ilinux/' |
| 303 ], |
| 304 }, { |
| 305 'yasm_format': '-felf64', |
| 306 'yasm_flags': [ |
| 307 '-D__x86_64__', |
| 308 '-DELF', |
| 309 '-Ilinux/' |
| 310 ], |
| 311 }], |
| 312 ], |
| 313 }, |
| 314 }], |
| 315 ], |
| 316 'rules': [ |
| 317 { |
| 318 'rule_name': 'assemble', |
| 319 'extension': 'asm', |
| 320 'conditions': [ |
| 321 [ 'skia_arch_type == "x86" or skia_arch_type == "x86_64"', { |
| 322 'inputs': [], |
| 323 'outputs': [ |
| 324 '<(shared_generated_dir)/<(RULE_INPUT_ROOT).<(object_suffix)', |
| 325 ], |
| 326 'action': [ |
| 327 '<(yasm_path)', |
| 328 '<(yasm_format)', |
| 329 '<@(yasm_flags)', |
| 330 '-DRGBX_FILLER_0XFF', |
| 331 '-DSTRICT_MEMORY_ACCESS', |
| 332 '-Isimd/', |
| 333 '-o', '<(shared_generated_dir)/<(RULE_INPUT_ROOT).<(object_suffi
x)', |
| 334 '<(RULE_INPUT_PATH)', |
| 335 ], |
| 336 'process_outputs_as_sources': 1, |
| 337 'message': 'Building <(RULE_INPUT_ROOT).<(object_suffix)', |
| 338 }], |
| 339 ] |
| 340 }, |
| 341 ], |
| 342 }, |
| 343 ], |
| 344 } |
OLD | NEW |