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") 15config("e2fsprogs-defaults") { 16 cflags = [ 17 "-Wall", 18 "-Werror", 19 ] 20} 21config("libext2-headers") { 22 include_dirs = [ "//third_party/e2fsprogs/lib" ] 23} 24ohos_shared_library("libext2_e2p") { 25 sources = [ 26 "encoding.c", 27 "feature.c", 28 "fgetflags.c", 29 "fgetproject.c", 30 "fgetversion.c", 31 "fsetflags.c", 32 "fsetproject.c", 33 "fsetversion.c", 34 "getflags.c", 35 "getversion.c", 36 "hashstr.c", 37 "iod.c", 38 "ljs.c", 39 "ls.c", 40 "mntopts.c", 41 "ostype.c", 42 "parse_num.c", 43 "pe.c", 44 "percent.c", 45 "pf.c", 46 "ps.c", 47 "setflags.c", 48 "setversion.c", 49 "uuid.c", 50 ] 51 include_dirs = [ "." ] 52 53 configs = [ 54 ":e2fsprogs-defaults", 55 ":libext2-headers", 56 ] 57 cflags = [ 58 "-Wno-error=attributes", 59 "-Wno-unused-parameter", 60 ] 61 install_enable = true 62 part_name = "e2fsprogs" 63 install_images = [ 64 "system", 65 "updater", 66 ] 67} 68