1# Copyright (c) 2021 Huawei Device Co., Ltd. 2# 3# This program is free software; you can redistribute it and/or modify 4# it under the terms of the GNU General Public License version 2 as 5# published by the Free Software Foundation. 6 7import("//build/ohos.gni") 8 9config("f2fs-defaults") { 10 cflags = [ 11 "-std=gnu89", 12 "-Wno-implicit-function-declaration", 13 "-Wno-pointer-sign", 14 ] 15} 16 17################################################### 18##Build f2fscrypt 19ohos_executable("f2fscrypt") { 20 configs = [ ":f2fs-defaults" ] 21 sources = [ 22 "f2fscrypt.c", 23 "sha512.c", 24 ] 25 include_dirs = [ 26 ".", 27 "//third_party/f2fs-tools", 28 "//third_party/f2fs-tools/include", 29 "//third_party/e2fsprogs/e2fsprogs/lib/uuid", 30 ] 31 cflags = [ "-Wno-error=format-extra-args" ] 32 33 deps = [ "//third_party/e2fsprogs:libext2_uuid" ] 34 35 install_enable = true 36 subsystem_name = "thirdparty" 37 part_name = "f2fs-tools" 38 install_images = [ "system" ] 39} 40 41################################################### 42##Build f2fstat 43ohos_executable("f2fstat") { 44 configs = [ ":f2fs-defaults" ] 45 sources = [ "f2fstat.c" ] 46 47 include_dirs = [ "." ] 48 cflags = [ 49 "-Wno-error=format", 50 "-Wno-error=type-limits", 51 "-Wno-format-extra-args", 52 ] 53 54 deps = [] 55 56 install_enable = true 57 subsystem_name = "thirdparty" 58 part_name = "f2fs-tools" 59 install_images = [ "system" ] 60} 61 62################################################### 63##Build fibmap.f2fs 64ohos_executable("fibmap.f2fs") { 65 configs = [ ":f2fs-defaults" ] 66 sources = [ "fibmap.c" ] 67 68 include_dirs = [ 69 ".", 70 "//third_party/f2fs-tools", 71 "//third_party/f2fs-tools/include", 72 "//third_party/f2fs-tools/lib", 73 ] 74 75 cflags = [ 76 "-Wno-error=format", 77 "-Wno-error=type-limits", 78 "-Wno-format-extra-args", 79 ] 80 81 deps = [ "//third_party/f2fs-tools/lib:libf2fs" ] 82 83 defines = [ "HAVE_CONFIG_H" ] 84 85 install_enable = true 86 subsystem_name = "thirdparty" 87 part_name = "f2fs-tools" 88 install_images = [ "system" ] 89} 90