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} 24 25ohos_shared_library("libext2_quota") { 26 sources = [ 27 "dict.c", 28 "mkquota.c", 29 "parse_qtype.c", 30 "plausible.c", 31 "prof_err.c", 32 "profile.c", 33 "profile_helpers.c", 34 "quotaio.c", 35 "quotaio_tree.c", 36 "quotaio_v2.c", 37 ] 38 include_dirs = [ "." ] 39 configs = [ 40 ":e2fsprogs-defaults", 41 ":libext2-headers", 42 ] 43 deps = [ 44 "//third_party/e2fsprogs/lib/blkid:libext2_blkid", 45 "//third_party/e2fsprogs/lib/et:libext2_com_err", 46 "//third_party/e2fsprogs/lib/ext2fs:libext2fs", 47 ] 48 install_enable = true 49 part_name = "e2fsprogs" 50 install_images = [ 51 "system", 52 "updater", 53 ] 54} 55 56ohos_static_library("libext2_profile") { 57 sources = [ 58 "prof_err.c", 59 "profile.c", 60 ] 61 include_dirs = [ "." ] 62 configs = [ 63 ":libext2-headers", 64 ":e2fsprogs-defaults", 65 ] 66 67 deps = [ "//third_party/e2fsprogs/lib/et:libext2_com_err" ] 68} 69 70ohos_static_library("libext2_support") { 71 sources = [ "cstring.c" ] 72 include_dirs = [ "." ] 73 configs = [ 74 ":e2fsprogs-defaults", 75 ":libext2-headers", 76 ] 77} 78