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

Side by Side Diff: third_party/ffmpeg/ffmpeg.gyp

Issue 606076: ffmpeg add solaris support (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 10 years, 10 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) 2010 The Chromium Authors. All rights reserved. 1 # Copyright (c) 2010 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(fbarchard): Turn off --enable-memalign-hack for all but windows. 5 # TODO(fbarchard): Turn off --enable-memalign-hack for all but windows.
6 # TODO(ajwong): Determine if we want to statically link libz. 6 # TODO(ajwong): Determine if we want to statically link libz.
7 7
8 8
9 9
10 { 10 {
11 'target_defaults': { 11 'target_defaults': {
12 'conditions': [ 12 'conditions': [
13 ['OS!="linux" and OS!="freebsd" and OS!="openbsd"', { 13 ['OS!="linux" and OS!="freebsd" and OS!="openbsd" and OS!="solaris"', {
14 'sources/': [['exclude', '/linux/']] 14 'sources/': [['exclude', '/linux/']]
15 }], 15 }],
16 ['OS!="mac"', {'sources/': [['exclude', '/mac/']]}], 16 ['OS!="mac"', {'sources/': [['exclude', '/mac/']]}],
17 ['OS!="win"', {'sources/': [['exclude', '/win/']]}], 17 ['OS!="win"', {'sources/': [['exclude', '/win/']]}],
18 ], 18 ],
19 'variables': { 19 'variables': {
20 # Since we are not often debugging FFmpeg, and performance is 20 # Since we are not often debugging FFmpeg, and performance is
21 # unacceptable without optimization, freeze the optimizations to -O2. 21 # unacceptable without optimization, freeze the optimizations to -O2.
22 # If someone really wants -O1 , they can change these in their checkout. 22 # If someone really wants -O1 , they can change these in their checkout.
23 # If you want -O0, see the Gotchas in README.Chromium for why that 23 # If you want -O0, see the Gotchas in README.Chromium for why that
(...skipping 21 matching lines...) Expand all
45 'shared_generated_dir': '<(SHARED_INTERMEDIATE_DIR)/third_party/ffmpeg', 45 'shared_generated_dir': '<(SHARED_INTERMEDIATE_DIR)/third_party/ffmpeg',
46 'asm_library': 'ffmpegasm', 46 'asm_library': 'ffmpegasm',
47 }, 47 },
48 'conditions': [ 48 'conditions': [
49 # This condition is for migrating from pre-built binaries to an in-tree 49 # This condition is for migrating from pre-built binaries to an in-tree
50 # source build. Most of these should be removed once FFmpeg is built on 50 # source build. Most of these should be removed once FFmpeg is built on
51 # mac and linux. Windows will take more work. 51 # mac and linux. Windows will take more work.
52 # 52 #
53 # TODO(ajwong): Per the comment above, reduce this conditional's size and 53 # TODO(ajwong): Per the comment above, reduce this conditional's size and
54 # determine if in-tree build in Windows is tractable. 54 # determine if in-tree build in Windows is tractable.
55 ['(OS!="linux" and OS!="freebsd" and OS!="openbsd" and OS!="mac") or use_sys tem_ffmpeg!=0', { 55 ['(OS!="linux" and OS!="freebsd" and OS!="openbsd" and OS!="solaris" and OS! ="mac") or use_system_ffmpeg!=0', {
56 'variables': { 56 'variables': {
57 'target_for_binaries': 'ffmpeg_binaries', 57 'target_for_binaries': 'ffmpeg_binaries',
58 'ffmpeg_include_root': 'include', 58 'ffmpeg_include_root': 'include',
59 }, 59 },
60 },{ # else OS=="linux" 60 },{ # else OS=="linux"
61 'variables': { 61 'variables': {
62 'target_for_binaries': 'ffmpegsumo_nolink', 62 'target_for_binaries': 'ffmpegsumo_nolink',
63 'ffmpeg_include_root': 'source/patched-ffmpeg-mt', 63 'ffmpeg_include_root': 'source/patched-ffmpeg-mt',
64 'conditions': [ 64 'conditions': [
65 ['target_arch=="x64" or target_arch=="ia32"', { 65 ['target_arch=="x64" or target_arch=="ia32"', {
(...skipping 235 matching lines...) Expand 10 before | Expand all | Expand 10 after
301 'source/patched-ffmpeg-mt/libavcodec/arm/mpegvideo_armv5te_s.S', 301 'source/patched-ffmpeg-mt/libavcodec/arm/mpegvideo_armv5te_s.S',
302 ], 302 ],
303 }], 303 }],
304 ['target_arch=="arm" and ffmpeg_branding=="ChromeOS"', { 304 ['target_arch=="arm" and ffmpeg_branding=="ChromeOS"', {
305 'sources': [ 305 'sources': [
306 'source/patched-ffmpeg-mt/libavcodec/h264_mp4toannexb_bsf.c', 306 'source/patched-ffmpeg-mt/libavcodec/h264_mp4toannexb_bsf.c',
307 # TODO(fbarchard): mpeg4video_es_bsf.c requires a patch 307 # TODO(fbarchard): mpeg4video_es_bsf.c requires a patch
308 # 'source/patched-ffmpeg-mt/libavcodec/mpeg4video_es_bsf.c', 308 # 'source/patched-ffmpeg-mt/libavcodec/mpeg4video_es_bsf.c',
309 ], 309 ],
310 }], # target_arch=="arm" and ffmpeg_branding=="ChromeOS" 310 }], # target_arch=="arm" and ffmpeg_branding=="ChromeOS"
311 ['OS=="linux" or OS=="freebsd" or OS=="openbsd"', { 311 ['OS=="linux" or OS=="freebsd" or OS=="openbsd" or OS=="solaris"', {
312 'defines': [ 312 'defines': [
313 '_ISOC99_SOURCE', 313 '_ISOC99_SOURCE',
314 '_LARGEFILE_SOURCE', 314 '_LARGEFILE_SOURCE',
315 ], 315 ],
316 'cflags': [ 316 'cflags': [
317 '-std=c99', 317 '-std=c99',
318 '-pthread', 318 '-pthread',
319 '-fno-math-errno', 319 '-fno-math-errno',
320 ], 320 ],
321 'cflags!': [ 321 'cflags!': [
(...skipping 15 matching lines...) Expand all
337 ['ffmpeg_asm_lib==1', { 337 ['ffmpeg_asm_lib==1', {
338 'libraries': [ 338 'libraries': [
339 # TODO(ajwong): When scons is dead, collapse this with the 339 # TODO(ajwong): When scons is dead, collapse this with the
340 # absolute path entry inside the OS="mac" conditional, and 340 # absolute path entry inside the OS="mac" conditional, and
341 # move it out of the conditionals block altogether. 341 # move it out of the conditionals block altogether.
342 '-l<(asm_library)', 342 '-l<(asm_library)',
343 ], 343 ],
344 }], 344 }],
345 ], 345 ],
346 }, 346 },
347 }], # OS=="linux" or OS=="freebsd" or OS=="openbsd" 347 }], # OS=="linux" or OS=="freebsd" or OS=="openbsd" or OS=="solaris "
348 ['OS=="mac"', { 348 ['OS=="mac"', {
349 'libraries': [ 349 'libraries': [
350 # TODO(ajwong): Move into link_settings when this is fixed: 350 # TODO(ajwong): Move into link_settings when this is fixed:
351 # 351 #
352 # http://code.google.com/p/gyp/issues/detail?id=108 352 # http://code.google.com/p/gyp/issues/detail?id=108
353 '<(shared_generated_dir)/<(STATIC_LIB_PREFIX)<(asm_library)<(STA TIC_LIB_SUFFIX)', 353 '<(shared_generated_dir)/<(STATIC_LIB_PREFIX)<(asm_library)<(STA TIC_LIB_SUFFIX)',
354 ], 354 ],
355 'link_settings': { 355 'link_settings': {
356 'libraries': [ 356 'libraries': [
357 '$(SDKROOT)/usr/lib/libz.dylib', 357 '$(SDKROOT)/usr/lib/libz.dylib',
(...skipping 63 matching lines...) Expand 10 before | Expand all | Expand 10 after
421 }], 421 }],
422 ], 422 ],
423 'sources': [ 423 'sources': [
424 # The FFmpeg yasm files. 424 # The FFmpeg yasm files.
425 'source/patched-ffmpeg-mt/libavcodec/x86/dsputil_yasm.asm', 425 'source/patched-ffmpeg-mt/libavcodec/x86/dsputil_yasm.asm',
426 'source/patched-ffmpeg-mt/libavcodec/x86/fft_mmx.asm', 426 'source/patched-ffmpeg-mt/libavcodec/x86/fft_mmx.asm',
427 ], 427 ],
428 'rules': [ 428 'rules': [
429 { 429 {
430 'conditions': [ 430 'conditions': [
431 ['OS=="linux" or OS=="freebsd" or OS=="openbsd"', { 431 ['OS=="linux" or OS=="freebsd" or OS=="openbsd" or OS=="solaris" ', {
432 'variables': { 432 'variables': {
433 'obj_format': 'elf', 433 'obj_format': 'elf',
434 }, 434 },
435 'conditions': [ 435 'conditions': [
436 ['target_arch=="ia32"', { 436 ['target_arch=="ia32"', {
437 'variables': { 437 'variables': {
438 'yasm_flags': [ 438 'yasm_flags': [
439 '-DARCH_X86_32', 439 '-DARCH_X86_32',
440 '-m', 'x86', 440 '-m', 'x86',
441 ], 441 ],
(...skipping 97 matching lines...) Expand 10 before | Expand all | Expand 10 after
539 # Most people will want to depend on this target instead of on 539 # Most people will want to depend on this target instead of on
540 # ffmpegsumo directly since ffmpegsumo is meant to be 540 # ffmpegsumo directly since ffmpegsumo is meant to be
541 # used via dlopen() in chrome. 541 # used via dlopen() in chrome.
542 'target_name': 'ffmpegsumo_nolink', 542 'target_name': 'ffmpegsumo_nolink',
543 'type': 'executable', 543 'type': 'executable',
544 'sources': [ 'dummy_nolink.cc' ], 544 'sources': [ 'dummy_nolink.cc' ],
545 'dependencies': [ 545 'dependencies': [
546 'ffmpegsumo', 546 'ffmpegsumo',
547 ], 547 ],
548 'conditions': [ 548 'conditions': [
549 ['OS=="linux" or OS=="freebsd" or OS=="openbsd"', { 549 ['OS=="linux" or OS=="freebsd" or OS=="openbsd" or OS=="solaris"', {
550 'copies': [ 550 'copies': [
551 { 551 {
552 # On Make and Scons builds, the library does not end up in 552 # On Make and Scons builds, the library does not end up in
553 # the PRODUCT_DIR. 553 # the PRODUCT_DIR.
554 # 554 #
555 # http://code.google.com/p/gyp/issues/detail?id=57 555 # http://code.google.com/p/gyp/issues/detail?id=57
556 # 556 #
557 # TODO(ajwong): Fix gyp, fix the world. 557 # TODO(ajwong): Fix gyp, fix the world.
558 'destination': '<(PRODUCT_DIR)', 558 'destination': '<(PRODUCT_DIR)',
559 'files': ['<(SHARED_LIB_DIR)/<(SHARED_LIB_PREFIX)ffmpegsumo<(S HARED_LIB_SUFFIX)'], 559 'files': ['<(SHARED_LIB_DIR)/<(SHARED_LIB_PREFIX)ffmpegsumo<(S HARED_LIB_SUFFIX)'],
(...skipping 151 matching lines...) Expand 10 before | Expand all | Expand 10 after
711 '-s', '<(stubs_filename_root)', 711 '-s', '<(stubs_filename_root)',
712 '-p', '<(project_path)', 712 '-p', '<(project_path)',
713 '<@(_inputs)', 713 '<@(_inputs)',
714 ], 714 ],
715 'process_outputs_as_sources': 1, 715 'process_outputs_as_sources': 1,
716 'message': 'Generating FFmpeg stubs for dynamic loading.', 716 'message': 'Generating FFmpeg stubs for dynamic loading.',
717 }, 717 },
718 ], 718 ],
719 }, 719 },
720 ], 720 ],
721 ['OS=="linux" or OS=="freebsd"', { 721 ['OS=="linux" or OS=="freebsd" or OS=="solaris"', {
722 'link_settings': { 722 'link_settings': {
723 'libraries': [ 723 'libraries': [
724 # We need dl for dlopen() and friends. 724 # We need dl for dlopen() and friends.
725 '-ldl', 725 '-ldl',
726 ], 726 ],
727 }, 727 },
728 }], 728 }],
729 ], # conditions 729 ], # conditions
730 }, 730 },
731 { 731 {
(...skipping 12 matching lines...) Expand all
744 'conditions': [ 744 'conditions': [
745 ['OS=="win"', { 745 ['OS=="win"', {
746 'variables': { 746 'variables': {
747 'source_files': [ 747 'source_files': [
748 'binaries/<(ffmpeg_bin_dir)/avcodec-52.dll', 748 'binaries/<(ffmpeg_bin_dir)/avcodec-52.dll',
749 'binaries/<(ffmpeg_bin_dir)/avformat-52.dll', 749 'binaries/<(ffmpeg_bin_dir)/avformat-52.dll',
750 'binaries/<(ffmpeg_bin_dir)/avutil-50.dll', 750 'binaries/<(ffmpeg_bin_dir)/avutil-50.dll',
751 ], 751 ],
752 }, 752 },
753 'dependencies': ['../../build/win/system.gyp:cygwin'], 753 'dependencies': ['../../build/win/system.gyp:cygwin'],
754 }], ['OS=="linux" or OS=="freebsd" or OS=="openbsd"', { 754 }], ['OS=="linux" or OS=="freebsd" or OS=="openbsd" or OS=="solaris"', {
755 'variables': { 755 'variables': {
756 # TODO(ajwong): Clean this up after we've finished 756 # TODO(ajwong): Clean this up after we've finished
757 # migrating to in-tree build. 757 # migrating to in-tree build.
758 'source_files': [ 758 'source_files': [
759 ], 759 ],
760 }, 760 },
761 }], ['OS=="mac"', { 761 }], ['OS=="mac"', {
762 # TODO(ajwong): These files are also copied in: 762 # TODO(ajwong): These files are also copied in:
763 # webkit/tools/test_shell/test_shell.gypi and 763 # webkit/tools/test_shell/test_shell.gypi and
764 # chrome/chrome.gyp 764 # chrome/chrome.gyp
(...skipping 14 matching lines...) Expand all
779 ], 779 ],
780 }, 780 },
781 ], 781 ],
782 } 782 }
783 783
784 # Local Variables: 784 # Local Variables:
785 # tab-width:2 785 # tab-width:2
786 # indent-tabs-mode:nil 786 # indent-tabs-mode:nil
787 # End: 787 # End:
788 # vim: set expandtab tabstop=2 shiftwidth=2: 788 # 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