Dan Willemsen | f51bf92 | 2016-07-12 22:29:13 -0700 | [diff] [blame] | 1 | // Copyright 2006 The Android Open Source Project |
| 2 | |
Bob Badour | d7984cc | 2021-02-12 20:51:13 -0800 | [diff] [blame] | 3 | package { |
| 4 | default_applicable_licenses: ["hardware_libhardware_license"], |
| 5 | } |
| 6 | |
| 7 | // Added automatically by a large-scale-change that took the approach of |
| 8 | // 'apply every license found to every target'. While this makes sure we respect |
| 9 | // every license restriction, it may not be entirely correct. |
| 10 | // |
| 11 | // e.g. GPL in an MIT project might only apply to the contrib/ directory. |
| 12 | // |
| 13 | // Please consider splitting the single license below into multiple licenses, |
| 14 | // taking care not to lose any license_kind information, and overriding the |
| 15 | // default license using the 'licenses: [...]' property on targets as needed. |
| 16 | // |
| 17 | // For unused files, consider creating a 'fileGroup' with "//visibility:private" |
| 18 | // to attach the license to, and including a comment whether the files may be |
| 19 | // used in the current project. |
| 20 | // See: http://go/android-license-faq |
| 21 | license { |
| 22 | name: "hardware_libhardware_license", |
| 23 | visibility: [":__subpackages__"], |
| 24 | license_kinds: [ |
| 25 | "SPDX-license-identifier-Apache-2.0", |
| 26 | "SPDX-license-identifier-BSD", |
| 27 | ], |
| 28 | license_text: [ |
| 29 | "NOTICE", |
| 30 | ], |
| 31 | } |
| 32 | |
Vijay Venkatraman | 2ca3ee0 | 2017-04-04 14:25:43 -0700 | [diff] [blame] | 33 | cc_library_headers { |
| 34 | name: "libhardware_headers", |
Steven Moreland | d783cab | 2019-01-14 17:40:45 -0800 | [diff] [blame] | 35 | |
Steven Moreland | d248790 | 2017-04-17 16:56:41 -0700 | [diff] [blame] | 36 | header_libs: [ |
| 37 | "libaudio_system_headers", |
| 38 | "libsystem_headers", |
Jiyong Park | 9bd43bd | 2017-06-26 13:28:51 +0900 | [diff] [blame] | 39 | "libcutils_headers", |
Steven Moreland | d248790 | 2017-04-17 16:56:41 -0700 | [diff] [blame] | 40 | ], |
| 41 | export_header_lib_headers: [ |
| 42 | "libaudio_system_headers", |
Jiyong Park | 9bd43bd | 2017-06-26 13:28:51 +0900 | [diff] [blame] | 43 | "libsystem_headers", |
| 44 | "libcutils_headers", |
Steven Moreland | d248790 | 2017-04-17 16:56:41 -0700 | [diff] [blame] | 45 | ], |
Steven Moreland | d393352 | 2017-04-13 19:14:57 -0700 | [diff] [blame] | 46 | |
Jerry Zhang | 551e1f7 | 2018-06-20 17:04:52 -0700 | [diff] [blame] | 47 | recovery_available: true, |
Dan Willemsen | 5466d2e | 2017-04-07 14:15:17 -0700 | [diff] [blame] | 48 | vendor_available: true, |
Victor Khimenko | e22d90c | 2020-06-30 22:54:24 +0200 | [diff] [blame] | 49 | // TODO(b/153609531): remove when no longer needed. |
| 50 | native_bridge_supported: true, |
Steven Moreland | d783cab | 2019-01-14 17:40:45 -0800 | [diff] [blame] | 51 | |
| 52 | // There are three include directories currently: |
| 53 | // - include: this directory is the original location of libhardware headers. It is globally |
| 54 | // available (even if you do not depend on libhardware). Many locations also use |
| 55 | // LOCAL_C_INCLUDES or include_dirs to access these from a global namespace. These processes |
| 56 | // should replace this dependency with a direct dependency on libhardware(_headers)?. |
| 57 | // - include_all: this directory is for system and vendor include files. Gradually, the number of |
| 58 | // files here should be reduced to 0 by moving them to vendor as old code is phased out. |
| 59 | // - include_vendor: this directory is the current designated resting place for these headers. |
| 60 | // They are kept around to try to help insure existing codebases can function. |
| 61 | export_include_dirs: ["include_all"], |
| 62 | |
Jerry Zhang | 551e1f7 | 2018-06-20 17:04:52 -0700 | [diff] [blame] | 63 | target: { |
| 64 | recovery: { |
| 65 | exclude_header_libs: [ |
| 66 | "libaudio_system_headers", |
Jerry Zhang | 551e1f7 | 2018-06-20 17:04:52 -0700 | [diff] [blame] | 67 | ], |
| 68 | }, |
Oystein Eftevaag | 2007fd1 | 2023-02-01 23:53:41 +0000 | [diff] [blame] | 69 | windows: { |
| 70 | enabled: true, |
| 71 | }, |
Steven Moreland | d783cab | 2019-01-14 17:40:45 -0800 | [diff] [blame] | 72 | vendor: { |
| 73 | override_export_include_dirs: [ |
| 74 | "include_all", |
| 75 | "include_vendor", |
| 76 | ], |
| 77 | }, |
Jerry Zhang | 551e1f7 | 2018-06-20 17:04:52 -0700 | [diff] [blame] | 78 | }, |
Roopa Sattiraju | da4e70b | 2021-12-22 18:05:30 -0800 | [diff] [blame] | 79 | apex_available: [ |
| 80 | "//apex_available:platform", |
Yichun Li | f8028b3 | 2023-05-19 00:33:13 +0000 | [diff] [blame] | 81 | "com.android.btservices", |
Mikhail Naganov | c7bb211 | 2023-04-28 15:47:54 -0700 | [diff] [blame] | 82 | "com.android.media", |
Ray Essick | 0a0dd5f | 2022-02-09 10:14:29 -0800 | [diff] [blame] | 83 | "com.android.media.swcodec", |
Roopa Sattiraju | da4e70b | 2021-12-22 18:05:30 -0800 | [diff] [blame] | 84 | ], |
Jooyung Han | b1e43a9 | 2020-04-16 18:48:32 +0900 | [diff] [blame] | 85 | min_sdk_version: "29", |
A. Cody Schuffelen | e8ee2fc | 2020-04-29 14:46:38 -0700 | [diff] [blame] | 86 | host_supported: true, |
Jerry Zhang | 551e1f7 | 2018-06-20 17:04:52 -0700 | [diff] [blame] | 87 | |
Vijay Venkatraman | 2ca3ee0 | 2017-04-04 14:25:43 -0700 | [diff] [blame] | 88 | } |
| 89 | |
Dan Willemsen | f51bf92 | 2016-07-12 22:29:13 -0700 | [diff] [blame] | 90 | cc_library_shared { |
| 91 | name: "libhardware", |
| 92 | |
| 93 | srcs: ["hardware.c"], |
| 94 | shared_libs: [ |
| 95 | "libcutils", |
| 96 | "liblog", |
Jiyong Park | 375f1a4 | 2017-05-11 02:15:07 +0900 | [diff] [blame] | 97 | "libvndksupport", |
Dan Willemsen | f51bf92 | 2016-07-12 22:29:13 -0700 | [diff] [blame] | 98 | ], |
Chih-Hung Hsieh | 2359423 | 2017-09-29 15:41:15 -0700 | [diff] [blame] | 99 | cflags: [ |
| 100 | "-DQEMU_HARDWARE", |
| 101 | "-Wall", |
| 102 | "-Werror", |
| 103 | ], |
Steven Moreland | d393352 | 2017-04-13 19:14:57 -0700 | [diff] [blame] | 104 | |
| 105 | header_libs: ["libhardware_headers"], |
| 106 | export_header_lib_headers: ["libhardware_headers"], |
| 107 | |
Devin Moore | 690e02a | 2022-11-14 19:13:56 +0000 | [diff] [blame] | 108 | host_supported: true, |
Jerry Zhang | 551e1f7 | 2018-06-20 17:04:52 -0700 | [diff] [blame] | 109 | recovery_available: true, |
Dan Willemsen | 5466d2e | 2017-04-07 14:15:17 -0700 | [diff] [blame] | 110 | vendor_available: true, |
Justin Yun | d49aeee | 2017-07-24 15:19:45 +0900 | [diff] [blame] | 111 | vndk: { |
| 112 | enabled: true, |
| 113 | support_system_process: true, |
| 114 | }, |
Jerry Zhang | 551e1f7 | 2018-06-20 17:04:52 -0700 | [diff] [blame] | 115 | target: { |
Devin Moore | 690e02a | 2022-11-14 19:13:56 +0000 | [diff] [blame] | 116 | host: { |
| 117 | exclude_shared_libs: ["libvndksupport"], |
| 118 | }, |
Jerry Zhang | 551e1f7 | 2018-06-20 17:04:52 -0700 | [diff] [blame] | 119 | recovery: { |
| 120 | exclude_shared_libs: ["libvndksupport"], |
| 121 | }, |
| 122 | }, |
Jooyung Han | b1e43a9 | 2020-04-16 18:48:32 +0900 | [diff] [blame] | 123 | min_sdk_version: "29", |
Dan Willemsen | f51bf92 | 2016-07-12 22:29:13 -0700 | [diff] [blame] | 124 | } |