• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1#
2# Copyright (c) 2020 Huawei Device Co., Ltd.
3# Licensed under the Apache License, Version 2.0 (the "License");
4# you may not use this file except in compliance with the License.
5# You may obtain a copy of the License at
6#
7#     http://www.apache.org/licenses/LICENSE-2.0
8#
9# Unless required by applicable law or agreed to in writing, software
10# distributed under the License is distributed on an "AS IS" BASIS,
11# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12# See the License for the specific language governing permissions and
13# limitations under the License.
14#
15import("//build/lite/config/component/lite_component.gni")
16import("//build/lite/ndk/ndk.gni")
17
18if (ohos_kernel_type == "liteos_a" || ohos_kernel_type == "linux") {
19  shared_library("token_shared") {
20    include_dirs = [
21      "//base/startup/syspara_lite/interfaces/kits",
22      "//commonlibrary/utils_lite/include",
23      "//base/startup/syspara_lite/hals",
24    ]
25
26    sources = [ "src/token_impl_posix/token.c" ]
27
28    public_deps = [
29      "$ohos_product_adapter_dir/utils/token:haltoken_shared",
30      "//base/hiviewdfx/hilog_lite/frameworks/featured:hilog_shared",
31    ]
32  }
33}
34
35if (ohos_kernel_type == "liteos_m") {
36  static_library("token_static") {
37    sources = [ "src/token_impl_hal/token.c" ]
38
39    include_dirs = [
40      "//base/startup/syspara_lite/interfaces/kits",
41      "//commonlibrary/utils_lite/include",
42      "//base/hiviewdfx/hilog_lite/interfaces/native/kits/hilog_lite",
43      "//base/startup/syspara_lite/hals",
44    ]
45
46    deps = [ "$ohos_product_adapter_dir/utils/token:hal_token_static" ]
47  }
48}
49
50lite_component("sysparatoken") {
51  features = []
52  if (ohos_kernel_type == "liteos_a" || ohos_kernel_type == "linux") {
53    features += [ ":token_shared" ]
54  }
55  if (ohos_kernel_type == "liteos_m") {
56    features += [ ":token_static" ]
57  }
58}
59
60ndk_lib("sysparatoken_notes") {
61  if (ohos_kernel_type != "liteos_m") {
62    lib_extension = ".so"
63  }
64  deps = []
65  if (ohos_kernel_type != "liteos_m") {
66    deps += [ "//base/startup/syspara_lite/frameworks/token:token_shared" ]
67  }
68  head_files = [ "//base/startup/syspara_lite/interfaces/kits" ]
69}
70