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