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 'variables': { | 6 'variables': { |
7 'conditions': [ | 7 'conditions': [ |
8 ['sysroot!=""', { | 8 ['sysroot!=""', { |
9 'pkg-config': '<(chroot_cmd) ./pkg-config-wrapper "<(sysroot)" "<(target
_arch)" "<(system_libdir)"', | 9 'pkg-config': '<(chroot_cmd) ./pkg-config-wrapper "<(sysroot)" "<(target
_arch)" "<(system_libdir)"', |
10 }, { | 10 }, { |
11 'pkg-config': 'pkg-config', | 11 'pkg-config': 'pkg-config', |
12 }], | 12 }], |
13 ], | 13 ], |
14 | 14 |
15 # If any of the linux_link_FOO below are set to 1, then the corresponding | 15 # If any of the linux_link_FOO below are set to 1, then the corresponding |
16 # target will be linked against the FOO library (either dynamically or | 16 # target will be linked against the FOO library (either dynamically or |
17 # statically, depending on the pkg-config files), as opposed to loading the | 17 # statically, depending on the pkg-config files), as opposed to loading the |
18 # FOO library dynamically with dlopen. | 18 # FOO library dynamically with dlopen. |
19 'linux_link_libgps%': 0, | 19 'linux_link_libgps%': 0, |
20 'linux_link_libpci%': 0, | 20 'linux_link_libpci%': 0, |
21 'linux_link_libspeechd%': 0, | 21 'linux_link_libspeechd%': 0, |
22 'linux_link_libbrlapi%': 0, | 22 'linux_link_libbrlapi%': 0, |
| 23 |
| 24 # Used below for the various libraries. In this scope for sharing with GN. |
| 25 'libbrlapi_functions': [ |
| 26 'brlapi_getHandleSize', |
| 27 'brlapi_error_location', |
| 28 'brlapi_strerror', |
| 29 'brlapi__acceptKeys', |
| 30 'brlapi__openConnection', |
| 31 'brlapi__closeConnection', |
| 32 'brlapi__getDisplaySize', |
| 33 'brlapi__enterTtyModeWithPath', |
| 34 'brlapi__leaveTtyMode', |
| 35 'brlapi__writeDots', |
| 36 'brlapi__readKey', |
| 37 ], |
| 38 'libgio_functions': [ |
| 39 'g_settings_new', |
| 40 'g_settings_get_child', |
| 41 'g_settings_get_string', |
| 42 'g_settings_get_boolean', |
| 43 'g_settings_get_int', |
| 44 'g_settings_get_strv', |
| 45 'g_settings_list_schemas', |
| 46 ], |
| 47 'libpci_functions': [ |
| 48 'pci_alloc', |
| 49 'pci_init', |
| 50 'pci_cleanup', |
| 51 'pci_scan_bus', |
| 52 'pci_fill_info', |
| 53 'pci_lookup_name', |
| 54 ], |
| 55 'libudev_functions': [ |
| 56 'udev_device_get_action', |
| 57 'udev_device_get_devnode', |
| 58 'udev_device_get_parent', |
| 59 'udev_device_get_parent_with_subsystem_devtype', |
| 60 'udev_device_get_property_value', |
| 61 'udev_device_get_subsystem', |
| 62 'udev_device_get_sysattr_value', |
| 63 'udev_device_get_sysname', |
| 64 'udev_device_get_syspath', |
| 65 'udev_device_new_from_devnum', |
| 66 'udev_device_new_from_syspath', |
| 67 'udev_device_unref', |
| 68 'udev_enumerate_add_match_subsystem', |
| 69 'udev_enumerate_get_list_entry', |
| 70 'udev_enumerate_new', |
| 71 'udev_enumerate_scan_devices', |
| 72 'udev_enumerate_unref', |
| 73 'udev_list_entry_get_next', |
| 74 'udev_list_entry_get_name', |
| 75 'udev_monitor_enable_receiving', |
| 76 'udev_monitor_filter_add_match_subsystem_devtype', |
| 77 'udev_monitor_get_fd', |
| 78 'udev_monitor_new_from_netlink', |
| 79 'udev_monitor_receive_device', |
| 80 'udev_monitor_unref', |
| 81 'udev_new', |
| 82 'udev_set_log_fn', |
| 83 'udev_set_log_priority', |
| 84 'udev_unref', |
| 85 ], |
23 }, | 86 }, |
24 'conditions': [ | 87 'conditions': [ |
25 [ 'chromeos==0 and use_ozone==0', { | 88 [ 'chromeos==0 and use_ozone==0', { |
26 # Hide GTK and related dependencies for Chrome OS and Ozone, so they won't
get | 89 # Hide GTK and related dependencies for Chrome OS and Ozone, so they won't
get |
27 # added back to Chrome OS and Ozone. Don't try to use GTK on Chrome OS and
Ozone. | 90 # added back to Chrome OS and Ozone. Don't try to use GTK on Chrome OS and
Ozone. |
28 'targets': [ | 91 'targets': [ |
29 { | 92 { |
30 'target_name': 'gdk', | 93 'target_name': 'gdk', |
31 'type': 'none', | 94 'type': 'none', |
32 'conditions': [ | 95 'conditions': [ |
(...skipping 405 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
438 '<!@(<(pkg-config) --libs-only-l libdrm)', | 501 '<!@(<(pkg-config) --libs-only-l libdrm)', |
439 ], | 502 ], |
440 }, | 503 }, |
441 }, | 504 }, |
442 ], | 505 ], |
443 }], | 506 }], |
444 ['use_udev==1', { | 507 ['use_udev==1', { |
445 'targets': [ | 508 'targets': [ |
446 { | 509 { |
447 'target_name': 'udev', | 510 'target_name': 'udev', |
448 'type': 'none', | 511 'type': 'static_library', |
449 'conditions': [ | 512 'conditions': [ |
450 ['_toolset=="target"', { | 513 ['_toolset=="target"', { |
451 'direct_dependent_settings': { | 514 'include_dirs': [ |
452 'cflags': [ | 515 '../..', |
453 '<!@(<(pkg-config) --cflags libudev)' | 516 ], |
454 ], | 517 'hard_dependency': 1, |
455 }, | 518 'actions': [ |
456 'link_settings': { | 519 { |
457 'ldflags': [ | 520 'variables': { |
458 '<!@(<(pkg-config) --libs-only-L --libs-only-other libudev)', | 521 'output_h': '<(SHARED_INTERMEDIATE_DIR)/library_loaders/libu
dev0.h', |
459 ], | 522 'output_cc': '<(INTERMEDIATE_DIR)/libudev0_loader.cc', |
460 'libraries': [ | 523 'generator': '../../tools/generate_library_loader/generate_l
ibrary_loader.py', |
461 '<!@(<(pkg-config) --libs-only-l libudev)', | 524 }, |
462 ], | 525 'action_name': 'generate_libudev0_loader', |
463 }, | 526 'inputs': [ |
| 527 '<(generator)', |
| 528 ], |
| 529 'outputs': [ |
| 530 '<(output_h)', |
| 531 '<(output_cc)', |
| 532 ], |
| 533 'action': ['python', |
| 534 '<(generator)', |
| 535 '--name', 'LibUdev0Loader', |
| 536 '--output-h', '<(output_h)', |
| 537 '--output-cc', '<(output_cc)', |
| 538 '--header', '"third_party/libudev/libudev0.h"', |
| 539 '--link-directly=0', |
| 540 '<@(libudev_functions)', |
| 541 ], |
| 542 'message': 'Generating libudev0 library loader', |
| 543 'process_outputs_as_sources': 1, |
| 544 }, |
| 545 { |
| 546 'variables': { |
| 547 'output_h': '<(SHARED_INTERMEDIATE_DIR)/library_loaders/libu
dev1.h', |
| 548 'output_cc': '<(INTERMEDIATE_DIR)/libudev1_loader.cc', |
| 549 'generator': '../../tools/generate_library_loader/generate_l
ibrary_loader.py', |
| 550 }, |
| 551 'action_name': 'generate_libudev1_loader', |
| 552 'inputs': [ |
| 553 '<(generator)', |
| 554 ], |
| 555 'outputs': [ |
| 556 '<(output_h)', |
| 557 '<(output_cc)', |
| 558 ], |
| 559 'action': ['python', |
| 560 '<(generator)', |
| 561 '--name', 'LibUdev1Loader', |
| 562 '--output-h', '<(output_h)', |
| 563 '--output-cc', '<(output_cc)', |
| 564 '--header', '"third_party/libudev/libudev1.h"', |
| 565 '--link-directly=0', |
| 566 '<@(libudev_functions)', |
| 567 ], |
| 568 'message': 'Generating libudev1 library loader', |
| 569 'process_outputs_as_sources': 1, |
| 570 }, |
| 571 ], |
464 }], | 572 }], |
465 ], | 573 ], |
466 }, | 574 }, |
467 ], | 575 ], |
468 }], | 576 }], |
469 ['use_libpci==1', { | 577 ['use_libpci==1', { |
470 'targets': [ | 578 'targets': [ |
471 { | 579 { |
472 'target_name': 'libpci', | 580 'target_name': 'libpci', |
473 'type': 'static_library', | 581 'type': 'static_library', |
(...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
513 'action': ['python', | 621 'action': ['python', |
514 '<(generator)', | 622 '<(generator)', |
515 '--name', 'LibPciLoader', | 623 '--name', 'LibPciLoader', |
516 '--output-h', '<(output_h)', | 624 '--output-h', '<(output_h)', |
517 '--output-cc', '<(output_cc)', | 625 '--output-cc', '<(output_cc)', |
518 '--header', '<pci/pci.h>', | 626 '--header', '<pci/pci.h>', |
519 # TODO(phajdan.jr): Report problem to pciutils project | 627 # TODO(phajdan.jr): Report problem to pciutils project |
520 # and get it fixed so that we don't need --use-extern-c
. | 628 # and get it fixed so that we don't need --use-extern-c
. |
521 '--use-extern-c', | 629 '--use-extern-c', |
522 '--link-directly=<(linux_link_libpci)', | 630 '--link-directly=<(linux_link_libpci)', |
523 'pci_alloc', | 631 '<@(libpci_functions)', |
524 'pci_init', | |
525 'pci_cleanup', | |
526 'pci_scan_bus', | |
527 'pci_fill_info', | |
528 'pci_lookup_name', | |
529 ], | 632 ], |
530 'message': 'Generating libpci library loader', | 633 'message': 'Generating libpci library loader', |
531 'process_outputs_as_sources': 1, | 634 'process_outputs_as_sources': 1, |
532 }, | 635 }, |
533 ], | 636 ], |
534 }, | 637 }, |
535 ], | 638 ], |
536 }], | 639 }], |
537 ], # conditions | 640 ], # conditions |
538 'targets': [ | 641 'targets': [ |
(...skipping 160 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
699 '<(output_h)', | 802 '<(output_h)', |
700 '<(output_cc)', | 803 '<(output_cc)', |
701 ], | 804 ], |
702 'action': ['python', | 805 'action': ['python', |
703 '<(generator)', | 806 '<(generator)', |
704 '--name', 'LibGioLoader', | 807 '--name', 'LibGioLoader', |
705 '--output-h', '<(output_h)', | 808 '--output-h', '<(output_h)', |
706 '--output-cc', '<(output_cc)', | 809 '--output-cc', '<(output_cc)', |
707 '--header', '<gio/gio.h>', | 810 '--header', '<gio/gio.h>', |
708 '--link-directly=<(linux_link_gsettings)', | 811 '--link-directly=<(linux_link_gsettings)', |
709 'g_settings_new', | 812 '<@(libgio_functions)', |
710 'g_settings_get_child', | |
711 'g_settings_get_string', | |
712 'g_settings_get_boolean', | |
713 'g_settings_get_int', | |
714 'g_settings_get_strv', | |
715 'g_settings_list_schemas', | |
716 ], | 813 ], |
717 'message': 'Generating libgio library loader', | 814 'message': 'Generating libgio library loader', |
718 'process_outputs_as_sources': 1, | 815 'process_outputs_as_sources': 1, |
719 }, | 816 }, |
720 ], | 817 ], |
721 }], | 818 }], |
722 ], | 819 ], |
723 }, | 820 }, |
724 { | 821 { |
725 'target_name': 'glib', | 822 'target_name': 'glib', |
(...skipping 149 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
875 '<(output_h)', | 972 '<(output_h)', |
876 '<(output_cc)', | 973 '<(output_cc)', |
877 ], | 974 ], |
878 'action': ['python', | 975 'action': ['python', |
879 '<(generator)', | 976 '<(generator)', |
880 '--name', 'LibBrlapiLoader', | 977 '--name', 'LibBrlapiLoader', |
881 '--output-h', '<(output_h)', | 978 '--output-h', '<(output_h)', |
882 '--output-cc', '<(output_cc)', | 979 '--output-cc', '<(output_cc)', |
883 '--header', '<brlapi.h>', | 980 '--header', '<brlapi.h>', |
884 '--link-directly=<(linux_link_libbrlapi)', | 981 '--link-directly=<(linux_link_libbrlapi)', |
885 'brlapi_getHandleSize', | 982 '<@(libbrlapi_functions)', |
886 'brlapi_error_location', | |
887 'brlapi_strerror', | |
888 'brlapi__acceptKeys', | |
889 'brlapi__openConnection', | |
890 'brlapi__closeConnection', | |
891 'brlapi__getDisplaySize', | |
892 'brlapi__enterTtyModeWithPath', | |
893 'brlapi__leaveTtyMode', | |
894 'brlapi__writeDots', | |
895 'brlapi__readKey', | |
896 ], | 983 ], |
897 'message': 'Generating libbrlapi library loader', | 984 'message': 'Generating libbrlapi library loader', |
898 'process_outputs_as_sources': 1, | 985 'process_outputs_as_sources': 1, |
899 }, | 986 }, |
900 ], | 987 ], |
901 }, | 988 }, |
902 { | 989 { |
903 'target_name': 'libcap', | 990 'target_name': 'libcap', |
904 'type': 'none', | 991 'type': 'none', |
905 'link_settings': { | 992 'link_settings': { |
(...skipping 169 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1075 '-Wno-header-guard', | 1162 '-Wno-header-guard', |
1076 ], | 1163 ], |
1077 }, | 1164 }, |
1078 }], | 1165 }], |
1079 ] | 1166 ] |
1080 }], | 1167 }], |
1081 ], | 1168 ], |
1082 }, | 1169 }, |
1083 ], | 1170 ], |
1084 } | 1171 } |
OLD | NEW |