• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1# Copyright (c) 2021-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("//base/notification/distributed_notification_service/notification.gni")
15import("//build/ohos.gni")
16
17cflags = [
18  "-fno-math-errno",
19  "-fno-unroll-loops",
20  "-fmerge-all-constants",
21  "-fno-ident",
22  "-Oz",
23  "-flto",
24  "-ffunction-sections",
25  "-fdata-sections",
26]
27
28config("native_module_config") {
29  visibility = [ ":*" ]
30
31  include_dirs = []
32
33  if (target_cpu == "arm") {
34    cflags += [ "-DBINDER_IPC_32BIT" ]
35  }
36}
37
38ohos_shared_library("notificationsubscribe") {
39  sanitize = {
40    integer_overflow = true
41    ubsan = true
42    boundary_sanitize = true
43    cfi = true
44    cfi_cross_dso = true
45    debug = false
46  }
47  branch_protector_ret = "pac_ret"
48
49  include_dirs = [
50    "../../include",
51    "../../include/subscribe",
52  ]
53
54  configs = [ ":native_module_config" ]
55
56  sources = [
57    "../common.cpp",
58    "../common_convert_content.cpp",
59    "../common_convert_liveview.cpp",
60    "../common_convert_notification.cpp",
61    "../common_convert_request.cpp",
62    "../common_utils.cpp",
63    "../constant.cpp",
64    "../distributed_operation_callback.cpp",
65    "../remove.cpp",
66    "../subscribe.cpp",
67    "../unsubscribe.cpp",
68    "../uv_queue.cpp",
69    "init_module.cpp",
70    "napi_remove.cpp",
71    "napi_subscribe.cpp",
72  ]
73
74  deps = [ "${frameworks_module_ans_path}:ans_innerkits" ]
75
76  external_deps = [
77    "ability_base:want",
78    "ability_base:zuri",
79    "ability_runtime:abilitykit_native",
80    "ability_runtime:napi_common",
81    "ability_runtime:napi_wantagent_common",
82    "ability_runtime:wantagent_innerkits",
83    "c_utils:utils",
84    "ffrt:libffrt",
85    "hilog:libhilog",
86    "hitrace:libhitracechain",
87    "image_framework:image",
88    "ipc:ipc_single",
89    "libuv:uv",
90    "napi:ace_napi",
91    "relational_store:native_rdb",
92  ]
93
94  relative_install_dir = "module"
95  subsystem_name = "${subsystem_name}"
96  part_name = "${component_name}"
97}
98