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 | |
| 19 | ndk_library { |
Dan Willemsen | 2c88559 | 2017-04-07 15:48:32 -0700 | [diff] [blame] | 20 | name: "libcamera2ndk", |
Dan Albert | d7973ba | 2016-09-14 12:35:50 -0700 | [diff] [blame] | 21 | symbol_file: "libcamera2ndk.map.txt", |
| 22 | first_version: "24", |
Dan Albert | 1714f2e | 2017-01-05 16:00:15 -0800 | [diff] [blame] | 23 | unversioned_until: "current", |
Dan Albert | d7973ba | 2016-09-14 12:35:50 -0700 | [diff] [blame] | 24 | } |
Colin Cross | 7e8d4ba | 2017-05-04 16:17:42 -0700 | [diff] [blame] | 25 | |
| 26 | ndk_headers { |
| 27 | name: "libcamera2ndk_headers", |
| 28 | from: "include/camera", |
| 29 | to: "camera", |
| 30 | srcs: ["include/camera/**/*.h"], |
| 31 | license: "NOTICE", |
| 32 | } |
Zachary Iqbal | 096ab36 | 2018-10-17 11:02:59 -0700 | [diff] [blame] | 33 | |
| 34 | cc_library_shared { |
dimitry | d7e265b | 2018-11-07 17:12:15 +0100 | [diff] [blame] | 35 | name: "libcamera2ndk", |
Zachary Iqbal | 096ab36 | 2018-10-17 11:02:59 -0700 | [diff] [blame] | 36 | srcs: [ |
| 37 | "NdkCameraManager.cpp", |
| 38 | "NdkCameraMetadata.cpp", |
| 39 | "NdkCameraDevice.cpp", |
| 40 | "NdkCaptureRequest.cpp", |
| 41 | "NdkCameraCaptureSession.cpp", |
| 42 | "impl/ACameraManager.cpp", |
| 43 | "impl/ACameraMetadata.cpp", |
| 44 | "impl/ACameraDevice.cpp", |
| 45 | "impl/ACameraCaptureSession.cpp", |
| 46 | ], |
| 47 | shared_libs: [ |
| 48 | "libbinder", |
| 49 | "liblog", |
| 50 | "libgui", |
| 51 | "libutils", |
| 52 | "libandroid_runtime", |
| 53 | "libcamera_client", |
| 54 | "libstagefright_foundation", |
| 55 | "libcutils", |
| 56 | "libcamera_metadata", |
| 57 | "libmediandk", |
| 58 | "libnativewindow", |
| 59 | ], |
Jiawen Chen | 9f713e8 | 2020-01-15 11:06:13 -0500 | [diff] [blame] | 60 | header_libs: [ |
| 61 | "jni_headers", |
| 62 | ], |
Zachary Iqbal | 096ab36 | 2018-10-17 11:02:59 -0700 | [diff] [blame] | 63 | cflags: [ |
| 64 | "-fvisibility=hidden", |
| 65 | "-DEXPORT=__attribute__ ((visibility (\"default\")))", |
| 66 | "-Wall", |
| 67 | "-Wextra", |
| 68 | "-Werror", |
| 69 | ], |
Jayant Chowdhary | b16194d | 2019-04-19 16:04:01 -0700 | [diff] [blame] | 70 | // TODO: jchowdhary@, use header_libs instead b/131165718 |
| 71 | include_dirs: [ |
| 72 | "system/media/private/camera/include", |
| 73 | ], |
Zachary Iqbal | 096ab36 | 2018-10-17 11:02:59 -0700 | [diff] [blame] | 74 | export_include_dirs: ["include"], |
| 75 | export_shared_lib_headers: [ |
| 76 | "libnativewindow", |
dimitry | 99d67ef | 2018-11-07 17:09:11 +0100 | [diff] [blame] | 77 | ], |
| 78 | version_script: "libcamera2ndk.map.txt", |
Zachary Iqbal | 096ab36 | 2018-10-17 11:02:59 -0700 | [diff] [blame] | 79 | } |
Jayant Chowdhary | 6df2607 | 2018-11-06 23:55:12 -0800 | [diff] [blame] | 80 | |
| 81 | cc_library_shared { |
| 82 | name: "libcamera2ndk_vendor", |
Zhijun He | 7c856a2 | 2019-05-13 13:43:26 -0700 | [diff] [blame] | 83 | vendor: true, |
Jayant Chowdhary | 6df2607 | 2018-11-06 23:55:12 -0800 | [diff] [blame] | 84 | srcs: [ |
| 85 | "ndk_vendor/impl/ACameraDevice.cpp", |
| 86 | "ndk_vendor/impl/ACameraManager.cpp", |
| 87 | "ndk_vendor/impl/utils.cpp", |
| 88 | "impl/ACameraMetadata.cpp", |
| 89 | "impl/ACameraCaptureSession.cpp", |
| 90 | "NdkCameraMetadata.cpp", |
| 91 | "NdkCameraCaptureSession.cpp", |
| 92 | "NdkCameraManager.cpp", |
| 93 | "NdkCameraDevice.cpp", |
| 94 | "NdkCaptureRequest.cpp", |
| 95 | ], |
| 96 | |
| 97 | export_include_dirs: ["include"], |
| 98 | export_shared_lib_headers: [ |
| 99 | "libcutils", |
| 100 | ], |
| 101 | local_include_dirs: [ |
| 102 | ".", |
| 103 | "include", |
| 104 | "impl", |
| 105 | ], |
| 106 | cflags: [ |
| 107 | "-fvisibility=hidden", |
| 108 | "-DEXPORT=__attribute__((visibility(\"default\")))", |
| 109 | "-D__ANDROID_VNDK__", |
| 110 | ], |
| 111 | |
| 112 | shared_libs: [ |
Jayant Chowdhary | 6df2607 | 2018-11-06 23:55:12 -0800 | [diff] [blame] | 113 | "libfmq", |
| 114 | "libhidlbase", |
| 115 | "libhardware", |
| 116 | "libnativewindow", |
| 117 | "liblog", |
| 118 | "libutils", |
| 119 | "libstagefright_foundation", |
| 120 | "libcutils", |
| 121 | "libcamera_metadata", |
| 122 | "libmediandk", |
| 123 | "android.frameworks.cameraservice.device@2.0", |
Shuzhen Wang | 316781a | 2020-08-18 18:11:01 -0700 | [diff] [blame] | 124 | "android.frameworks.cameraservice.device@2.1", |
Jayant Chowdhary | 6df2607 | 2018-11-06 23:55:12 -0800 | [diff] [blame] | 125 | "android.frameworks.cameraservice.common@2.0", |
| 126 | "android.frameworks.cameraservice.service@2.0", |
Shuzhen Wang | 4fa28d2 | 2020-01-23 15:57:25 -0800 | [diff] [blame] | 127 | "android.frameworks.cameraservice.service@2.1", |
Shuzhen Wang | 316781a | 2020-08-18 18:11:01 -0700 | [diff] [blame] | 128 | "android.frameworks.cameraservice.service@2.2", |
Jayant Chowdhary | 6df2607 | 2018-11-06 23:55:12 -0800 | [diff] [blame] | 129 | ], |
Jayant Chowdhary | 6df2607 | 2018-11-06 23:55:12 -0800 | [diff] [blame] | 130 | static_libs: [ |
| 131 | "android.hardware.camera.common@1.0-helper", |
| 132 | "libarect", |
| 133 | ], |
Jayant Chowdhary | b16194d | 2019-04-19 16:04:01 -0700 | [diff] [blame] | 134 | // TODO: jchowdhary@, use header_libs instead b/131165718 |
| 135 | include_dirs: [ |
| 136 | "system/media/private/camera/include", |
| 137 | ], |
Jayant Chowdhary | 6df2607 | 2018-11-06 23:55:12 -0800 | [diff] [blame] | 138 | product_variables: { |
| 139 | pdk: { |
| 140 | enabled: false, |
| 141 | }, |
| 142 | }, |
| 143 | } |
| 144 | |
| 145 | cc_test { |
Shuzhen Wang | 4fa28d2 | 2020-01-23 15:57:25 -0800 | [diff] [blame] | 146 | name: "ACameraNdkVendorTest", |
Jayant Chowdhary | 6df2607 | 2018-11-06 23:55:12 -0800 | [diff] [blame] | 147 | vendor: true, |
Shuzhen Wang | 4fa28d2 | 2020-01-23 15:57:25 -0800 | [diff] [blame] | 148 | srcs: [ |
| 149 | "ndk_vendor/tests/AImageReaderVendorTest.cpp", |
| 150 | "ndk_vendor/tests/ACameraManagerTest.cpp", |
| 151 | ], |
Jayant Chowdhary | 6df2607 | 2018-11-06 23:55:12 -0800 | [diff] [blame] | 152 | shared_libs: [ |
Jayant Chowdhary | 6df2607 | 2018-11-06 23:55:12 -0800 | [diff] [blame] | 153 | "libcamera2ndk_vendor", |
Jayant Chowdhary | 9401b55 | 2019-01-07 16:20:28 -0800 | [diff] [blame] | 154 | "libcamera_metadata", |
Jayant Chowdhary | 6df2607 | 2018-11-06 23:55:12 -0800 | [diff] [blame] | 155 | "libmediandk", |
| 156 | "libnativewindow", |
| 157 | "libutils", |
| 158 | "libui", |
| 159 | "libcutils", |
| 160 | "liblog", |
| 161 | ], |
Jayant Chowdhary | 9401b55 | 2019-01-07 16:20:28 -0800 | [diff] [blame] | 162 | static_libs: [ |
| 163 | "android.hardware.camera.common@1.0-helper", |
| 164 | ], |
Jayant Chowdhary | 6df2607 | 2018-11-06 23:55:12 -0800 | [diff] [blame] | 165 | cflags: [ |
| 166 | "-D__ANDROID_VNDK__", |
| 167 | ], |
| 168 | } |