• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1# Copyright (c) 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
14import("//base/update/updater/updater_default_cfg.gni")
15import("//build/ohos.gni")
16
17updater_path = rebase_path("${updater_absolutely_path}", ".")
18config("updater_config") {
19  visibility = [ ":*" ]
20  include_dirs = [
21    "${updater_path}/services/common",
22    "${updater_path}/services/include",
23    "${updater_path}/services/include",
24    "${updater_path}/utils/include",
25    "${updater_path}/utils/json",
26    "//third_party/bounds_checking_function/include",
27    "//drivers/hdf/frameworks/include/utils",
28    "${updater_path}/interfaces/kits/include/",
29    "${updater_path}/services/include/script",
30    "${updater_path}/services/include/package",
31    "${updater_path}/services/include/applypatch",
32    "${updater_path}/services/include/log",
33  ]
34}
35
36config("libptableparse_exported_headers") {
37  visibility = [ ":*" ]
38  include_dirs = [ "${updater_path}/services/include" ]
39}
40
41ohos_static_library("libptableparse") {
42  sources = [
43    "./emmc_ptable.cpp",
44    "./ptable.cpp",
45    "./ptable_manager.cpp",
46    "./ptable_process.cpp",
47    "./ufs_ptable.cpp",
48  ]
49  configs = [ ":updater_config" ]
50
51  public_configs = [ ":libptableparse_exported_headers" ]
52
53  ldflags = [ "-Wl -std=c++11" ]
54
55  deps = [
56    "${updater_path}/services/log:libupdaterlog",
57    "${updater_path}/utils:libutils",
58    "//third_party/bzip2:libbz2",
59    "//third_party/cJSON:cjson",
60    "//third_party/zlib:libz",
61  ]
62
63  part_name = "updater"
64  subsystem_name = "updater"
65}
66