OLD | NEW |
---|---|
1 # Copyright (c) 2012 The Chromium Authors. All rights reserved. | 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 | 2 # Use of this source code is governed by a BSD-style license that can be |
3 # found in the LICENSE file. | 3 # found in the LICENSE file. |
4 | 4 |
5 { | 5 { |
6 'targets': [ | 6 'targets': [ |
7 { | 7 { |
8 'target_name': 'libwebp_dec', | 8 'target_name': 'libwebp_dec', |
9 'type': 'static_library', | 9 'type': 'static_library', |
10 'dependencies' : [ | 10 'dependencies' : [ |
(...skipping 25 matching lines...) Expand all Loading... | |
36 'dependencies' : [ | 36 'dependencies' : [ |
37 'libwebp_utils', | 37 'libwebp_utils', |
38 ], | 38 ], |
39 }, | 39 }, |
40 { | 40 { |
41 'target_name': 'libwebp_dsp', | 41 'target_name': 'libwebp_dsp', |
42 'type': 'static_library', | 42 'type': 'static_library', |
43 'include_dirs': ['.'], | 43 'include_dirs': ['.'], |
44 'sources': [ | 44 'sources': [ |
45 'dsp/alpha_processing.c', | 45 'dsp/alpha_processing.c', |
46 'dsp/alpha_processing_sse2.c', | 46 'dsp/alpha_processing_mips_dsp_r2.c', |
47 'dsp/argb.c', | |
48 'dsp/argb_mips_dsp_r2.c', | |
49 'dsp/cost.c', | |
50 'dsp/cost_mips32.c', | |
51 'dsp/cost_mips_dsp_r2.c', | |
47 'dsp/cpu.c', | 52 'dsp/cpu.c', |
48 'dsp/dec.c', | 53 'dsp/dec.c', |
49 'dsp/dec_clip_tables.c', | 54 'dsp/dec_clip_tables.c', |
50 'dsp/dec_mips32.c', | 55 'dsp/dec_mips32.c', |
51 'dsp/dec_sse2.c', | 56 'dsp/dec_mips_dsp_r2.c', |
52 'dsp/enc.c', | 57 'dsp/enc.c', |
53 'dsp/enc_avx2.c', | 58 'dsp/enc_avx2.c', |
54 'dsp/enc_mips32.c', | 59 'dsp/enc_mips32.c', |
55 'dsp/enc_sse2.c', | 60 'dsp/enc_mips_dsp_r2.c', |
61 'dsp/filters.c', | |
62 'dsp/filters_mips_dsp_r2.c', | |
56 'dsp/lossless.c', | 63 'dsp/lossless.c', |
57 'dsp/lossless_mips32.c', | 64 'dsp/lossless_enc.c', |
58 'dsp/lossless_sse2.c', | 65 'dsp/lossless_enc_mips32.c', |
66 'dsp/lossless_enc_mips_dsp_r2.c', | |
67 'dsp/lossless_mips_dsp_r2.c', | |
68 'dsp/rescaler.c', | |
69 'dsp/rescaler_mips32.c', | |
70 'dsp/rescaler_mips_dsp_r2.c', | |
59 'dsp/upsampling.c', | 71 'dsp/upsampling.c', |
60 'dsp/upsampling_sse2.c', | 72 'dsp/upsampling_mips_dsp_r2.c', |
61 'dsp/yuv.c', | 73 'dsp/yuv.c', |
62 'dsp/yuv_mips32.c', | 74 'dsp/yuv_mips32.c', |
63 'dsp/yuv_sse2.c', | 75 'dsp/yuv_mips_dsp_r2.c', |
64 ], | 76 ], |
65 'dependencies' : [ | 77 'dependencies' : [ |
78 'libwebp_dsp_sse2', | |
79 'libwebp_dsp_sse41', | |
66 'libwebp_utils', | 80 'libwebp_utils', |
67 ], | 81 ], |
68 'conditions': [ | 82 'conditions': [ |
69 ['OS == "android"', { | 83 ['OS == "android"', { |
70 'dependencies': [ '../../build/android/ndk.gyp:cpu_features' ], | 84 'dependencies': [ '../../build/android/ndk.gyp:cpu_features' ], |
71 }], | 85 }], |
86 ['target_arch=="ia32" or target_arch=="x64"', { | |
87 'cflags': [ '-DWEBP_HAVE_SSE2', '-DWEBP_HAVE_SSE41', ], | |
88 'xcode_settings': { | |
89 'OTHER_CFLAGS': [ '-DWEBP_HAVE_SSE2', '-DWEBP_HAVE_SSE41' ] | |
jzern
2015/12/24 15:31:51
I haven't checked if OTHER_CFLAGS is necessary for
Nico
2015/12/24 15:38:49
The usual way to do defines is to have a 'defines'
jzern
2015/12/24 17:39:22
Done.
| |
90 }, | |
91 }], | |
72 ['order_profiling != 0', { | 92 ['order_profiling != 0', { |
73 'target_conditions' : [ | 93 'target_conditions' : [ |
74 ['_toolset=="target"', { | 94 ['_toolset=="target"', { |
95 'cflags!': [ '-finstrument-functions' ], | |
96 }], | |
97 ], | |
98 }], | |
99 ], | |
100 }, | |
101 { | |
102 'target_name': 'libwebp_dsp_sse2', | |
Nico
2015/12/24 15:38:49
same here
jzern
2015/12/24 17:39:22
Acknowledged.
| |
103 'type': 'static_library', | |
104 'include_dirs': ['.'], | |
105 'sources': [ | |
106 'dsp/alpha_processing_sse2.c', | |
107 'dsp/argb_sse2.c', | |
108 'dsp/cost_sse2.c', | |
109 'dsp/dec_sse2.c', | |
110 'dsp/enc_sse2.c', | |
111 'dsp/filters_sse2.c', | |
112 'dsp/lossless_enc_sse2.c', | |
113 'dsp/lossless_sse2.c', | |
114 'dsp/rescaler_sse2.c', | |
115 'dsp/upsampling_sse2.c', | |
116 'dsp/yuv_sse2.c', | |
117 ], | |
118 'conditions': [ | |
119 ['(target_arch=="ia32" or target_arch=="x64") and msan==0', { | |
120 'cflags': [ '-msse2', ], | |
121 'xcode_settings': { 'OTHER_CFLAGS': [ '-msse2' ] }, | |
122 }], | |
123 ['order_profiling != 0', { | |
124 'target_conditions' : [ | |
125 ['_toolset=="target"', { | |
126 'cflags!': [ '-finstrument-functions' ], | |
127 }], | |
128 ], | |
129 }], | |
130 ], | |
131 }, | |
132 { | |
133 'target_name': 'libwebp_dsp_sse41', | |
134 'type': 'static_library', | |
135 'include_dirs': ['.'], | |
136 'sources': [ | |
137 'dsp/alpha_processing_sse41.c', | |
138 'dsp/dec_sse41.c', | |
139 'dsp/enc_sse41.c', | |
140 'dsp/lossless_enc_sse41.c', | |
141 ], | |
142 'conditions': [ | |
143 ['OS=="win" and clang==1', { | |
144 # cl.exe's /arch flag doesn't have a setting for SSSE3/4, and cl.exe | |
145 # doesn't need it for intrinsics. clang-cl does need it, though. | |
146 'msvs_settings': { | |
147 'VCCLCompilerTool': { 'AdditionalOptions': [ '-msse4.1' ] }, | |
148 }, | |
149 }], | |
150 ['(target_arch=="ia32" or target_arch=="x64") and msan==0', { | |
151 'cflags': [ '-msse4.1', ], | |
152 'xcode_settings': { 'OTHER_CFLAGS': [ '-msse4.1' ] }, | |
153 }], | |
154 ['order_profiling != 0', { | |
155 'target_conditions' : [ | |
156 ['_toolset=="target"', { | |
75 'cflags!': [ '-finstrument-functions' ], | 157 'cflags!': [ '-finstrument-functions' ], |
76 }], | 158 }], |
77 ], | 159 ], |
78 }], | 160 }], |
79 ], | 161 ], |
80 }, | 162 }, |
81 { | 163 { |
82 'target_name': 'libwebp_dsp_neon', | 164 'target_name': 'libwebp_dsp_neon', |
83 'includes' : [ | 165 'includes' : [ |
84 # Disable LTO due to Neon issues. | 166 # Disable LTO due to Neon issues. |
85 # crbug.com/408997 | 167 # crbug.com/408997 |
86 '../../build/android/disable_gcc_lto.gypi', | 168 '../../build/android/disable_gcc_lto.gypi', |
87 ], | 169 ], |
88 'conditions': [ | 170 'conditions': [ |
89 # iOS uses the same project to generate build project for both device | 171 # iOS uses the same project to generate build project for both device |
90 # and simulator and do not use "target_arch" variable. Other platform | 172 # and simulator and do not use "target_arch" variable. Other platform |
91 # set it correctly. | 173 # set it correctly. |
92 ['OS == "ios" or (target_arch == "arm" and arm_version >= 7 and (arm_neo n == 1 or arm_neon_optional == 1)) or (target_arch == "arm64")', { | 174 ['OS == "ios" or (target_arch == "arm" and arm_version >= 7 and (arm_neo n == 1 or arm_neon_optional == 1)) or (target_arch == "arm64")', { |
93 'type': 'static_library', | 175 'type': 'static_library', |
94 'include_dirs': ['.'], | 176 'include_dirs': ['.'], |
95 'sources': [ | 177 'sources': [ |
96 'dsp/dec_neon.c', | 178 'dsp/dec_neon.c', |
97 'dsp/enc_neon.c', | 179 'dsp/enc_neon.c', |
180 'dsp/lossless_enc_neon.c', | |
98 'dsp/lossless_neon.c', | 181 'dsp/lossless_neon.c', |
182 'dsp/rescaler_neon.c', | |
99 'dsp/upsampling_neon.c', | 183 'dsp/upsampling_neon.c', |
100 ], | 184 ], |
101 'conditions': [ | 185 'conditions': [ |
102 ['target_arch == "arm" and arm_version >= 7 and (arm_neon == 1 or ar m_neon_optional == 1)', { | 186 ['target_arch == "arm" and arm_version >= 7 and (arm_neon == 1 or ar m_neon_optional == 1)', { |
103 # behavior similar to *.c.neon in an Android.mk | 187 # behavior similar to *.c.neon in an Android.mk |
104 'cflags!': [ '-mfpu=vfpv3-d16' ], | 188 'cflags!': [ '-mfpu=vfpv3-d16' ], |
105 'cflags': [ '-mfpu=neon' ], | 189 'cflags': [ '-mfpu=neon' ], |
106 }], | 190 }], |
107 ['target_arch == "arm64"', { | 191 ['target_arch == "arm64"', { |
108 # avoid an ICE with gcc-4.9: b/15574841 | 192 # avoid an ICE with gcc-4.9: b/15574841 |
(...skipping 15 matching lines...) Expand all Loading... | |
124 { | 208 { |
125 'target_name': 'libwebp_enc', | 209 'target_name': 'libwebp_enc', |
126 'type': 'static_library', | 210 'type': 'static_library', |
127 'include_dirs': ['.'], | 211 'include_dirs': ['.'], |
128 'sources': [ | 212 'sources': [ |
129 'enc/alpha.c', | 213 'enc/alpha.c', |
130 'enc/analysis.c', | 214 'enc/analysis.c', |
131 'enc/backward_references.c', | 215 'enc/backward_references.c', |
132 'enc/config.c', | 216 'enc/config.c', |
133 'enc/cost.c', | 217 'enc/cost.c', |
218 'enc/delta_palettization.c', | |
134 'enc/filter.c', | 219 'enc/filter.c', |
135 'enc/frame.c', | 220 'enc/frame.c', |
136 'enc/histogram.c', | 221 'enc/histogram.c', |
137 'enc/iterator.c', | 222 'enc/iterator.c', |
223 'enc/near_lossless.c', | |
138 'enc/picture.c', | 224 'enc/picture.c', |
139 'enc/picture_csp.c', | 225 'enc/picture_csp.c', |
140 'enc/picture_psnr.c', | 226 'enc/picture_psnr.c', |
141 'enc/picture_rescale.c', | 227 'enc/picture_rescale.c', |
142 'enc/picture_tools.c', | 228 'enc/picture_tools.c', |
143 'enc/quant.c', | 229 'enc/quant.c', |
144 'enc/syntax.c', | 230 'enc/syntax.c', |
145 'enc/token.c', | 231 'enc/token.c', |
146 'enc/tree.c', | 232 'enc/tree.c', |
147 'enc/vp8l.c', | 233 'enc/vp8l.c', |
(...skipping 20 matching lines...) Expand all Loading... | |
168 'utils/rescaler.c', | 254 'utils/rescaler.c', |
169 'utils/thread.c', | 255 'utils/thread.c', |
170 'utils/utils.c', | 256 'utils/utils.c', |
171 ], | 257 ], |
172 'variables': { | 258 'variables': { |
173 'clang_warning_flags': [ | 259 'clang_warning_flags': [ |
174 # See https://code.google.com/p/webp/issues/detail?id=253. | 260 # See https://code.google.com/p/webp/issues/detail?id=253. |
175 '-Wno-incompatible-pointer-types', | 261 '-Wno-incompatible-pointer-types', |
176 ] | 262 ] |
177 }, | 263 }, |
178 'direct_dependent_settings': { | |
179 'variables': { | |
180 'clang_warning_flags': [ | |
181 # See https://code.google.com/p/webp/issues/detail?id=253. | |
182 '-Wno-incompatible-pointer-types', | |
183 ] | |
184 }, | |
185 }, | |
186 }, | 264 }, |
187 { | 265 { |
188 'target_name': 'libwebp', | 266 'target_name': 'libwebp', |
189 'type': 'none', | 267 'type': 'none', |
190 'dependencies' : [ | 268 'dependencies' : [ |
191 'libwebp_dec', | 269 'libwebp_dec', |
192 'libwebp_demux', | 270 'libwebp_demux', |
193 'libwebp_dsp', | 271 'libwebp_dsp', |
194 'libwebp_dsp_neon', | 272 'libwebp_dsp_neon', |
195 'libwebp_enc', | 273 'libwebp_enc', |
196 'libwebp_utils', | 274 'libwebp_utils', |
197 ], | 275 ], |
198 'direct_dependent_settings': { | 276 'direct_dependent_settings': { |
199 'include_dirs': ['.'], | 277 'include_dirs': ['.'], |
200 }, | 278 }, |
201 'conditions': [ | 279 'conditions': [ |
202 ['OS!="win"', {'product_name': 'webp'}], | 280 ['OS!="win"', {'product_name': 'webp'}], |
203 ], | 281 ], |
204 }, | 282 }, |
205 ], | 283 ], |
206 } | 284 } |
OLD | NEW |