1# Copyright (c) 2022-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("../device_status.gni") 15 16config("devicestatus_private_config") { 17 include_dirs = [ "${device_status_interfaces_path}/innerkits/include" ] 18} 19 20config("devicestatus_srv_public_config") { 21 include_dirs = [ 22 "include", 23 "interface", 24 "include/algorithm", 25 "include/datahub", 26 "${device_status_root_path}/utils/json_parser/include" 27 ] 28} 29 30ohos_shared_library("devicestatus_mock") { 31 sanitize = { 32 integer_overflow = true 33 ubsan = true 34 boundary_sanitize = true 35 cfi = true 36 cfi_cross_dso = true 37 debug = false 38 } 39 40 sources = [ 41 "src/devicestatus_data_parse.cpp", 42 "src/devicestatus_msdp_mock.cpp", 43 ] 44 45 configs = [ 46 "${device_status_utils_path}:devicestatus_utils_config", 47 ":devicestatus_private_config", 48 ] 49 50 public_configs = [ ":devicestatus_srv_public_config" ] 51 52 deps = [ 53 "${device_status_utils_path}:devicestatus_util", 54 "${device_status_root_path}/utils/json_parser:json_parser" 55 ] 56 57 external_deps = [ 58 "c_utils:utils", 59 "cJSON:cjson_static", 60 "cJSON:cjson", 61 "hilog:libhilog", 62 ] 63 64 defines = [] 65 if (device_status_sensor_enable) { 66 external_deps += [ "sensor:sensor_interface_native" ] 67 defines += [ "DEVICE_STATUS_SENSOR_ENABLE" ] 68 } 69 70 subsystem_name = "${device_status_subsystem_name}" 71 part_name = "${device_status_part_name}" 72} 73 74ohos_shared_library("devicestatus_algo") { 75 branch_protector_ret = "pac_ret" 76 sanitize = { 77 integer_overflow = true 78 ubsan = true 79 boundary_sanitize = true 80 cfi = true 81 cfi_cross_dso = true 82 debug = false 83 } 84 sources = [ 85 "src/algorithm/algo_absolute_still.cpp", 86 "src/algorithm/algo_base.cpp", 87 "src/algorithm/algo_horizontal.cpp", 88 "src/algorithm/algo_vertical.cpp", 89 "src/datahub/sensor_data_callback.cpp", 90 "src/devicestatus_algorithm_manager.cpp", 91 ] 92 93 configs = [ 94 "${device_status_utils_path}:devicestatus_utils_config", 95 ":devicestatus_private_config", 96 ] 97 98 public_configs = [ ":devicestatus_srv_public_config" ] 99 100 deps = [ 101 "${device_status_interfaces_path}/innerkits:devicestatus_client", 102 "${device_status_utils_path}:devicestatus_util", 103 ] 104 105 external_deps = [ 106 "ability_base:base", 107 "cJSON:cjson_static", 108 "cJSON:cjson", 109 "hilog:libhilog", 110 "input:libmmi-client", 111 "ipc:ipc_single", 112 "safwk:system_ability_fwk", 113 "samgr:samgr_proxy", 114 ] 115 defines = [] 116 if (device_status_sensor_enable) { 117 external_deps += [ "sensor:sensor_interface_native" ] 118 defines += [ "DEVICE_STATUS_SENSOR_ENABLE" ] 119 } 120 121 subsystem_name = "${device_status_subsystem_name}" 122 part_name = "${device_status_part_name}" 123} 124