• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1# Copyright (c) 2021 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("//build/ohos.gni")
15
16config("e2fsprogs-defaults") {
17  cflags = [
18    "-Wno-implicit-function-declaration",
19    "-Wno-int-conversion",
20  ]
21  defines = [ "secure_getenv=getenv" ]
22}
23config("libext2-headers") {
24  include_dirs = [ "//third_party/e2fsprogs/lib" ]
25}
26
27ohos_shared_library("libext2_blkid") {
28  configs = [
29    ":e2fsprogs-defaults",
30    ":libext2-headers",
31  ]
32  sources = [
33    "cache.c",
34    "dev.c",
35    "devname.c",
36    "devno.c",
37    "getsize.c",
38    "llseek.c",
39    "probe.c",
40    "read.c",
41    "resolve.c",
42    "save.c",
43    "tag.c",
44    "version.c",
45  ]
46
47  include_dirs = [ "." ]
48  deps = [ "//third_party/e2fsprogs/lib/uuid:libext2_uuid" ]
49  cflags = [
50    "-Wno-error=attributes",
51    "-Wno-error=pointer-sign",
52    "-Wno-unused-parameter",
53    "-fno-strict-aliasing",
54  ]
55  install_enable = true
56  subsystem_name = "thirdparty"
57  part_name = "e2fsprogs"
58  install_images = [
59    "system",
60    "updater",
61  ]
62}
63