Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(334)

Side by Side Diff: third_party/libjpeg_turbo/libjpeg.gyp

Issue 10699059: Remove misleading support for (use_system_libjpeg == 1 and use_libjpeg_turbo == 1) (Closed) Base URL: http://src.chromium.org/svn/trunk/deps/
Patch Set: Created 8 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 'variables': { 6 'variables': {
7 'shared_generated_dir': '<(SHARED_INTERMEDIATE_DIR)/third_party/libjpeg_turb o', 7 'shared_generated_dir': '<(SHARED_INTERMEDIATE_DIR)/third_party/libjpeg_turb o',
8 'use_system_libjpeg%': 0,
9 'conditions': [ 8 'conditions': [
10 [ 'OS=="win"', { 9 [ 'OS=="win"', {
11 'object_suffix': 'obj', 10 'object_suffix': 'obj',
12 }, { 11 }, {
13 'object_suffix': 'o', 12 'object_suffix': 'o',
14 }], 13 }],
15 ], 14 ],
16 }, 15 },
17 'conditions': [ 16 'targets': [
18 [ 'use_system_libjpeg==0', { 17 {
Steve Block 2012/07/02 18:55:20 This looks horrendous, but is just an indentation
19 'targets': [ 18 'target_name': 'libjpeg',
20 { 19 'type': '<(library)',
21 'target_name': 'libjpeg', 20 'include_dirs': [
22 'type': '<(library)', 21 '.',
23 'include_dirs': [ 22 ],
24 '.', 23 'defines': [
25 ], 24 'WITH_SIMD', 'MOTION_JPEG_SUPPORTED',
26 'defines': [ 25 ],
27 'WITH_SIMD', 'MOTION_JPEG_SUPPORTED', 26 'sources': [
28 ], 27 'jcapimin.c',
28 'jcapistd.c',
29 'jccoefct.c',
30 'jccolor.c',
31 'jcdctmgr.c',
32 'jchuff.c',
33 'jchuff.h',
34 'jcinit.c',
35 'jcmainct.c',
36 'jcmarker.c',
37 'jcmaster.c',
38 'jcomapi.c',
39 'jconfig.h',
40 'jcparam.c',
41 'jcphuff.c',
42 'jcprepct.c',
43 'jcsample.c',
44 'jdapimin.c',
45 'jdapistd.c',
46 'jdatadst.c',
47 'jdatasrc.c',
48 'jdcoefct.c',
49 'jdcolor.c',
50 'jdct.h',
51 'jddctmgr.c',
52 'jdhuff.c',
53 'jdhuff.h',
54 'jdinput.c',
55 'jdmainct.c',
56 'jdmarker.c',
57 'jdmaster.c',
58 'jdmerge.c',
59 'jdphuff.c',
60 'jdpostct.c',
61 'jdsample.c',
62 'jerror.c',
63 'jerror.h',
64 'jfdctflt.c',
65 'jfdctfst.c',
66 'jfdctint.c',
67 'jidctflt.c',
68 'jidctfst.c',
69 'jidctint.c',
70 'jidctred.c',
71 'jinclude.h',
72 'jmemmgr.c',
73 'jmemnobs.c',
74 'jmemsys.h',
75 'jmorecfg.h',
76 'jpegint.h',
77 'jpeglib.h',
78 'jpeglibmangler.h',
79 'jquant1.c',
80 'jquant2.c',
81 'jutils.c',
82 'jversion.h',
83 ],
84 'direct_dependent_settings': {
85 'include_dirs': [
86 '.',
87 ],
88 },
89 'msvs_disabled_warnings': [4018, 4101],
90 # VS2010 does not correctly incrementally link obj files generated
91 # from asm files. This flag disables UseLibraryDependencyInputs to
92 # avoid this problem.
93 'msvs_2010_disable_uldi_when_referenced': 1,
94 'conditions': [
95 [ 'OS!="win"', {'product_name': 'jpeg_turbo'}],
96 # Add target-specific source files.
97 [ 'target_arch=="ia32"', {
29 'sources': [ 98 'sources': [
30 'jcapimin.c', 99 'simd/jsimd_i386.c',
31 'jcapistd.c', 100 'simd/jccolmmx.asm',
32 'jccoefct.c', 101 'simd/jccolss2.asm',
33 'jccolor.c', 102 'simd/jcgrammx.asm',
34 'jcdctmgr.c', 103 'simd/jcgrass2.asm',
35 'jchuff.c', 104 'simd/jcqnt3dn.asm',
36 'jchuff.h', 105 'simd/jcqntmmx.asm',
37 'jcinit.c', 106 'simd/jcqnts2f.asm',
38 'jcmainct.c', 107 'simd/jcqnts2i.asm',
39 'jcmarker.c', 108 'simd/jcqntsse.asm',
40 'jcmaster.c', 109 'simd/jcsammmx.asm',
41 'jcomapi.c', 110 'simd/jcsamss2.asm',
42 'jconfig.h', 111 'simd/jdcolmmx.asm',
43 'jcparam.c', 112 'simd/jdcolss2.asm',
44 'jcphuff.c', 113 'simd/jdmermmx.asm',
45 'jcprepct.c', 114 'simd/jdmerss2.asm',
46 'jcsample.c', 115 'simd/jdsammmx.asm',
47 'jdapimin.c', 116 'simd/jdsamss2.asm',
48 'jdapistd.c', 117 'simd/jf3dnflt.asm',
49 'jdatadst.c', 118 'simd/jfmmxfst.asm',
50 'jdatasrc.c', 119 'simd/jfmmxint.asm',
51 'jdcoefct.c', 120 'simd/jfss2fst.asm',
52 'jdcolor.c', 121 'simd/jfss2int.asm',
53 'jdct.h', 122 'simd/jfsseflt.asm',
54 'jddctmgr.c', 123 'simd/ji3dnflt.asm',
55 'jdhuff.c', 124 'simd/jimmxfst.asm',
56 'jdhuff.h', 125 'simd/jimmxint.asm',
57 'jdinput.c', 126 'simd/jimmxred.asm',
58 'jdmainct.c', 127 'simd/jiss2flt.asm',
59 'jdmarker.c', 128 'simd/jiss2fst.asm',
60 'jdmaster.c', 129 'simd/jiss2int.asm',
61 'jdmerge.c', 130 'simd/jiss2red.asm',
62 'jdphuff.c', 131 'simd/jisseflt.asm',
63 'jdpostct.c', 132 'simd/jsimdcpu.asm',
64 'jdsample.c', 133 ],
65 'jerror.c', 134 }],
66 'jerror.h', 135 [ 'target_arch=="x64"', {
67 'jfdctflt.c', 136 'sources': [
68 'jfdctfst.c', 137 'simd/jsimd_x86_64.c',
69 'jfdctint.c', 138 'simd/jccolss2-64.asm',
70 'jidctflt.c', 139 'simd/jcgrass2-64.asm',
71 'jidctfst.c', 140 'simd/jcqnts2f-64.asm',
72 'jidctint.c', 141 'simd/jcqnts2i-64.asm',
73 'jidctred.c', 142 'simd/jcsamss2-64.asm',
74 'jinclude.h', 143 'simd/jdcolss2-64.asm',
75 'jmemmgr.c', 144 'simd/jdmerss2-64.asm',
76 'jmemnobs.c', 145 'simd/jdsamss2-64.asm',
77 'jmemsys.h', 146 'simd/jfss2fst-64.asm',
78 'jmorecfg.h', 147 'simd/jfss2int-64.asm',
79 'jpegint.h', 148 'simd/jfsseflt-64.asm',
80 'jpeglib.h', 149 'simd/jiss2flt-64.asm',
81 'jpeglibmangler.h', 150 'simd/jiss2fst-64.asm',
82 'jquant1.c', 151 'simd/jiss2int-64.asm',
83 'jquant2.c', 152 'simd/jiss2red-64.asm',
84 'jutils.c', 153 ],
85 'jversion.h', 154 }],
86 ], 155 # The ARM SIMD implementation can be used for devices that support
87 'direct_dependent_settings': { 156 # the NEON instruction set. This is done dynamically by probing CPU
88 'include_dirs': [ 157 # features at runtime, so always compile it for ARMv7-A devices.
89 '.', 158 [ 'target_arch=="arm"', {
159 'conditions': [
160 [ 'armv7 == 1 or arm_neon == 1', {
161 'sources': [
162 'simd/jsimd_arm.c',
163 'simd/jsimd_arm_neon.S',
164 ],
165 }, {
166 'sources': [
167 'jsimd_none.c',
168 ],
169 }]
170 ],
171 }],
172 [ 'target_arch=="mipsel"', {
173 'sources': [
174 'jsimd_none.c',
175 ],
176 }],
177
178 # Build rules for an asm file.
179 # On Windows, we use the precompiled yasm binary. On Linux, we build
180 # our patched yasm and use it except when use_system_yasm is 1. On
181 # Mac, we always build our patched yasm and use it because of
182 # <http://www.tortall.net/projects/yasm/ticket/236>.
183 [ 'OS=="win"', {
184 'variables': {
185 'yasm_path': '../yasm/binaries/win/yasm<(EXECUTABLE_SUFFIX)',
186 'conditions': [
187 [ 'target_arch=="ia32"', {
188 'yasm_format': '-fwin32',
189 'yasm_flags': [
190 '-D__x86__',
191 '-DWIN32',
192 '-DMSVC',
193 '-Iwin/'
194 ],
195 }, {
196 'yasm_format': '-fwin64',
197 'yasm_flags': [
198 '-D__x86_64__',
199 '-DWIN64',
200 '-DMSVC',
201 '-Iwin/'
202 ],
203 }],
90 ], 204 ],
91 }, 205 },
92 'msvs_disabled_warnings': [4018, 4101], 206 }],
93 # VS2010 does not correctly incrementally link obj files generated 207 [ 'OS=="mac"', {
94 # from asm files. This flag disables UseLibraryDependencyInputs to 208 'dependencies': [
95 # avoid this problem. 209 '../yasm/yasm.gyp:yasm#host',
96 'msvs_2010_disable_uldi_when_referenced': 1, 210 ],
211 'variables': {
212 'yasm_path': '<(PRODUCT_DIR)/yasm',
213 'conditions': [
214 [ 'target_arch=="ia32"', {
215 'yasm_format': '-fmacho',
216 'yasm_flags': [
217 '-D__x86__',
218 '-DMACHO',
219 '-Imac/'
220 ],
221 }, {
222 'yasm_format': '-fmacho64',
223 'yasm_flags': [
224 '-D__x86_64__',
225 '-DMACHO',
226 '-Imac/'
227 ],
228 }],
229 ],
230 },
231 }],
232 [ 'OS=="linux" or (OS=="android" and target_arch!="arm")', {
97 'conditions': [ 233 'conditions': [
98 [ 'OS!="win"', {'product_name': 'jpeg_turbo'}], 234 [ 'use_system_yasm==0', {
99 # Add target-specific source files.
100 [ 'target_arch=="ia32"', {
101 'sources': [
102 'simd/jsimd_i386.c',
103 'simd/jccolmmx.asm',
104 'simd/jccolss2.asm',
105 'simd/jcgrammx.asm',
106 'simd/jcgrass2.asm',
107 'simd/jcqnt3dn.asm',
108 'simd/jcqntmmx.asm',
109 'simd/jcqnts2f.asm',
110 'simd/jcqnts2i.asm',
111 'simd/jcqntsse.asm',
112 'simd/jcsammmx.asm',
113 'simd/jcsamss2.asm',
114 'simd/jdcolmmx.asm',
115 'simd/jdcolss2.asm',
116 'simd/jdmermmx.asm',
117 'simd/jdmerss2.asm',
118 'simd/jdsammmx.asm',
119 'simd/jdsamss2.asm',
120 'simd/jf3dnflt.asm',
121 'simd/jfmmxfst.asm',
122 'simd/jfmmxint.asm',
123 'simd/jfss2fst.asm',
124 'simd/jfss2int.asm',
125 'simd/jfsseflt.asm',
126 'simd/ji3dnflt.asm',
127 'simd/jimmxfst.asm',
128 'simd/jimmxint.asm',
129 'simd/jimmxred.asm',
130 'simd/jiss2flt.asm',
131 'simd/jiss2fst.asm',
132 'simd/jiss2int.asm',
133 'simd/jiss2red.asm',
134 'simd/jisseflt.asm',
135 'simd/jsimdcpu.asm',
136 ],
137 }],
138 [ 'target_arch=="x64"', {
139 'sources': [
140 'simd/jsimd_x86_64.c',
141 'simd/jccolss2-64.asm',
142 'simd/jcgrass2-64.asm',
143 'simd/jcqnts2f-64.asm',
144 'simd/jcqnts2i-64.asm',
145 'simd/jcsamss2-64.asm',
146 'simd/jdcolss2-64.asm',
147 'simd/jdmerss2-64.asm',
148 'simd/jdsamss2-64.asm',
149 'simd/jfss2fst-64.asm',
150 'simd/jfss2int-64.asm',
151 'simd/jfsseflt-64.asm',
152 'simd/jiss2flt-64.asm',
153 'simd/jiss2fst-64.asm',
154 'simd/jiss2int-64.asm',
155 'simd/jiss2red-64.asm',
156 ],
157 }],
158 # The ARM SIMD implementation can be used for devices that support
159 # the NEON instruction set. This is done dynamically by probing CPU
160 # features at runtime, so always compile it for ARMv7-A devices.
161 [ 'target_arch=="arm"', {
162 'conditions': [
163 [ 'armv7 == 1 or arm_neon == 1', {
164 'sources': [
165 'simd/jsimd_arm.c',
166 'simd/jsimd_arm_neon.S',
167 ],
168 }, {
169 'sources': [
170 'jsimd_none.c',
171 ],
172 }]
173 ],
174 }],
175 [ 'target_arch=="mipsel"', {
176 'sources': [
177 'jsimd_none.c',
178 ],
179 }],
180
181 # Build rules for an asm file.
182 # On Windows, we use the precompiled yasm binary. On Linux, we build
183 # our patched yasm and use it except when use_system_yasm is 1. On
184 # Mac, we always build our patched yasm and use it because of
185 # <http://www.tortall.net/projects/yasm/ticket/236>.
186 [ 'OS=="win"', {
187 'variables': {
188 'yasm_path': '../yasm/binaries/win/yasm<(EXECUTABLE_SUFFIX)',
189 'conditions': [
190 [ 'target_arch=="ia32"', {
191 'yasm_format': '-fwin32',
192 'yasm_flags': [
193 '-D__x86__',
194 '-DWIN32',
195 '-DMSVC',
196 '-Iwin/'
197 ],
198 }, {
199 'yasm_format': '-fwin64',
200 'yasm_flags': [
201 '-D__x86_64__',
202 '-DWIN64',
203 '-DMSVC',
204 '-Iwin/'
205 ],
206 }],
207 ],
208 },
209 }],
210 [ 'OS=="mac"', {
211 'dependencies': [ 235 'dependencies': [
212 '../yasm/yasm.gyp:yasm#host', 236 '../yasm/yasm.gyp:yasm#host',
213 ], 237 ],
214 'variables': { 238 }],
239 ],
240 'variables': {
241 'conditions': [
242 [ 'use_system_yasm==1', {
243 'yasm_path': '<!(which yasm)',
244 }, {
215 'yasm_path': '<(PRODUCT_DIR)/yasm', 245 'yasm_path': '<(PRODUCT_DIR)/yasm',
216 'conditions': [ 246 }],
217 [ 'target_arch=="ia32"', { 247 [ 'target_arch=="ia32"', {
218 'yasm_format': '-fmacho', 248 'yasm_format': '-felf',
219 'yasm_flags': [ 249 'yasm_flags': [
220 '-D__x86__', 250 '-D__x86__',
221 '-DMACHO', 251 '-DELF',
222 '-Imac/' 252 '-Ilinux/'
223 ], 253 ],
224 }, { 254 }, {
225 'yasm_format': '-fmacho64', 255 'yasm_format': '-felf64',
226 'yasm_flags': [ 256 'yasm_flags': [
227 '-D__x86_64__', 257 '-D__x86_64__',
228 '-DMACHO', 258 '-DELF',
229 '-Imac/' 259 '-Ilinux/'
230 ], 260 ],
231 }], 261 }],
232 ],
233 },
234 }],
235 [ 'OS=="linux" or (OS=="android" and target_arch!="arm")', {
236 'conditions': [
237 [ 'use_system_yasm==0', {
238 'dependencies': [
239 '../yasm/yasm.gyp:yasm#host',
240 ],
241 }],
242 ],
243 'variables': {
244 'conditions': [
245 [ 'use_system_yasm==1', {
246 'yasm_path': '<!(which yasm)',
247 }, {
248 'yasm_path': '<(PRODUCT_DIR)/yasm',
249 }],
250 [ 'target_arch=="ia32"', {
251 'yasm_format': '-felf',
252 'yasm_flags': [
253 '-D__x86__',
254 '-DELF',
255 '-Ilinux/'
256 ],
257 }, {
258 'yasm_format': '-felf64',
259 'yasm_flags': [
260 '-D__x86_64__',
261 '-DELF',
262 '-Ilinux/'
263 ],
264 }],
265 ],
266 },
267 }],
268 ],
269 'rules': [
270 {
271 'rule_name': 'assemble',
272 'extension': 'asm',
273 'conditions': [
274 [ 'target_arch!="arm"', {
275 'inputs': [ '<(yasm_path)', ],
276 'outputs': [
277 '<(shared_generated_dir)/<(RULE_INPUT_ROOT).<(object_suffix) ',
278 ],
279 'action': [
280 '<(yasm_path)',
281 '<(yasm_format)',
282 '<@(yasm_flags)',
283 '-DRGBX_FILLER_0XFF',
284 '-DSTRICT_MEMORY_ACCESS',
285 '-Isimd/',
286 '-o', '<(shared_generated_dir)/<(RULE_INPUT_ROOT).<(object_s uffix)',
287 '<(RULE_INPUT_PATH)',
288 ],
289 'process_outputs_as_sources': 1,
290 'message': 'Building <(RULE_INPUT_ROOT).<(object_suffix)',
291 }],
292 ]
293 },
294 ],
295 },
296 ],
297 }, { # else: use_system_libjpeg != 0
298 'targets': [
299 {
300 'target_name': 'libjpeg',
301 'type': 'none',
302 'direct_dependent_settings': {
303 'defines': [
304 'USE_SYSTEM_LIBJPEG',
305 ], 262 ],
306 }, 263 },
307 'link_settings': { 264 }],
308 'libraries': [ 265 ],
309 '-ljpeg', 266 'rules': [
310 ], 267 {
311 }, 268 'rule_name': 'assemble',
269 'extension': 'asm',
270 'conditions': [
271 [ 'target_arch!="arm"', {
272 'inputs': [ '<(yasm_path)', ],
273 'outputs': [
274 '<(shared_generated_dir)/<(RULE_INPUT_ROOT).<(object_suffix)',
275 ],
276 'action': [
277 '<(yasm_path)',
278 '<(yasm_format)',
279 '<@(yasm_flags)',
280 '-DRGBX_FILLER_0XFF',
281 '-DSTRICT_MEMORY_ACCESS',
282 '-Isimd/',
283 '-o', '<(shared_generated_dir)/<(RULE_INPUT_ROOT).<(object_suffi x)',
284 '<(RULE_INPUT_PATH)',
285 ],
286 'process_outputs_as_sources': 1,
287 'message': 'Building <(RULE_INPUT_ROOT).<(object_suffix)',
288 }],
289 ]
312 }, 290 },
313 ], 291 ],
314 }], 292 },
315 ], 293 ],
316 } 294 }
317 295
318 # Local Variables: 296 # Local Variables:
319 # tab-width:2 297 # tab-width:2
320 # indent-tabs-mode:nil 298 # indent-tabs-mode:nil
321 # End: 299 # End:
322 # vim: set expandtab tabstop=2 shiftwidth=2: 300 # vim: set expandtab tabstop=2 shiftwidth=2:
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698