• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
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("//drivers/external_device_manager/extdevmgr.gni")
15
16config("ability_config") {
17  visibility = [ ":*" ]
18  cflags = []
19  if (target_cpu == "arm") {
20    cflags += [ "-DBINDER_IPC_32BIT" ]
21  }
22}
23
24ohos_shared_library("driver_extension") {
25  include_dirs = [
26    "include",
27    "${ext_mgr_path}/interfaces/ddk/usb",
28    "${ext_mgr_path}/services/native/driver_extension_manager/include/drivers_hisysevent",
29  ]
30
31  sources = [
32    "src/driver_extension.cpp",
33    "src/driver_extension_context.cpp",
34    "src/js_driver_extension.cpp",
35    "src/js_driver_extension_context.cpp",
36  ]
37
38  deps = [ "${ext_mgr_path}/services/native/driver_extension_manager/src/drivers_hisysevent:report_sys_event" ]
39  external_deps = [
40    "ability_base:want",
41    "ability_runtime:ability_connect_callback_stub",
42    "ability_runtime:ability_context_native",
43    "ability_runtime:ability_manager",
44    "ability_runtime:abilitykit_native",
45    "ability_runtime:app_context",
46    "ability_runtime:extensionkit_native",
47    "ability_runtime:napi_common",
48    "ability_runtime:runtime",
49    "c_utils:utils",
50    "eventhandler:libeventhandler",
51    "hilog:libhilog",
52    "hitrace:hitrace_meter",
53    "ipc:ipc_core",
54    "ipc:ipc_napi",
55    "napi:ace_napi",
56  ]
57  cflags_cc = [
58    "-fno-asynchronous-unwind-tables",
59    "-fno-unwind-tables",
60    "-Os",
61  ]
62
63  subsystem_name = "hdf"
64  part_name = "external_device_manager"
65}
66
67ohos_shared_library("driver_extension_module") {
68  include_dirs = [ "include" ]
69
70  sources = [ "src/driver_extension_module_loader.cpp" ]
71
72  configs = [ ":ability_config" ]
73
74  deps = [ ":driver_extension" ]
75
76  external_deps = [
77    "ability_runtime:ability_manager",
78    "ability_runtime:extensionkit_native",
79    "ability_runtime:runtime",
80    "ipc:ipc_napi",
81    "napi:ace_napi",
82    "hilog:libhilog"
83  ]
84
85  relative_install_dir = "extensionability/"
86  subsystem_name = "hdf"
87  part_name = "external_device_manager"
88}
89