• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
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/dhcp_client/src/dhcp_api.cpp",
26  "$DHCP_ROOT_DIR/services/dhcp_client/src/dhcp_client.c",
27  "$DHCP_ROOT_DIR/services/dhcp_client/src/dhcp_function.c",
28  "$DHCP_ROOT_DIR/services/dhcp_client/src/dhcp_ipv4.c",
29  "$DHCP_ROOT_DIR/services/dhcp_client/src/dhcp_main.c",
30  "$DHCP_ROOT_DIR/services/dhcp_client/src/dhcp_options.c",
31  "$DHCP_ROOT_DIR/services/dhcp_client/src/dhcp_socket.c",
32]
33
34local_base_include_dirs = [
35  "$DHCP_ROOT_DIR/services/dhcp_client/include",
36  "$WIFI_ROOT_DIR/services/wifi_standard/wifi_framework/wifi_toolkit/log",
37]
38
39if (defined(ohos_lite)) {
40  executable("dhcp_client_service") {
41    sources = local_base_sources
42
43    include_dirs = local_base_include_dirs
44    include_dirs += [
45      "//base/hiviewdfx/hilog_lite/interfaces/native/innerkits",
46      "//third_party/bounds_checking_function/include",
47    ]
48
49    deps = [
50      "//base/hiviewdfx/hilog_lite/frameworks/featured:hilog_shared",
51      "//third_party/bounds_checking_function:libsec_shared",
52    ]
53    defines = [
54      "_GNU_SOURCE",
55      "OHOS_ARCH_LITE",
56    ]
57  }
58} else {
59  ohos_executable("dhcp_client_service") {
60    install_enable = true
61    sources = local_base_sources
62
63    include_dirs = local_base_include_dirs
64    include_dirs += [
65      "//commonlibrary/c_utils/base/include",
66      "//foundation/communication/ipc/interfaces/innerkits/ipc_core/include",
67      "//third_party/openssl/include",
68    ]
69
70    deps = [ "//third_party/openssl:libcrypto_shared" ]
71
72    cflags_cc = [ "-fno-rtti" ]
73
74    external_deps = [
75      "ability_base:want",
76      "bundle_framework:appexecfwk_base",
77      "c_utils:utils",
78      "common_event_service:cesfwk_innerkits",
79      "eventhandler:libeventhandler",
80      "hiviewdfx_hilog_native:libhilog",
81    ]
82    defines = []
83
84    part_name = "dhcp"
85    subsystem_name = "communication"
86  }
87}
88