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