# Copyright (C) 2024 Huawei Device Co., Ltd. # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # distributed under the License is distributed on an "AS IS" BASIS, # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. if (defined(ohos_lite)) { import("//build/lite/config/component/lite_component.gni") import("//foundation/communication/dhcp/dhcp_lite.gni") } else { import("//build/ohos.gni") import("//foundation/communication/dhcp/dhcp.gni") } ################################################################################ if (defined(ohos_lite)) { shared_library("dhcp_utils") { sources = [ "src/dhcp_arp_checker.cpp", "src/dhcp_common_utils.cpp", ] include_dirs = [ "$DHCP_ROOT_DIR/services", "$DHCP_ROOT_DIR/services/utils/include", ] deps = [] external_deps = [] defines = [ "_GNU_SOURCE", "OHOS_ARCH_LITE", ] } } else { config("dhcp_common_config") { visibility = [ ":*" ] include_dirs = [ "$DHCP_ROOT_DIR/services/utils/include" ] } ohos_shared_library("dhcp_utils") { branch_protector_ret = "pac_ret" sanitize = { cfi = true boundary_sanitize = true cfi_cross_dso = true debug = false } install_enable = true sources = [ "$DHCP_ROOT_DIR/services/utils/src/dhcp_arp_checker.cpp", "$DHCP_ROOT_DIR/services/utils/src/dhcp_common_utils.cpp", "$DHCP_ROOT_DIR/services/utils/src/dhcp_system_timer.cpp", ] include_dirs = [ "$DHCP_ROOT_DIR/services", "$DHCP_ROOT_DIR/services/utils/include", ] deps = [] external_deps = [ "ability_runtime:wantagent_innerkits", "c_utils:utils", "hilog:libhilog", "time_service:time_client", ] cflags = [ "-std=c++17", "-fno-rtti", ] ldflags = [ "-fPIC", "-Wl,-E", ] public_configs = [ ":dhcp_common_config" ] part_name = "dhcp" subsystem_name = "communication" innerapi_tags = [ "platformsdk" ] } }