1# Copyright (C) 2021-2022 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 14if (defined(ohos_lite)) { 15 import("//build/lite/config/component/lite_component.gni") 16 import("//foundation/communication/wifi/dhcp/dhcp_lite.gni") 17} else { 18 import("//build/ohos.gni") 19 import("//foundation/communication/wifi/dhcp/dhcp.gni") 20} 21 22################################################################################ 23 24local_base_sources = [ 25 "$DHCP_ROOT_DIR/services/mgr_service/src/dhcp_client_service_impl.cpp", 26 "$DHCP_ROOT_DIR/services/mgr_service/src/dhcp_event_subscriber.cpp", 27 "$DHCP_ROOT_DIR/services/mgr_service/src/dhcp_func.cpp", 28 "$DHCP_ROOT_DIR/services/mgr_service/src/dhcp_server_service.cpp", 29 "$DHCP_ROOT_DIR/services/mgr_service/src/dhcp_service.cpp", 30 "$DHCP_ROOT_DIR/services/mgr_service/src/dhcp_service_api.cpp", 31] 32 33local_base_include_dirs = [ 34 "$WIFI_ROOT_DIR/services/wifi_standard/wifi_framework/wifi_toolkit/log", 35 "$DHCP_ROOT_DIR/services/mgr_service/include", 36 "$DHCP_ROOT_DIR/interfaces/inner_api/interfaces", 37 "$DHCP_ROOT_DIR/interfaces/inner_api/include", 38] 39 40if (defined(ohos_lite)) { 41 shared_library("dhcp_manager_service") { 42 sources = local_base_sources 43 44 include_dirs = local_base_include_dirs 45 include_dirs += [ 46 "//base/hiviewdfx/hilog_lite/interfaces/native/innerkits", 47 "//third_party/bounds_checking_function/include", 48 ] 49 50 deps = [ 51 "//base/hiviewdfx/hilog_lite/frameworks/featured:hilog_shared", 52 "//third_party/bounds_checking_function:libsec_shared", 53 ] 54 55 defines = [ 56 "_GNU_SOURCE", 57 "OHOS_ARCH_LITE", 58 ] 59 configs -= [ "//build/lite/config:language_cpp" ] 60 cflags_cc = [ 61 "-fPIC", 62 "-std=c++17", 63 "-Wall", 64 ] 65 ldflags = [ 66 "-fPIC", 67 "-Wl,-E", 68 ] 69 } 70} else { 71 ohos_shared_library("dhcp_manager_service") { 72 install_enable = true 73 sources = local_base_sources 74 75 include_dirs = local_base_include_dirs 76 include_dirs += [ 77 "//commonlibrary/c_utils/base/include", 78 "//foundation/communication/ipc/interfaces/innerkits/ipc_core/include", 79 ] 80 81 cflags_cc = [ 82 "-std=c++17", 83 "-Wall", 84 ] 85 86 external_deps = [ 87 "ability_base:want", 88 "bundle_framework:appexecfwk_base", 89 "c_utils:utils", 90 "common_event_service:cesfwk_innerkits", 91 "eventhandler:libeventhandler", 92 "hiviewdfx_hilog_native:libhilog", 93 ] 94 ldflags = [ 95 "-fPIC", 96 "-Wl,-E", 97 ] 98 99 part_name = "dhcp" 100 subsystem_name = "communication" 101 } 102} 103