• 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("../time.gni")
15
16config("time_service_config") {
17  visibility = [ ":*" ]
18  include_dirs = [
19    "${api_path}/include",
20    "../utils/native/include",
21    "time/include",
22    "time/include/inner_api_include",
23    "timer/include",
24    "dfx/include",
25    "ipc/base",
26    "ipc/proxy",
27    "ipc/stub",
28    "ipc/stub/inner_api_include",
29    "${time_service_path}",
30  ]
31  cflags = [ "-fvisibility=hidden" ]
32  cflags_cc = [ "-fvisibility-inlines-hidden" ]
33}
34
35ohos_shared_library("time_system_ability") {
36  configs = [ "${time_utils_path}:utils_config" ]
37  configs += [ ":time_service_config" ]
38  configs += [ "//build/config/gcc:symbol_visibility_hidden" ]
39  sources = [
40    "./time_system_ability.cpp",
41    "dfx/src/time_cmd_dispatcher.cpp",
42    "dfx/src/time_cmd_parse.cpp",
43    "dfx/src/time_sysevent.cpp",
44    "ipc/proxy/timer_call_back_proxy.cpp",
45    "ipc/stub/time_service_stub.cpp",
46    "ipc/stub/timer_notify_callback_stub.cpp",
47    "time/src/itimer_info.cpp",
48    "time/src/net_conn_callback_observer.cpp",
49    "time/src/nitz_subscriber.cpp",
50    "time/src/ntp_trusted_time.cpp",
51    "time/src/ntp_update_time.cpp",
52    "time/src/power_subscriber.cpp",
53    "time/src/simple_timer_info.cpp",
54    "time/src/sntp_client.cpp",
55    "time/src/time_service_notify.cpp",
56    "time/src/time_tick_notify.cpp",
57    "time/src/time_zone_info.cpp",
58    "time/src/timer_notify_callback.cpp",
59    "timer/src/batch.cpp",
60    "timer/src/timer_database.cpp",
61    "timer/src/timer_handler.cpp",
62    "timer/src/timer_info.cpp",
63    "timer/src/timer_manager.cpp",
64    "timer/src/timer_proxy.cpp",
65  ]
66
67  deps = [ "${time_utils_path}:time_utils" ]
68  external_deps = [
69    "ability_base:want",
70    "ability_runtime:abilitykit_native",
71    "ability_runtime:wantagent_innerkits",
72    "access_token:libaccesstoken_sdk",
73    "access_token:libtokenid_sdk",
74    "c_utils:utils",
75    "common_event_service:cesfwk_innerkits",
76    "hilog:libhilog",
77    "hisysevent:libhisysevent",
78    "init:libbeget_proxy",
79    "init:libbegetutil",
80    "ipc:ipc_single",
81    "netmanager_base:net_conn_manager_if",
82    "os_account:os_account_innerkits",
83    "relational_store:native_dataability",
84    "relational_store:native_rdb",
85    "safwk:system_ability_fwk",
86    "samgr:samgr_proxy",
87  ]
88  defines = []
89  if (device_standby) {
90    external_deps += [ "device_standby:standby_innerkits" ]
91    defines += [ "DEVICE_STANDBY_ENABLE" ]
92  }
93
94  if (defined(global_parts_info) &&
95      defined(global_parts_info.powermgr_power_manager)) {
96    external_deps += [ "power_manager:powermgr_client" ]
97    defines += [ "POWER_MANAGER_ENABLE" ]
98  }
99
100  branch_protector_ret = "pac_ret"
101  sanitize = {
102    ubsan = true
103    boundary_sanitize = true
104    cfi = true
105    cfi_cross_dso = true
106    debug = time_sanitize_debug
107  }
108  part_name = "time_service"
109  subsystem_name = "time"
110}
111
112ohos_static_library("time_system_ability_static") {
113  configs = [ "${time_utils_path}:utils_config" ]
114  configs += [ ":time_service_config" ]
115  configs += [ "//build/config/gcc:symbol_visibility_hidden" ]
116  sources = [
117    "./time_system_ability.cpp",
118    "dfx/src/time_cmd_dispatcher.cpp",
119    "dfx/src/time_cmd_parse.cpp",
120    "dfx/src/time_sysevent.cpp",
121    "ipc/proxy/timer_call_back_proxy.cpp",
122    "ipc/stub/time_service_stub.cpp",
123    "ipc/stub/timer_notify_callback_stub.cpp",
124    "time/src/itimer_info.cpp",
125    "time/src/net_conn_callback_observer.cpp",
126    "time/src/nitz_subscriber.cpp",
127    "time/src/ntp_trusted_time.cpp",
128    "time/src/ntp_update_time.cpp",
129    "time/src/power_subscriber.cpp",
130    "time/src/simple_timer_info.cpp",
131    "time/src/sntp_client.cpp",
132    "time/src/time_service_notify.cpp",
133    "time/src/time_tick_notify.cpp",
134    "time/src/time_zone_info.cpp",
135    "time/src/timer_notify_callback.cpp",
136    "timer/src/batch.cpp",
137    "timer/src/timer_database.cpp",
138    "timer/src/timer_handler.cpp",
139    "timer/src/timer_info.cpp",
140    "timer/src/timer_manager.cpp",
141    "timer/src/timer_proxy.cpp",
142  ]
143
144  deps = [ "${time_utils_path}:time_utils" ]
145  external_deps = [
146    "ability_base:want",
147    "ability_runtime:abilitykit_native",
148    "ability_runtime:wantagent_innerkits",
149    "access_token:libaccesstoken_sdk",
150    "access_token:libtokenid_sdk",
151    "c_utils:utils",
152    "common_event_service:cesfwk_innerkits",
153    "hilog:libhilog",
154    "hisysevent:libhisysevent",
155    "init:libbeget_proxy",
156    "ipc:ipc_single",
157    "netmanager_base:net_conn_manager_if",
158    "os_account:os_account_innerkits",
159    "relational_store:native_dataability",
160    "relational_store:native_rdb",
161    "safwk:system_ability_fwk",
162    "samgr:samgr_proxy",
163  ]
164  defines = []
165  if (device_standby) {
166    external_deps += [ "device_standby:standby_innerkits" ]
167    defines += [ "DEVICE_STANDBY_ENABLE" ]
168  }
169
170  if (defined(global_parts_info) &&
171      defined(global_parts_info.powermgr_power_manager)) {
172    external_deps += [ "power_manager:powermgr_client" ]
173    defines += [ "POWER_MANAGER_ENABLE" ]
174  }
175
176  branch_protector_ret = "pac_ret"
177  sanitize = {
178    ubsan = true
179    boundary_sanitize = true
180    cfi = true
181    cfi_cross_dso = true
182    debug = time_sanitize_debug
183  }
184  part_name = "time_service"
185  subsystem_name = "time"
186}
187