Dan Albert | d7973ba | 2016-09-14 12:35:50 -0700 | [diff] [blame] | 1 | // Copyright (C) 2016 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 | |
| 15 | // Headers module is in frameworks/av/Android.bp because modules are not allowed |
| 16 | // to refer to headers in parent directories and the headers live in |
| 17 | // frameworks/av/include. |
| 18 | |
Bob Badour | 56786ac | 2021-02-25 15:24:36 -0800 | [diff] [blame] | 19 | package { |
Ronish Kalia | b5dd44b | 2024-02-14 14:32:32 +0000 | [diff] [blame] | 20 | default_team: "trendy_team_camera_framework", |
Bob Badour | 56786ac | 2021-02-25 15:24:36 -0800 | [diff] [blame] | 21 | default_applicable_licenses: ["frameworks_av_camera_ndk_license"], |
| 22 | } |
| 23 | |
| 24 | // Added automatically by a large-scale-change that took the approach of |
| 25 | // 'apply every license found to every target'. While this makes sure we respect |
| 26 | // every license restriction, it may not be entirely correct. |
| 27 | // |
| 28 | // e.g. GPL in an MIT project might only apply to the contrib/ directory. |
| 29 | // |
| 30 | // Please consider splitting the single license below into multiple licenses, |
| 31 | // taking care not to lose any license_kind information, and overriding the |
| 32 | // default license using the 'licenses: [...]' property on targets as needed. |
| 33 | // |
| 34 | // For unused files, consider creating a 'fileGroup' with "//visibility:private" |
| 35 | // to attach the license to, and including a comment whether the files may be |
| 36 | // used in the current project. |
| 37 | // See: http://go/android-license-faq |
| 38 | license { |
| 39 | name: "frameworks_av_camera_ndk_license", |
| 40 | visibility: [":__subpackages__"], |
| 41 | license_kinds: [ |
| 42 | "SPDX-license-identifier-Apache-2.0", |
| 43 | "SPDX-license-identifier-MIT", |
| 44 | "SPDX-license-identifier-Unicode-DFS", |
| 45 | ], |
| 46 | license_text: [ |
| 47 | "NOTICE", |
| 48 | ], |
| 49 | } |
| 50 | |
Dan Albert | d7973ba | 2016-09-14 12:35:50 -0700 | [diff] [blame] | 51 | ndk_library { |
Dan Willemsen | 2c88559 | 2017-04-07 15:48:32 -0700 | [diff] [blame] | 52 | name: "libcamera2ndk", |
Dan Albert | d7973ba | 2016-09-14 12:35:50 -0700 | [diff] [blame] | 53 | symbol_file: "libcamera2ndk.map.txt", |
| 54 | first_version: "24", |
Dan Albert | 1714f2e | 2017-01-05 16:00:15 -0800 | [diff] [blame] | 55 | unversioned_until: "current", |
Dan Albert | d7973ba | 2016-09-14 12:35:50 -0700 | [diff] [blame] | 56 | } |
Colin Cross | 7e8d4ba | 2017-05-04 16:17:42 -0700 | [diff] [blame] | 57 | |
| 58 | ndk_headers { |
| 59 | name: "libcamera2ndk_headers", |
| 60 | from: "include/camera", |
| 61 | to: "camera", |
| 62 | srcs: ["include/camera/**/*.h"], |
| 63 | license: "NOTICE", |
| 64 | } |
Zachary Iqbal | 096ab36 | 2018-10-17 11:02:59 -0700 | [diff] [blame] | 65 | |
| 66 | cc_library_shared { |
dimitry | d7e265b | 2018-11-07 17:12:15 +0100 | [diff] [blame] | 67 | name: "libcamera2ndk", |
Zachary Iqbal | 096ab36 | 2018-10-17 11:02:59 -0700 | [diff] [blame] | 68 | srcs: [ |
Austin Borger | af8d5d4 | 2024-06-11 16:21:11 -0700 | [diff] [blame] | 69 | "NdkCameraCaptureSession.cpp", |
| 70 | "NdkCameraDevice.cpp", |
Zachary Iqbal | 096ab36 | 2018-10-17 11:02:59 -0700 | [diff] [blame] | 71 | "NdkCameraManager.cpp", |
| 72 | "NdkCameraMetadata.cpp", |
Zachary Iqbal | 096ab36 | 2018-10-17 11:02:59 -0700 | [diff] [blame] | 73 | "NdkCaptureRequest.cpp", |
Austin Borger | af8d5d4 | 2024-06-11 16:21:11 -0700 | [diff] [blame] | 74 | "impl/ACameraCaptureSession.cpp", |
| 75 | "impl/ACameraDevice.cpp", |
Zachary Iqbal | 096ab36 | 2018-10-17 11:02:59 -0700 | [diff] [blame] | 76 | "impl/ACameraManager.cpp", |
| 77 | "impl/ACameraMetadata.cpp", |
Zachary Iqbal | 096ab36 | 2018-10-17 11:02:59 -0700 | [diff] [blame] | 78 | ], |
| 79 | shared_libs: [ |
Jan Sebechlebsky | 952e3c4 | 2024-04-05 13:13:11 +0200 | [diff] [blame] | 80 | "android.companion.virtual.virtualdevice_aidl-cpp", |
Jayant Chowdhary | dcae796 | 2024-08-20 21:20:10 +0000 | [diff] [blame] | 81 | "android.hardware.common-V2-cpp", |
| 82 | "android.hardware.common.fmq-V1-cpp", |
Jyoti Bhayana | 1f9600b | 2024-10-29 20:25:32 -0700 | [diff] [blame] | 83 | "camera_platform_flags_c_lib", |
Austin Borger | 65e6464 | 2024-06-11 15:58:23 -0700 | [diff] [blame] | 84 | "framework-permission-aidl-cpp", |
Zachary Iqbal | 096ab36 | 2018-10-17 11:02:59 -0700 | [diff] [blame] | 85 | "libandroid_runtime", |
Austin Borger | af8d5d4 | 2024-06-11 16:21:11 -0700 | [diff] [blame] | 86 | "libbinder", |
Zachary Iqbal | 096ab36 | 2018-10-17 11:02:59 -0700 | [diff] [blame] | 87 | "libcamera_client", |
Zachary Iqbal | 096ab36 | 2018-10-17 11:02:59 -0700 | [diff] [blame] | 88 | "libcamera_metadata", |
Austin Borger | af8d5d4 | 2024-06-11 16:21:11 -0700 | [diff] [blame] | 89 | "libcutils", |
Jayant Chowdhary | dcae796 | 2024-08-20 21:20:10 +0000 | [diff] [blame] | 90 | "libfmq", |
Austin Borger | af8d5d4 | 2024-06-11 16:21:11 -0700 | [diff] [blame] | 91 | "libgui", |
| 92 | "liblog", |
Zachary Iqbal | 096ab36 | 2018-10-17 11:02:59 -0700 | [diff] [blame] | 93 | "libmediandk", |
| 94 | "libnativewindow", |
Austin Borger | af8d5d4 | 2024-06-11 16:21:11 -0700 | [diff] [blame] | 95 | "libstagefright_foundation", |
| 96 | "libutils", |
Zachary Iqbal | 096ab36 | 2018-10-17 11:02:59 -0700 | [diff] [blame] | 97 | ], |
Jiawen Chen | 9f713e8 | 2020-01-15 11:06:13 -0500 | [diff] [blame] | 98 | header_libs: [ |
| 99 | "jni_headers", |
| 100 | ], |
Zachary Iqbal | 096ab36 | 2018-10-17 11:02:59 -0700 | [diff] [blame] | 101 | cflags: [ |
Jayant Chowdhary | 8e798a8 | 2021-01-29 09:45:47 -0800 | [diff] [blame] | 102 | "-DEXPORT=__attribute__((visibility(\"default\")))", |
Zachary Iqbal | 096ab36 | 2018-10-17 11:02:59 -0700 | [diff] [blame] | 103 | "-Wall", |
Zachary Iqbal | 096ab36 | 2018-10-17 11:02:59 -0700 | [diff] [blame] | 104 | "-Werror", |
Austin Borger | af8d5d4 | 2024-06-11 16:21:11 -0700 | [diff] [blame] | 105 | "-Wextra", |
| 106 | "-fvisibility=hidden", |
Zachary Iqbal | 096ab36 | 2018-10-17 11:02:59 -0700 | [diff] [blame] | 107 | ], |
Jayant Chowdhary | b16194d | 2019-04-19 16:04:01 -0700 | [diff] [blame] | 108 | // TODO: jchowdhary@, use header_libs instead b/131165718 |
| 109 | include_dirs: [ |
| 110 | "system/media/private/camera/include", |
| 111 | ], |
Zachary Iqbal | 096ab36 | 2018-10-17 11:02:59 -0700 | [diff] [blame] | 112 | export_include_dirs: ["include"], |
| 113 | export_shared_lib_headers: [ |
| 114 | "libnativewindow", |
dimitry | 99d67ef | 2018-11-07 17:09:11 +0100 | [diff] [blame] | 115 | ], |
| 116 | version_script: "libcamera2ndk.map.txt", |
Zachary Iqbal | 096ab36 | 2018-10-17 11:02:59 -0700 | [diff] [blame] | 117 | } |
Jayant Chowdhary | 6df2607 | 2018-11-06 23:55:12 -0800 | [diff] [blame] | 118 | |
| 119 | cc_library_shared { |
| 120 | name: "libcamera2ndk_vendor", |
Zhijun He | 7c856a2 | 2019-05-13 13:43:26 -0700 | [diff] [blame] | 121 | vendor: true, |
Jayant Chowdhary | 6df2607 | 2018-11-06 23:55:12 -0800 | [diff] [blame] | 122 | srcs: [ |
Austin Borger | af8d5d4 | 2024-06-11 16:21:11 -0700 | [diff] [blame] | 123 | "NdkCameraCaptureSession.cpp", |
| 124 | "NdkCameraDevice.cpp", |
| 125 | "NdkCameraManager.cpp", |
| 126 | "NdkCameraMetadata.cpp", |
| 127 | "NdkCaptureRequest.cpp", |
| 128 | "impl/ACameraCaptureSession.cpp", |
| 129 | "impl/ACameraMetadata.cpp", |
Jayant Chowdhary | 6df2607 | 2018-11-06 23:55:12 -0800 | [diff] [blame] | 130 | "ndk_vendor/impl/ACameraDevice.cpp", |
| 131 | "ndk_vendor/impl/ACameraManager.cpp", |
| 132 | "ndk_vendor/impl/utils.cpp", |
Jayant Chowdhary | 6df2607 | 2018-11-06 23:55:12 -0800 | [diff] [blame] | 133 | ], |
| 134 | |
| 135 | export_include_dirs: ["include"], |
| 136 | export_shared_lib_headers: [ |
| 137 | "libcutils", |
| 138 | ], |
| 139 | local_include_dirs: [ |
| 140 | ".", |
Jayant Chowdhary | 6df2607 | 2018-11-06 23:55:12 -0800 | [diff] [blame] | 141 | "impl", |
Austin Borger | af8d5d4 | 2024-06-11 16:21:11 -0700 | [diff] [blame] | 142 | "include", |
Jayant Chowdhary | 6df2607 | 2018-11-06 23:55:12 -0800 | [diff] [blame] | 143 | ], |
| 144 | cflags: [ |
Jayant Chowdhary | 6df2607 | 2018-11-06 23:55:12 -0800 | [diff] [blame] | 145 | "-DEXPORT=__attribute__((visibility(\"default\")))", |
| 146 | "-D__ANDROID_VNDK__", |
Austin Borger | af8d5d4 | 2024-06-11 16:21:11 -0700 | [diff] [blame] | 147 | "-fvisibility=hidden", |
Jayant Chowdhary | 6df2607 | 2018-11-06 23:55:12 -0800 | [diff] [blame] | 148 | ], |
| 149 | |
| 150 | shared_libs: [ |
Avichal Rakesh | f099b23 | 2022-10-27 15:44:50 -0700 | [diff] [blame] | 151 | "android.frameworks.cameraservice.common-V1-ndk", |
Jyoti Bhayana | 1f9600b | 2024-10-29 20:25:32 -0700 | [diff] [blame] | 152 | "android.frameworks.cameraservice.device-V3-ndk", |
| 153 | "android.frameworks.cameraservice.service-V3-ndk", |
Austin Borger | af8d5d4 | 2024-06-11 16:21:11 -0700 | [diff] [blame] | 154 | "libbinder_ndk", |
| 155 | "libcamera_metadata", |
| 156 | "libcutils", |
| 157 | "libfmq", |
| 158 | "libhardware", |
| 159 | "libhidlbase", |
| 160 | "liblog", |
| 161 | "libmediandk", |
| 162 | "libnativewindow", |
| 163 | "libstagefright_foundation", |
| 164 | "libutils", |
Jayant Chowdhary | 6df2607 | 2018-11-06 23:55:12 -0800 | [diff] [blame] | 165 | ], |
Jayant Chowdhary | 6df2607 | 2018-11-06 23:55:12 -0800 | [diff] [blame] | 166 | static_libs: [ |
| 167 | "android.hardware.camera.common@1.0-helper", |
Avichal Rakesh | f099b23 | 2022-10-27 15:44:50 -0700 | [diff] [blame] | 168 | "libaidlcommonsupport", |
Jayant Chowdhary | 6df2607 | 2018-11-06 23:55:12 -0800 | [diff] [blame] | 169 | "libarect", |
| 170 | ], |
Jayant Chowdhary | b16194d | 2019-04-19 16:04:01 -0700 | [diff] [blame] | 171 | // TODO: jchowdhary@, use header_libs instead b/131165718 |
| 172 | include_dirs: [ |
| 173 | "system/media/private/camera/include", |
| 174 | ], |
Jayant Chowdhary | 6df2607 | 2018-11-06 23:55:12 -0800 | [diff] [blame] | 175 | } |
| 176 | |
| 177 | cc_test { |
Shuzhen Wang | 4fa28d2 | 2020-01-23 15:57:25 -0800 | [diff] [blame] | 178 | name: "ACameraNdkVendorTest", |
Jayant Chowdhary | 6df2607 | 2018-11-06 23:55:12 -0800 | [diff] [blame] | 179 | vendor: true, |
Shuzhen Wang | 4fa28d2 | 2020-01-23 15:57:25 -0800 | [diff] [blame] | 180 | srcs: [ |
Shuzhen Wang | 4fa28d2 | 2020-01-23 15:57:25 -0800 | [diff] [blame] | 181 | "ndk_vendor/tests/ACameraManagerTest.cpp", |
Austin Borger | af8d5d4 | 2024-06-11 16:21:11 -0700 | [diff] [blame] | 182 | "ndk_vendor/tests/AImageReaderVendorTest.cpp", |
Shuzhen Wang | 4fa28d2 | 2020-01-23 15:57:25 -0800 | [diff] [blame] | 183 | ], |
Jayant Chowdhary | 6df2607 | 2018-11-06 23:55:12 -0800 | [diff] [blame] | 184 | shared_libs: [ |
Jayant Chowdhary | 6df2607 | 2018-11-06 23:55:12 -0800 | [diff] [blame] | 185 | "libcamera2ndk_vendor", |
Jayant Chowdhary | 9401b55 | 2019-01-07 16:20:28 -0800 | [diff] [blame] | 186 | "libcamera_metadata", |
Austin Borger | af8d5d4 | 2024-06-11 16:21:11 -0700 | [diff] [blame] | 187 | "libcutils", |
Devin Moore | 5f86662 | 2023-06-05 22:25:40 +0000 | [diff] [blame] | 188 | "libhidlbase", |
Austin Borger | af8d5d4 | 2024-06-11 16:21:11 -0700 | [diff] [blame] | 189 | "liblog", |
Jayant Chowdhary | 6df2607 | 2018-11-06 23:55:12 -0800 | [diff] [blame] | 190 | "libmediandk", |
| 191 | "libnativewindow", |
Jayant Chowdhary | 6df2607 | 2018-11-06 23:55:12 -0800 | [diff] [blame] | 192 | "libui", |
Austin Borger | af8d5d4 | 2024-06-11 16:21:11 -0700 | [diff] [blame] | 193 | "libutils", |
Jayant Chowdhary | 6df2607 | 2018-11-06 23:55:12 -0800 | [diff] [blame] | 194 | ], |
Jayant Chowdhary | 9401b55 | 2019-01-07 16:20:28 -0800 | [diff] [blame] | 195 | static_libs: [ |
| 196 | "android.hardware.camera.common@1.0-helper", |
| 197 | ], |
Jayant Chowdhary | 6df2607 | 2018-11-06 23:55:12 -0800 | [diff] [blame] | 198 | cflags: [ |
| 199 | "-D__ANDROID_VNDK__", |
| 200 | ], |
| 201 | } |