Mathias Agopian | 89ed4c8 | 2017-02-09 18:48:34 -0800 | [diff] [blame] | 1 | // Copyright (C) 2017 The Android Open Source Project |
| 2 | // |
| 3 | // Licensed under the Apache License, Version 2.0 (the "License"); |
| 4 | // you may not use this file except in compliance with the License. |
| 5 | // You may obtain a copy of the License at |
| 6 | // |
| 7 | // http://www.apache.org/licenses/LICENSE-2.0 |
| 8 | // |
| 9 | // Unless required by applicable law or agreed to in writing, software |
| 10 | // distributed under the License is distributed on an "AS IS" BASIS, |
| 11 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
| 12 | // See the License for the specific language governing permissions and |
| 13 | // limitations under the License. |
| 14 | |
Bob Badour | 3c53823 | 2021-02-12 21:26:48 -0800 | [diff] [blame] | 15 | package { |
| 16 | default_applicable_licenses: [ |
| 17 | "frameworks_native_libs_nativewindow_license", |
| 18 | ], |
John Reck | 38bc8a8 | 2024-02-21 17:08:27 -0500 | [diff] [blame^] | 19 | default_team: "trendy_team_android_core_graphics_stack", |
Bob Badour | 3c53823 | 2021-02-12 21:26:48 -0800 | [diff] [blame] | 20 | } |
| 21 | |
| 22 | // Added automatically by a large-scale-change |
| 23 | // See: http://go/android-license-faq |
| 24 | license { |
| 25 | name: "frameworks_native_libs_nativewindow_license", |
| 26 | visibility: [":__subpackages__"], |
| 27 | license_kinds: [ |
| 28 | "SPDX-license-identifier-Apache-2.0", |
| 29 | ], |
| 30 | license_text: [ |
| 31 | "NOTICE", |
| 32 | ], |
| 33 | } |
| 34 | |
Mathias Agopian | 89ed4c8 | 2017-02-09 18:48:34 -0800 | [diff] [blame] | 35 | ndk_headers { |
Fan Xu | b2b9dd7 | 2018-10-26 15:24:11 -0700 | [diff] [blame] | 36 | name: "libnativewindow_ndk_headers", |
Mathias Agopian | 89ed4c8 | 2017-02-09 18:48:34 -0800 | [diff] [blame] | 37 | from: "include/android", |
| 38 | to: "android", |
| 39 | srcs: ["include/android/*.h"], |
| 40 | license: "NOTICE", |
| 41 | } |
| 42 | |
Fan Xu | b2b9dd7 | 2018-10-26 15:24:11 -0700 | [diff] [blame] | 43 | // TODO(b/118715870): cleanup header files |
| 44 | cc_library_headers { |
| 45 | name: "libnativewindow_headers", |
| 46 | export_include_dirs: ["include"], |
Pawin Vongmasa | e672cd0 | 2019-02-14 16:01:29 -0800 | [diff] [blame] | 47 | vendor_available: true, |
Victor Khimenko | b7322fc | 2020-06-16 01:01:15 +0200 | [diff] [blame] | 48 | // TODO(b/153609531): remove when no longer needed. |
| 49 | native_bridge_supported: true, |
Jooyung Han | a395c8d | 2020-04-16 18:48:32 +0900 | [diff] [blame] | 50 | min_sdk_version: "29", |
Ray Essick | eed53a0 | 2022-02-09 09:40:20 -0800 | [diff] [blame] | 51 | apex_available: [ |
| 52 | "//apex_available:platform", |
| 53 | "com.android.media.swcodec", |
| 54 | "test_com.android.media.swcodec", |
| 55 | ], |
Leon Scroggins III | c1f093f | 2021-01-08 14:25:31 -0500 | [diff] [blame] | 56 | host_supported: true, |
Fan Xu | b2b9dd7 | 2018-10-26 15:24:11 -0700 | [diff] [blame] | 57 | } |
| 58 | |
Mathias Agopian | 4a67a5f | 2017-02-28 17:00:29 -0800 | [diff] [blame] | 59 | ndk_library { |
Steven Moreland | 8644409 | 2017-04-10 12:56:54 -0700 | [diff] [blame] | 60 | name: "libnativewindow", |
Mathias Agopian | 4a67a5f | 2017-02-28 17:00:29 -0800 | [diff] [blame] | 61 | symbol_file: "libnativewindow.map.txt", |
| 62 | |
| 63 | // Android O |
| 64 | first_version: "26", |
Spandan Das | 0bddf15 | 2022-09-08 21:44:10 +0000 | [diff] [blame] | 65 | export_header_libs: [ |
| 66 | "libnativewindow_ndk_headers", |
| 67 | ], |
Mathias Agopian | 4a67a5f | 2017-02-28 17:00:29 -0800 | [diff] [blame] | 68 | } |
| 69 | |
Mathias Agopian | 89ed4c8 | 2017-02-09 18:48:34 -0800 | [diff] [blame] | 70 | cc_library { |
| 71 | name: "libnativewindow", |
Colin Cross | 0394364 | 2021-04-21 16:47:25 -0700 | [diff] [blame] | 72 | llndk: { |
| 73 | symbol_file: "libnativewindow.map.txt", |
| 74 | unversioned: true, |
| 75 | override_export_include_dirs: [ |
Ray Essick | eed53a0 | 2022-02-09 09:40:20 -0800 | [diff] [blame] | 76 | "include", |
Colin Cross | 0394364 | 2021-04-21 16:47:25 -0700 | [diff] [blame] | 77 | ], |
Spandan Das | 0bb757a | 2022-10-25 00:50:08 +0000 | [diff] [blame] | 78 | export_llndk_headers: [ |
| 79 | "libarect_headers", |
| 80 | ], |
Colin Cross | 0394364 | 2021-04-21 16:47:25 -0700 | [diff] [blame] | 81 | }, |
Justin Yun | ab66edc | 2017-11-28 16:54:21 +0900 | [diff] [blame] | 82 | export_include_dirs: [ |
| 83 | "include", |
| 84 | "include-private", |
| 85 | ], |
Mathias Agopian | 89ed4c8 | 2017-02-09 18:48:34 -0800 | [diff] [blame] | 86 | |
Chih-Hung Hsieh | 6e36725 | 2017-10-05 14:23:38 -0700 | [diff] [blame] | 87 | cflags: [ |
| 88 | "-Wall", |
| 89 | "-Werror", |
Krzysztof KosiĆski | 7a2bcc5 | 2018-11-09 20:25:52 -0800 | [diff] [blame] | 90 | "-Wno-enum-compare", |
Chih-Hung Hsieh | 6e36725 | 2017-10-05 14:23:38 -0700 | [diff] [blame] | 91 | "-Wno-unused-function", |
| 92 | ], |
| 93 | |
dimitry | b9fdddb | 2017-11-21 18:24:36 +0100 | [diff] [blame] | 94 | version_script: "libnativewindow.map.txt", |
| 95 | |
Mathias Agopian | 89ed4c8 | 2017-02-09 18:48:34 -0800 | [diff] [blame] | 96 | srcs: [ |
| 97 | "AHardwareBuffer.cpp", |
| 98 | "ANativeWindow.cpp", |
| 99 | ], |
| 100 | |
| 101 | shared_libs: [ |
Mathias Agopian | 89ed4c8 | 2017-02-09 18:48:34 -0800 | [diff] [blame] | 102 | "libcutils", |
| 103 | "liblog", |
| 104 | "libutils", |
| 105 | "libui", |
John Reck | 5c404f8 | 2022-08-24 10:50:10 -0400 | [diff] [blame] | 106 | "libbinder", |
| 107 | "libbinder_ndk", |
Craig Donner | e6ecb92 | 2017-12-27 14:59:29 -0800 | [diff] [blame] | 108 | "android.hardware.graphics.common@1.1", |
Mathias Agopian | 89ed4c8 | 2017-02-09 18:48:34 -0800 | [diff] [blame] | 109 | ], |
| 110 | |
| 111 | static_libs: [ |
| 112 | "libarect", |
Jesse Hall | 7992781 | 2017-03-23 11:03:23 -0700 | [diff] [blame] | 113 | "libgrallocusage", |
Sungtak Lee | 4b3e4a9 | 2022-11-01 23:39:37 +0000 | [diff] [blame] | 114 | "libgui_aidl_static", |
Mathias Agopian | 89ed4c8 | 2017-02-09 18:48:34 -0800 | [diff] [blame] | 115 | ], |
| 116 | |
Mathias Agopian | 6a3c05b | 2017-04-27 20:06:55 -0700 | [diff] [blame] | 117 | header_libs: [ |
Sungtak Lee | 4b3e4a9 | 2022-11-01 23:39:37 +0000 | [diff] [blame] | 118 | "libgui_headers", |
Spandan Das | 0bb757a | 2022-10-25 00:50:08 +0000 | [diff] [blame] | 119 | "libarect_headers", |
Mathias Agopian | 6a3c05b | 2017-04-27 20:06:55 -0700 | [diff] [blame] | 120 | "libnativebase_headers", |
Fan Xu | b2b9dd7 | 2018-10-26 15:24:11 -0700 | [diff] [blame] | 121 | "libnativewindow_headers", |
Mathias Agopian | 6a3c05b | 2017-04-27 20:06:55 -0700 | [diff] [blame] | 122 | ], |
| 123 | |
Mathias Agopian | 89ed4c8 | 2017-02-09 18:48:34 -0800 | [diff] [blame] | 124 | // headers we include in our public headers |
Mathias Agopian | 6a3c05b | 2017-04-27 20:06:55 -0700 | [diff] [blame] | 125 | export_header_lib_headers: [ |
Spandan Das | 0bb757a | 2022-10-25 00:50:08 +0000 | [diff] [blame] | 126 | "libarect_headers", |
Mathias Agopian | 6a3c05b | 2017-04-27 20:06:55 -0700 | [diff] [blame] | 127 | "libnativebase_headers", |
| 128 | ], |
Przemyslaw Szczepaniak | 7864fbc | 2019-11-14 16:05:43 +0000 | [diff] [blame] | 129 | |
| 130 | stubs: { |
| 131 | symbol_file: "libnativewindow.map.txt", |
| 132 | versions: ["29"], |
| 133 | }, |
Mathias Agopian | 89ed4c8 | 2017-02-09 18:48:34 -0800 | [diff] [blame] | 134 | } |
Craig Donner | a5a719e | 2017-02-24 16:02:08 -0800 | [diff] [blame] | 135 | |
| 136 | subdirs = ["tests"] |