1# Copyright (c) 2023 Huawei Device Co., Ltd. 2# Licensed under the Apache License, Version 2.0 (the "License"); 3# you may not use this file except in compliance with the License. 4# You may obtain a copy of the License at 5# 6# http://www.apache.org/licenses/LICENSE-2.0 7# 8# Unless required by applicable law or agreed to in writing, software 9# distributed under the License is distributed on an "AS IS" BASIS, 10# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 11# See the License for the specific language governing permissions and 12# limitations under the License. 13 14import("//build/ohos.gni") 15import("../../intelligent_voice.gni") 16 17ohos_shared_library("intell_voice_trigger_manager_service_1.1") { 18 include_dirs = [ 19 "../../interfaces", 20 "../../utils", 21 ] 22 23 sources = [ 24 "../../utils/memory_guard.cpp", 25 "intell_voice_trigger_adapter_impl.cpp", 26 "intell_voice_trigger_manager_impl.cpp", 27 ] 28 29 defines = [] 30 if (use_musl) { 31 if (musl_use_jemalloc && musl_use_jemalloc_dfx_intf) { 32 defines += [ "CONFIG_USE_JEMALLOC_DFX_INTF" ] 33 } 34 } 35 36 if (is_standard_system) { 37 external_deps = [ 38 "c_utils:utils", 39 "drivers_interface_intelligent_voice:libintell_voice_trigger_stub_1.0", 40 "drivers_interface_intelligent_voice:libintell_voice_trigger_stub_1.1", 41 "drivers_interface_intelligent_voice:libintell_voice_trigger_stub_1.2", 42 "hilog:libhilog", 43 "ipc:ipc_single", 44 ] 45 } else { 46 external_deps = [ 47 "hilog:libhilog", 48 "ipc:ipc_single", 49 ] 50 } 51 52 version_script = "libtrigger_manager_service_1_1.versionscript" 53 54 install_enable = true 55 install_images = [ chipset_base_dir ] 56 subsystem_name = "hdf" 57 part_name = "drivers_peripheral_intelligent_voice" 58} 59 60ohos_shared_library("intell_voice_trigger_driver") { 61 include_dirs = [ "../../utils" ] 62 63 sources = [ "intell_voice_trigger_driver.cpp" ] 64 65 if (is_standard_system) { 66 external_deps = [ 67 "c_utils:utils", 68 "drivers_interface_intelligent_voice:libintell_voice_trigger_stub_1.0", 69 "drivers_interface_intelligent_voice:libintell_voice_trigger_stub_1.1", 70 "drivers_interface_intelligent_voice:libintell_voice_trigger_stub_1.2", 71 "hdf_core:libhdf_host", 72 "hdf_core:libhdf_ipc_adapter", 73 "hdf_core:libhdf_utils", 74 "hdf_core:libhdi", 75 "hilog:libhilog", 76 "ipc:ipc_single", 77 ] 78 } else { 79 external_deps = [ 80 "hilog:libhilog", 81 "ipc:ipc_single", 82 ] 83 } 84 85 shlib_type = "hdi" 86 install_enable = true 87 install_images = [ chipset_base_dir ] 88 subsystem_name = "hdf" 89 part_name = "drivers_peripheral_intelligent_voice" 90} 91 92group("hdi_intell_voice_trigger_service") { 93 deps = [ 94 ":intell_voice_trigger_driver", 95 ":intell_voice_trigger_manager_service_1.1", 96 ] 97 98 if (drivers_peripheral_intelligent_voice_feature_community) { 99 deps += [ "../../passthrough:vendor_intell_voice_trigger" ] 100 } 101} 102