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

Side by Side Diff: libjpeg.gyp

Issue 6667032: Support the 'use_system_yasm' variable (libjpeg_turbo).... (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/deps/third_party/libjpeg_turbo/
Patch Set: Created 9 years, 9 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) 2011 The Chromium Authors. All rights reserved. 1 # Copyright (c) 2011 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 'conditions': [ 8 'conditions': [
9 [ 'chromeos==1 or OS=="freebsd" or OS=="openbsd"', { 9 [ 'chromeos==1 or OS=="freebsd" or OS=="openbsd"', {
10 # Link to system .so since we already use it due to GTK. 10 # Link to system .so since we already use it due to GTK.
11 # See crbug.com/30288 and 31427 for why we skip OS=="linux" above. 11 # See crbug.com/30288 and 31427 for why we skip OS=="linux" above.
12 'use_system_libjpeg%': 1, 12 'use_system_libjpeg%': 1,
13 }, { # chromeos!=1 and OS!="freebsd" and OS!="openbsd" 13 }, { # chromeos!=1 and OS!="freebsd" and OS!="openbsd"
14 'use_system_libjpeg%': 0, 14 'use_system_libjpeg%': 0,
15 }], 15 }],
16 [ 'OS=="win"', { 16 [ 'OS=="win"', {
17 'object_suffix': 'obj', 17 'object_suffix': 'obj',
18 }, { 18 }, {
19 'object_suffix': 'o', 19 'object_suffix': 'o',
20 }], 20 }],
21 ], 21 ],
22
23 'use_system_yasm%': 0,
22 }, 24 },
23 'conditions': [ 25 'conditions': [
24 [ 'use_system_libjpeg==0', { 26 [ 'use_system_libjpeg==0', {
25 'targets': [ 27 'targets': [
26 { 28 {
27 'target_name': 'libjpeg', 29 'target_name': 'libjpeg',
28 'type': '<(library)', 30 'type': '<(library)',
29 'include_dirs': [ 31 'include_dirs': [
30 '.', 32 '.',
31 ], 33 ],
(...skipping 116 matching lines...) Expand 10 before | Expand all | Expand 10 after
148 'simd/jfss2int-64.asm', 150 'simd/jfss2int-64.asm',
149 'simd/jiss2red-64.asm', 151 'simd/jiss2red-64.asm',
150 'simd/jiss2int-64.asm', 152 'simd/jiss2int-64.asm',
151 'simd/jiss2fst-64.asm', 153 'simd/jiss2fst-64.asm',
152 'simd/jcqnts2f-64.asm', 154 'simd/jcqnts2f-64.asm',
153 'simd/jiss2flt-64.asm', 155 'simd/jiss2flt-64.asm',
154 ], 156 ],
155 }], 157 }],
156 158
157 # Build rules for an asm file. 159 # Build rules for an asm file.
158 # On Windows, we use the precompiled yasm binary. On Linux and Mac, 160 # On Windows, we use the precompiled yasm binary. On Linux, we build
159 # we build yasm and use it as ffmpeg does. 161 # our patched yasm and use it except when use_system_yasm is 1. On
162 # Mac, we always build our patched yasm and use it because of
163 # <http://www.tortall.net/projects/yasm/ticket/236>.
160 [ 'OS=="win"', { 164 [ 'OS=="win"', {
161 'variables': { 165 'variables': {
162 'yasm_path': '../yasm/binaries/win/yasm<(EXECUTABLE_SUFFIX)', 166 'yasm_path': '../yasm/binaries/win/yasm<(EXECUTABLE_SUFFIX)',
167 'yasm_format': '-fwin32',
168 'yasm_flags': [
169 '-DWIN32',
170 '-DMSVC',
171 '-Iwin/'
172 ],
163 }, 173 },
164 'rules': [
165 {
166 'rule_name': 'assemble',
167 'extension': 'asm',
168 'inputs': [ '<(RULE_INPUT_PATH)', ],
169 'outputs': [
170 '<(shared_generated_dir)/<(RULE_INPUT_ROOT).<(object_suffix) ',
171 ],
172 'action': [
173 '<(yasm_path)',
174 '-fwin32',
175 '-DWIN32',
176 '-DMSVC',
177 '-DRGBX_FILLER_0XFF',
178 '-DSTRICT_MEMORY_ACCESS',
179 '-Iwin/',
180 '-Isimd/',
181 '-o', '<(shared_generated_dir)/<(RULE_INPUT_ROOT).<(object_s uffix)',
182 '<(RULE_INPUT_PATH)',
183 ],
184 'process_outputs_as_sources': 1,
185 'message': 'Building <(RULE_INPUT_ROOT).<(object_suffix)',
186 },
187 ],
188 }], 174 }],
189 [ 'OS=="mac"', { 175 [ 'OS=="mac"', {
190 'dependencies': [ 176 'dependencies': [
191 '../yasm/yasm.gyp:yasm#host', 177 '../yasm/yasm.gyp:yasm#host',
192 ], 178 ],
193 'variables': { 179 'variables': {
194 'yasm_path': '<(PRODUCT_DIR)/yasm', 180 'yasm_path': '<(PRODUCT_DIR)/yasm',
181 'yasm_format': '-fmacho',
182 'yasm_flags': [
183 '-DMACHO',
184 '-Imac/'
185 ],
195 }, 186 },
196 'rules': [
197 {
198 'rule_name': 'assemble',
199 'extension': 'asm',
200 'inputs': [ '<(yasm_path)', ],
201 'outputs': [
202 '<(shared_generated_dir)/<(RULE_INPUT_ROOT).<(object_suffix) ',
203 ],
204 'action': [
205 '<(yasm_path)',
206 '-fmacho',
207 '-DMACHO',
208 '-DRGBX_FILLER_0XFF',
209 '-DSTRICT_MEMORY_ACCESS',
210 '-Imac/',
211 '-Isimd/',
212 '-o', '<(shared_generated_dir)/<(RULE_INPUT_ROOT).<(object_s uffix)',
213 '<(RULE_INPUT_PATH)',
214 ],
215 'process_outputs_as_sources': 1,
216 'message': 'Building <(RULE_INPUT_ROOT).<(object_suffix)',
217 },
218 ],
219 }], 187 }],
220 [ 'OS=="linux"', { 188 [ 'OS=="linux"', {
221 'dependencies': [ 189 'conditions': [
222 '../yasm/yasm.gyp:yasm#host', 190 [ 'use_system_yasm==1', {
Mark Mentovai 2011/03/11 16:00:22 Shouldn’t this be ==0?
Hironori Bono 2011/03/11 16:06:10 Done. Thank you for noticing it. (It seems my brai
191 'dependencies': [
192 '../yasm/yasm.gyp:yasm#host',
193 ],
194 }],
223 ], 195 ],
224 'variables': { 196 'variables': {
225 'yasm_path': '<(PRODUCT_DIR)/yasm',
226 'conditions': [ 197 'conditions': [
198 [ 'use_system_yasm==1', {
199 'yasm_path': '<!(which yasm)',
200 }, {
201 'yasm_path': '<(PRODUCT_DIR)/yasm',
202 }],
227 [ 'target_arch=="ia32"', { 203 [ 'target_arch=="ia32"', {
228 'yasm_format': '-felf', 204 'yasm_format': '-felf',
229 'yasm_flag': '-D__X86__', 205 'yasm_flag': '-D__X86__',
206 'yasm_flags': [
207 '-D__x86__',
208 '-DELF',
209 '-Ilinux/'
210 ],
230 }, { 211 }, {
231 'yasm_format': '-felf64', 212 'yasm_format': '-felf64',
232 'yasm_flag': '-D__x86_64__', 213 'yasm_flag': '-D__x86_64__',
214 'yasm_flags': [
215 '-D__x86_64__',
216 '-DELF',
217 '-Ilinux/'
218 ],
233 }], 219 }],
234 ], 220 ],
235 }, 221 },
236 'rules': [ 222 }],
237 { 223 ],
238 'rule_name': 'assemble', 224 'rules': [
239 'extension': 'asm', 225 {
240 'inputs': [ '<(RULE_INPUT_PATH)', ], 226 'rule_name': 'assemble',
241 'outputs': [ 227 'extension': 'asm',
242 '<(shared_generated_dir)/<(RULE_INPUT_ROOT).<(object_suffix) ', 228 'inputs': [ '<(yasm_path)', ],
243 ], 229 'outputs': [
244 'action': [ 230 '<(shared_generated_dir)/<(RULE_INPUT_ROOT).<(object_suffix)',
245 '<(yasm_path)',
246 '<(yasm_format)',
247 '-DELF',
248 '<(yasm_flag)',
249 '-DRGBX_FILLER_0XFF',
250 '-DSTRICT_MEMORY_ACCESS',
251 '-Ilinux/',
252 '-Isimd/',
253 '-o', '<(shared_generated_dir)/<(RULE_INPUT_ROOT).<(object_s uffix)',
254 '<(RULE_INPUT_PATH)',
255 ],
256 'process_outputs_as_sources': 1,
257 'message': 'Building <(RULE_INPUT_ROOT).<(object_suffix)',
258 },
259 ], 231 ],
260 }], 232 'action': [
233 '<(yasm_path)',
234 '<(yasm_format)',
235 '<@(yasm_flags)',
236 '-DRGBX_FILLER_0XFF',
237 '-DSTRICT_MEMORY_ACCESS',
238 '-Isimd/',
239 '-o', '<(shared_generated_dir)/<(RULE_INPUT_ROOT).<(object_suffi x)',
240 '<(RULE_INPUT_PATH)',
241 ],
242 'process_outputs_as_sources': 1,
243 'message': 'Building <(RULE_INPUT_ROOT).<(object_suffix)',
244 },
261 ], 245 ],
262 }, 246 },
263 ], 247 ],
264 }, { # else: use_system_libjpeg != 0 248 }, { # else: use_system_libjpeg != 0
265 'targets': [ 249 'targets': [
266 { 250 {
267 'target_name': 'libjpeg', 251 'target_name': 'libjpeg',
268 'type': 'settings', 252 'type': 'settings',
269 'direct_dependent_settings': { 253 'direct_dependent_settings': {
270 'defines': [ 254 'defines': [
271 'USE_SYSTEM_LIBJPEG', 255 'USE_SYSTEM_LIBJPEG',
272 ], 256 ],
273 }, 257 },
274 'link_settings': { 258 'link_settings': {
275 'libraries': [ 259 'libraries': [
276 '-ljpeg', 260 '-ljpeg',
277 ], 261 ],
278 }, 262 },
279 }, 263 },
280 ], 264 ],
281 }], 265 }],
282 ], 266 ],
283 } 267 }
284 268
285 # Local Variables: 269 # Local Variables:
286 # tab-width:2 270 # tab-width:2
287 # indent-tabs-mode:nil 271 # indent-tabs-mode:nil
288 # End: 272 # End:
289 # vim: set expandtab tabstop=2 shiftwidth=2: 273 # 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