# Copyright (C) 2021-2022 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/wifi/dhcp/dhcp_lite.gni") } else { import("//build/ohos.gni") import("//foundation/communication/wifi/dhcp/dhcp.gni") } ################################################################################ local_base_sources = [ "$DHCP_ROOT_DIR/services/dhcp_client/src/dhcp_api.cpp", "$DHCP_ROOT_DIR/services/dhcp_client/src/dhcp_client.c", "$DHCP_ROOT_DIR/services/dhcp_client/src/dhcp_function.c", "$DHCP_ROOT_DIR/services/dhcp_client/src/dhcp_ipv4.c", "$DHCP_ROOT_DIR/services/dhcp_client/src/dhcp_main.c", "$DHCP_ROOT_DIR/services/dhcp_client/src/dhcp_options.c", "$DHCP_ROOT_DIR/services/dhcp_client/src/dhcp_socket.c", ] local_base_include_dirs = [ "$DHCP_ROOT_DIR/services/dhcp_client/include", "$WIFI_ROOT_DIR/services/wifi_standard/wifi_framework/wifi_toolkit/log", ] if (defined(ohos_lite)) { executable("dhcp_client_service") { sources = local_base_sources include_dirs = local_base_include_dirs include_dirs += [ "//base/hiviewdfx/hilog_lite/interfaces/native/innerkits", "//third_party/bounds_checking_function/include", ] deps = [ "//base/hiviewdfx/hilog_lite/frameworks/featured:hilog_shared", "//third_party/bounds_checking_function:libsec_shared", ] defines = [ "_GNU_SOURCE", "OHOS_ARCH_LITE", ] } } else { ohos_executable("dhcp_client_service") { install_enable = true sources = local_base_sources include_dirs = local_base_include_dirs include_dirs += [ "//commonlibrary/c_utils/base/include", "//foundation/communication/ipc/interfaces/innerkits/ipc_core/include", "//third_party/openssl/include", ] deps = [ "//third_party/openssl:libcrypto_shared" ] cflags_cc = [ "-fno-rtti" ] external_deps = [ "ability_base:want", "bundle_framework:appexecfwk_base", "c_utils:utils", "common_event_service:cesfwk_innerkits", "eventhandler:libeventhandler", "hiviewdfx_hilog_native:libhilog", ] defines = [] part_name = "dhcp" subsystem_name = "communication" } }