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:intell_voice_trigger_idl_headers",
40      "hilog:libhilog",
41      "ipc:ipc_single",
42    ]
43  } else {
44    external_deps = [
45      "hilog:libhilog",
46      "ipc:ipc_single",
47    ]
48  }
49
50  install_enable = true
51  install_images = [ chipset_base_dir ]
52  subsystem_name = "hdf"
53  part_name = "drivers_peripheral_intelligent_voice"
54}
55
56ohos_shared_library("intell_voice_trigger_driver") {
57  include_dirs = [ "../../utils" ]
58
59  sources = [ "intell_voice_trigger_driver.cpp" ]
60
61  if (is_standard_system) {
62    external_deps = [
63      "c_utils:utils",
64      "drivers_interface_intelligent_voice:libintell_voice_trigger_stub_1.0",
65      "drivers_interface_intelligent_voice:libintell_voice_trigger_stub_1.1",
66      "drivers_interface_intelligent_voice:libintell_voice_trigger_stub_1.2",
67      "hdf_core:libhdf_host",
68      "hdf_core:libhdf_ipc_adapter",
69      "hdf_core:libhdf_utils",
70      "hdf_core:libhdi",
71      "hilog:libhilog",
72      "ipc:ipc_single",
73    ]
74  } else {
75    external_deps = [
76      "hilog:libhilog",
77      "ipc:ipc_single",
78    ]
79  }
80
81  shlib_type = "hdi"
82  install_enable = true
83  install_images = [ chipset_base_dir ]
84  subsystem_name = "hdf"
85  part_name = "drivers_peripheral_intelligent_voice"
86}
87
88group("hdi_intell_voice_trigger_service") {
89  deps = [
90    ":intell_voice_trigger_driver",
91    ":intell_voice_trigger_manager_service_1.1",
92  ]
93
94  if (drivers_peripheral_intelligent_voice_feature_community) {
95    deps += [ "../../passthrough:vendor_intell_voice_trigger" ]
96  }
97}
98