OLD | NEW |
1 # Copyright (c) 2009 The Chromium Authors. All rights reserved. | 1 # Copyright (c) 2009 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 # TODO(ajwong): Determine if we want to statically link libz. | 5 # TODO(ajwong): Determine if we want to statically link libz. |
6 | 6 |
7 { | 7 { |
8 'target_defaults': { | 8 'target_defaults': { |
9 'conditions': [ | 9 'conditions': [ |
10 ['OS!="linux" and OS!="freebsd"', {'sources/': [['exclude', '/linux/']]}], | 10 ['OS!="linux" and OS!="freebsd" and OS!="openbsd"', { |
| 11 'sources/': [['exclude', '/linux/']] |
| 12 }], |
11 ['OS!="mac"', {'sources/': [['exclude', '/mac/']]}], | 13 ['OS!="mac"', {'sources/': [['exclude', '/mac/']]}], |
12 ['OS!="win"', {'sources/': [['exclude', '/win/']]}], | 14 ['OS!="win"', {'sources/': [['exclude', '/win/']]}], |
13 ], | 15 ], |
14 'variables': { | 16 'variables': { |
15 # Since we are not often debugging FFmpeg, and performance is | 17 # Since we are not often debugging FFmpeg, and performance is |
16 # unacceptable without optimization, freeze the optimizations to -O2. | 18 # unacceptable without optimization, freeze the optimizations to -O2. |
17 # If someone really wants -O1 , they can change these in their checkout. | 19 # If someone really wants -O1 , they can change these in their checkout. |
18 # If you want -O0, see the Gotchas in README.Chromium for why that | 20 # If you want -O0, see the Gotchas in README.Chromium for why that |
19 # won't work. | 21 # won't work. |
20 'debug_optimize': '2', | 22 'debug_optimize': '2', |
(...skipping 19 matching lines...) Expand all Loading... |
40 'shared_generated_dir': '<(SHARED_INTERMEDIATE_DIR)/third_party/ffmpeg', | 42 'shared_generated_dir': '<(SHARED_INTERMEDIATE_DIR)/third_party/ffmpeg', |
41 'asm_library': 'ffmpegasm', | 43 'asm_library': 'ffmpegasm', |
42 }, | 44 }, |
43 'conditions': [ | 45 'conditions': [ |
44 # This condition is for migrating from pre-built binaries to an in-tree | 46 # This condition is for migrating from pre-built binaries to an in-tree |
45 # source build. Most of these should be removed once FFmpeg is built on | 47 # source build. Most of these should be removed once FFmpeg is built on |
46 # mac and linux. Windows will take more work. | 48 # mac and linux. Windows will take more work. |
47 # | 49 # |
48 # TODO(ajwong): Per the comment above, reduce this conditional's size and | 50 # TODO(ajwong): Per the comment above, reduce this conditional's size and |
49 # determine if in-tree build in Windows is tractable. | 51 # determine if in-tree build in Windows is tractable. |
50 ['(OS!="linux" and OS!="freebsd" and OS!="mac") or use_system_ffmpeg!=0', { | 52 ['(OS!="linux" and OS!="freebsd" and OS!="openbsd" and OS!="mac") or use_sys
tem_ffmpeg!=0', { |
51 'variables': { | 53 'variables': { |
52 'target_for_binaries': 'ffmpeg_binaries', | 54 'target_for_binaries': 'ffmpeg_binaries', |
53 'ffmpeg_include_root': 'include', | 55 'ffmpeg_include_root': 'include', |
54 }, | 56 }, |
55 },{ # else OS=="linux" | 57 },{ # else OS=="linux" |
56 'variables': { | 58 'variables': { |
57 'target_for_binaries': 'ffmpegsumo_nolink', | 59 'target_for_binaries': 'ffmpegsumo_nolink', |
58 'ffmpeg_include_root': 'source/patched-ffmpeg-mt', | 60 'ffmpeg_include_root': 'source/patched-ffmpeg-mt', |
59 'conditions': [ | 61 'conditions': [ |
60 ['target_arch=="x64" or target_arch=="ia32"', { | 62 ['target_arch=="x64" or target_arch=="ia32"', { |
(...skipping 206 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
267 'source/patched-ffmpeg-mt/libavcodec/arm/mpegvideo_armv5te.c', | 269 'source/patched-ffmpeg-mt/libavcodec/arm/mpegvideo_armv5te.c', |
268 'source/patched-ffmpeg-mt/libavcodec/arm/mpegvideo_armv5te_s.S', | 270 'source/patched-ffmpeg-mt/libavcodec/arm/mpegvideo_armv5te_s.S', |
269 ], | 271 ], |
270 }], | 272 }], |
271 ['target_arch=="arm" and ffmpeg_branding=="ChromeOS"', { | 273 ['target_arch=="arm" and ffmpeg_branding=="ChromeOS"', { |
272 'sources': [ | 274 'sources': [ |
273 'source/patched-ffmpeg-mt/libavcodec/h264_mp4toannexb_bsf.c', | 275 'source/patched-ffmpeg-mt/libavcodec/h264_mp4toannexb_bsf.c', |
274 'source/patched-ffmpeg-mt/libavcodec/mpeg4video_es_bsf.c', | 276 'source/patched-ffmpeg-mt/libavcodec/mpeg4video_es_bsf.c', |
275 ], | 277 ], |
276 }], # target_arch=="arm" and ffmpeg_branding=="ChromeOS" | 278 }], # target_arch=="arm" and ffmpeg_branding=="ChromeOS" |
277 ['OS=="linux" or OS=="freebsd"', { | 279 ['OS=="linux" or OS=="freebsd" or OS=="openbsd"', { |
278 'defines': [ | 280 'defines': [ |
279 '_ISOC99_SOURCE', | 281 '_ISOC99_SOURCE', |
280 '_LARGEFILE_SOURCE', | 282 '_LARGEFILE_SOURCE', |
281 ], | 283 ], |
282 'cflags': [ | 284 'cflags': [ |
283 '-std=c99', | 285 '-std=c99', |
284 '-pthread', | 286 '-pthread', |
285 '-fno-math-errno', | 287 '-fno-math-errno', |
286 ], | 288 ], |
287 'cflags!': [ | 289 'cflags!': [ |
(...skipping 15 matching lines...) Expand all Loading... |
303 ['ffmpeg_asm_lib==1', { | 305 ['ffmpeg_asm_lib==1', { |
304 'libraries': [ | 306 'libraries': [ |
305 # TODO(ajwong): When scons is dead, collapse this with the | 307 # TODO(ajwong): When scons is dead, collapse this with the |
306 # absolute path entry inside the OS="mac" conditional, and | 308 # absolute path entry inside the OS="mac" conditional, and |
307 # move it out of the conditionals block altogether. | 309 # move it out of the conditionals block altogether. |
308 '-l<(asm_library)', | 310 '-l<(asm_library)', |
309 ], | 311 ], |
310 }], | 312 }], |
311 ], | 313 ], |
312 }, | 314 }, |
313 }], # OS=="linux" or OS=="freebsd" | 315 }], # OS=="linux" or OS=="freebsd" or OS=="openbsd" |
314 ['OS=="mac"', { | 316 ['OS=="mac"', { |
315 'libraries': [ | 317 'libraries': [ |
316 # TODO(ajwong): Move into link_settings when this is fixed: | 318 # TODO(ajwong): Move into link_settings when this is fixed: |
317 # | 319 # |
318 # http://code.google.com/p/gyp/issues/detail?id=108 | 320 # http://code.google.com/p/gyp/issues/detail?id=108 |
319 '<(shared_generated_dir)/<(STATIC_LIB_PREFIX)<(asm_library)<(STA
TIC_LIB_SUFFIX)', | 321 '<(shared_generated_dir)/<(STATIC_LIB_PREFIX)<(asm_library)<(STA
TIC_LIB_SUFFIX)', |
320 ], | 322 ], |
321 'link_settings': { | 323 'link_settings': { |
322 'libraries': [ | 324 'libraries': [ |
323 '$(SDKROOT)/usr/lib/libz.dylib', | 325 '$(SDKROOT)/usr/lib/libz.dylib', |
(...skipping 63 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
387 }], | 389 }], |
388 ], | 390 ], |
389 'sources': [ | 391 'sources': [ |
390 # The FFmpeg yasm files. | 392 # The FFmpeg yasm files. |
391 'source/patched-ffmpeg-mt/libavcodec/x86/dsputil_yasm.asm', | 393 'source/patched-ffmpeg-mt/libavcodec/x86/dsputil_yasm.asm', |
392 'source/patched-ffmpeg-mt/libavcodec/x86/fft_mmx.asm', | 394 'source/patched-ffmpeg-mt/libavcodec/x86/fft_mmx.asm', |
393 ], | 395 ], |
394 'rules': [ | 396 'rules': [ |
395 { | 397 { |
396 'conditions': [ | 398 'conditions': [ |
397 ['OS=="linux" or OS=="freebsd"', { | 399 ['OS=="linux" or OS=="freebsd" or OS=="openbsd"', { |
398 'variables': { | 400 'variables': { |
399 'obj_format': 'elf', | 401 'obj_format': 'elf', |
400 }, | 402 }, |
401 'conditions': [ | 403 'conditions': [ |
402 ['target_arch=="ia32"', { | 404 ['target_arch=="ia32"', { |
403 'variables': { | 405 'variables': { |
404 'yasm_flags': [ | 406 'yasm_flags': [ |
405 '-DARCH_X86_32', | 407 '-DARCH_X86_32', |
406 '-m', 'x86', | 408 '-m', 'x86', |
407 ], | 409 ], |
(...skipping 97 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
505 # Most people will want to depend on this target instead of on | 507 # Most people will want to depend on this target instead of on |
506 # ffmpegsumo directly since ffmpegsumo is meant to be | 508 # ffmpegsumo directly since ffmpegsumo is meant to be |
507 # used via dlopen() in chrome. | 509 # used via dlopen() in chrome. |
508 'target_name': 'ffmpegsumo_nolink', | 510 'target_name': 'ffmpegsumo_nolink', |
509 'type': 'executable', | 511 'type': 'executable', |
510 'sources': [ 'dummy_nolink.cc' ], | 512 'sources': [ 'dummy_nolink.cc' ], |
511 'dependencies': [ | 513 'dependencies': [ |
512 'ffmpegsumo', | 514 'ffmpegsumo', |
513 ], | 515 ], |
514 'conditions': [ | 516 'conditions': [ |
515 ['OS=="linux" or OS=="freebsd"', { | 517 ['OS=="linux" or OS=="freebsd" or OS=="openbsd"', { |
516 'copies': [ | 518 'copies': [ |
517 { | 519 { |
518 # On Make and Scons builds, the library does not end up in | 520 # On Make and Scons builds, the library does not end up in |
519 # the PRODUCT_DIR. | 521 # the PRODUCT_DIR. |
520 # | 522 # |
521 # http://code.google.com/p/gyp/issues/detail?id=57 | 523 # http://code.google.com/p/gyp/issues/detail?id=57 |
522 # | 524 # |
523 # TODO(ajwong): Fix gyp, fix the world. | 525 # TODO(ajwong): Fix gyp, fix the world. |
524 'destination': '<(PRODUCT_DIR)', | 526 'destination': '<(PRODUCT_DIR)', |
525 'files': ['<(SHARED_LIB_DIR)/<(SHARED_LIB_PREFIX)ffmpegsumo<(S
HARED_LIB_SUFFIX)'], | 527 'files': ['<(SHARED_LIB_DIR)/<(SHARED_LIB_PREFIX)ffmpegsumo<(S
HARED_LIB_SUFFIX)'], |
(...skipping 184 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
710 'conditions': [ | 712 'conditions': [ |
711 ['OS=="win"', { | 713 ['OS=="win"', { |
712 'variables': { | 714 'variables': { |
713 'source_files': [ | 715 'source_files': [ |
714 'binaries/<(ffmpeg_bin_dir)/avcodec-52.dll', | 716 'binaries/<(ffmpeg_bin_dir)/avcodec-52.dll', |
715 'binaries/<(ffmpeg_bin_dir)/avformat-52.dll', | 717 'binaries/<(ffmpeg_bin_dir)/avformat-52.dll', |
716 'binaries/<(ffmpeg_bin_dir)/avutil-50.dll', | 718 'binaries/<(ffmpeg_bin_dir)/avutil-50.dll', |
717 ], | 719 ], |
718 }, | 720 }, |
719 'dependencies': ['../../build/win/system.gyp:cygwin'], | 721 'dependencies': ['../../build/win/system.gyp:cygwin'], |
720 }], ['OS=="linux" or OS=="freebsd"', { | 722 }], ['OS=="linux" or OS=="freebsd" or OS=="openbsd"', { |
721 'variables': { | 723 'variables': { |
722 # TODO(ajwong): Clean this up after we've finished | 724 # TODO(ajwong): Clean this up after we've finished |
723 # migrating to in-tree build. | 725 # migrating to in-tree build. |
724 'source_files': [ | 726 'source_files': [ |
725 ], | 727 ], |
726 }, | 728 }, |
727 }], ['OS=="mac"', { | 729 }], ['OS=="mac"', { |
728 # TODO(ajwong): These files are also copied in: | 730 # TODO(ajwong): These files are also copied in: |
729 # webkit/tools/test_shell/test_shell.gyp and | 731 # webkit/tools/test_shell/test_shell.gyp and |
730 # chrome/chrome.gyp | 732 # chrome/chrome.gyp |
(...skipping 14 matching lines...) Expand all Loading... |
745 ], | 747 ], |
746 }, | 748 }, |
747 ], | 749 ], |
748 } | 750 } |
749 | 751 |
750 # Local Variables: | 752 # Local Variables: |
751 # tab-width:2 | 753 # tab-width:2 |
752 # indent-tabs-mode:nil | 754 # indent-tabs-mode:nil |
753 # End: | 755 # End: |
754 # vim: set expandtab tabstop=2 shiftwidth=2: | 756 # vim: set expandtab tabstop=2 shiftwidth=2: |
OLD | NEW |