blob: b88f54184c8596d0fb455c4d89e1f02e1d93e53c [file] [log] [blame]
Dan Willemsenf51bf922016-07-12 22:29:13 -07001// Copyright 2006 The Android Open Source Project
2
Bob Badourd7984cc2021-02-12 20:51:13 -08003package {
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
21license {
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 Venkatraman2ca3ee02017-04-04 14:25:43 -070033cc_library_headers {
34 name: "libhardware_headers",
Steven Morelandd783cab2019-01-14 17:40:45 -080035
Steven Morelandd2487902017-04-17 16:56:41 -070036 header_libs: [
37 "libaudio_system_headers",
38 "libsystem_headers",
Jiyong Park9bd43bd2017-06-26 13:28:51 +090039 "libcutils_headers",
Steven Morelandd2487902017-04-17 16:56:41 -070040 ],
41 export_header_lib_headers: [
42 "libaudio_system_headers",
Jiyong Park9bd43bd2017-06-26 13:28:51 +090043 "libsystem_headers",
44 "libcutils_headers",
Steven Morelandd2487902017-04-17 16:56:41 -070045 ],
Steven Morelandd3933522017-04-13 19:14:57 -070046
Jerry Zhang551e1f72018-06-20 17:04:52 -070047 recovery_available: true,
Dan Willemsen5466d2e2017-04-07 14:15:17 -070048 vendor_available: true,
Victor Khimenkoe22d90c2020-06-30 22:54:24 +020049 // TODO(b/153609531): remove when no longer needed.
50 native_bridge_supported: true,
Steven Morelandd783cab2019-01-14 17:40:45 -080051
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 Zhang551e1f72018-06-20 17:04:52 -070063 target: {
64 recovery: {
65 exclude_header_libs: [
66 "libaudio_system_headers",
Jerry Zhang551e1f72018-06-20 17:04:52 -070067 ],
68 },
Oystein Eftevaag2007fd12023-02-01 23:53:41 +000069 windows: {
70 enabled: true,
71 },
Steven Morelandd783cab2019-01-14 17:40:45 -080072 vendor: {
73 override_export_include_dirs: [
74 "include_all",
75 "include_vendor",
76 ],
77 },
Jerry Zhang551e1f72018-06-20 17:04:52 -070078 },
Roopa Sattirajuda4e70b2021-12-22 18:05:30 -080079 apex_available: [
80 "//apex_available:platform",
Yichun Lif8028b32023-05-19 00:33:13 +000081 "com.android.btservices",
Mikhail Naganovc7bb2112023-04-28 15:47:54 -070082 "com.android.media",
Ray Essick0a0dd5f2022-02-09 10:14:29 -080083 "com.android.media.swcodec",
Roopa Sattirajuda4e70b2021-12-22 18:05:30 -080084 ],
Jooyung Hanb1e43a92020-04-16 18:48:32 +090085 min_sdk_version: "29",
A. Cody Schuffelene8ee2fc2020-04-29 14:46:38 -070086 host_supported: true,
Jerry Zhang551e1f72018-06-20 17:04:52 -070087
Vijay Venkatraman2ca3ee02017-04-04 14:25:43 -070088}
89
Dan Willemsenf51bf922016-07-12 22:29:13 -070090cc_library_shared {
91 name: "libhardware",
92
93 srcs: ["hardware.c"],
94 shared_libs: [
Jooyung Han40fa6e12023-09-26 14:51:44 +090095 "libapexsupport",
Dan Willemsenf51bf922016-07-12 22:29:13 -070096 "libcutils",
97 "liblog",
Jiyong Park375f1a42017-05-11 02:15:07 +090098 "libvndksupport",
Dan Willemsenf51bf922016-07-12 22:29:13 -070099 ],
Chih-Hung Hsieh23594232017-09-29 15:41:15 -0700100 cflags: [
101 "-DQEMU_HARDWARE",
102 "-Wall",
103 "-Werror",
104 ],
Steven Morelandd3933522017-04-13 19:14:57 -0700105
106 header_libs: ["libhardware_headers"],
107 export_header_lib_headers: ["libhardware_headers"],
108
Devin Moore690e02a2022-11-14 19:13:56 +0000109 host_supported: true,
Jerry Zhang551e1f72018-06-20 17:04:52 -0700110 recovery_available: true,
Dan Willemsen5466d2e2017-04-07 14:15:17 -0700111 vendor_available: true,
Kiyoung Kimf56411b2024-03-11 13:04:37 +0900112 double_loadable: true,
Jerry Zhang551e1f72018-06-20 17:04:52 -0700113 target: {
Devin Moore690e02a2022-11-14 19:13:56 +0000114 host: {
Jooyung Han40fa6e12023-09-26 14:51:44 +0900115 exclude_shared_libs: [
116 "libapexsupport",
117 "libvndksupport",
118 ],
Devin Moore690e02a2022-11-14 19:13:56 +0000119 },
Jerry Zhang551e1f72018-06-20 17:04:52 -0700120 recovery: {
Jooyung Han40fa6e12023-09-26 14:51:44 +0900121 exclude_shared_libs: [
122 "libapexsupport",
123 "libvndksupport",
124 ],
Jerry Zhang551e1f72018-06-20 17:04:52 -0700125 },
Jooyung Hanef6e9822023-11-28 22:37:39 +0900126 non_apex: {
127 exclude_shared_libs: [
128 "libapexsupport",
129 ],
130 },
Jerry Zhang551e1f72018-06-20 17:04:52 -0700131 },
Jooyung Hanb1e43a92020-04-16 18:48:32 +0900132 min_sdk_version: "29",
Dan Willemsenf51bf922016-07-12 22:29:13 -0700133}