1/* 2 * Copyright (C) 2019 The Android Open Source Project 3 * 4 * Licensed under the Apache License, Version 2.0 (the "License"); 5 * you may not use this file except in compliance with the License. 6 * You may obtain a copy of the License at 7 * 8 * http://www.apache.org/licenses/LICENSE-2.0 9 * 10 * Unless required by applicable law or agreed to in writing, software 11 * distributed under the License is distributed on an "AS IS" BASIS, 12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 * See the License for the specific language governing permissions and 14 * limitations under the License. 15 */ 16 17package { 18 default_applicable_licenses: ["Android-Apache-2.0"], 19} 20 21soong_config_module_type { 22 name: "gch_lazy_hal_cc_defaults", 23 module_type: "cc_defaults", 24 config_namespace: "gch", 25 bool_variables: ["use_lazy_hal"], 26 properties: ["enabled"], 27} 28 29gch_lazy_hal_cc_defaults { 30 name: "camera_service_eager_hal_defaults", 31 enabled: true, 32 soong_config_variables: { 33 use_lazy_hal: { 34 enabled: false, 35 }, 36 }, 37} 38 39gch_lazy_hal_cc_defaults { 40 name: "camera_service_lazy_hal_defaults", 41 enabled: false, 42 soong_config_variables: { 43 use_lazy_hal: { 44 enabled: true, 45 }, 46 }, 47} 48 49// Exported for use in vendor/google/services/LyricCameraHAL/src/ 50python_binary_host { 51 name: "camera_hal_version_script", 52 main: "version_script.py", 53 srcs: ["version_script.py"], 54} 55 56cc_genrule { 57 name: "hidl_camera_build_version", 58 tool_files: ["version_script.py"], 59 cmd: "python3 $(location version_script.py) $(in) $(out)", 60 vendor: true, 61 srcs: [ 62 "hidl_camera_build_version.inl", 63 ], 64 out: ["hidl_camera_build_version.h"], 65} 66 67cc_defaults { 68 name: "camera_service_defaults", 69 defaults: [ 70 "google_camera_hal_defaults", 71 "apex_update_listener_cc_defaults_static", 72 ], 73 vendor: true, 74 relative_install_path: "hw", 75 srcs: [ 76 "hidl_camera_device.cc", 77 "hidl_camera_device_session.cc", 78 "hidl_camera_provider.cc", 79 "hidl_profiler.cc", 80 "hidl_thermal_utils.cc", 81 "hidl_utils.cc", 82 "libc_wrappers.cc", 83 "service.cc", 84 ], 85 generated_headers: [ 86 "hidl_camera_build_version", 87 ], 88 compile_multilib: "first", 89 shared_libs: [ 90 "android.hardware.camera.device@3.2", 91 "android.hardware.camera.device@3.3", 92 "android.hardware.camera.device@3.4", 93 "android.hardware.camera.device@3.5", 94 "android.hardware.camera.device@3.6", 95 "android.hardware.camera.device@3.7", 96 "android.hardware.camera.provider@2.4", 97 "android.hardware.camera.provider@2.5", 98 "android.hardware.camera.provider@2.6", 99 "android.hardware.camera.provider@2.7", 100 "android.hardware.graphics.mapper@2.0", 101 "android.hardware.graphics.mapper@3.0", 102 "android.hardware.graphics.mapper@4.0", 103 "android.hardware.thermal@2.0", 104 "libbinder", 105 "libbase", 106 "libcamera_metadata", 107 "libcutils", 108 "libfmq", 109 "libgooglecamerahal", 110 "libgooglecamerahalutils", 111 "libhidlbase", 112 "liblog", 113 "libutils", 114 "lib_profiler", 115 ], 116 export_shared_lib_headers: [ 117 "lib_profiler", 118 ], 119 static_libs: [ 120 "android.hardware.camera.common@1.0-helper", 121 ], 122 vintf_fragments: ["android.hardware.camera.provider@2.7-service-google.xml"], 123} 124 125cc_binary { 126 name: "android.hardware.camera.provider@2.7-service-google", 127 defaults: [ 128 "camera_service_defaults", 129 "camera_service_eager_hal_defaults", 130 ], 131 init_rc: ["android.hardware.camera.provider@2.7-service-google.rc"], 132} 133 134cc_binary { 135 name: "android.hardware.camera.provider@2.7-service-google-lazy", 136 defaults: [ 137 "camera_service_defaults", 138 "camera_service_lazy_hal_defaults", 139 ], 140 init_rc: ["android.hardware.camera.provider@2.7-service-google-lazy.rc"], 141 cflags: ["-DLAZY_SERVICE"], 142} 143