1# Copyright (c) 2022 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 as published by 5# the Free Software Foundation, either version 2 of the License, or 6# (at your option) any later version. 7# 8# This program is distributed in the hope that it will be useful, 9# but WITHOUT ANY WARRANTY; without even the implied warranty of 10# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 11# GNU General Public License for more details. 12# 13# You should have received a copy of the GNU General Public License along 14# with this program; if not, write to the Free Software Foundation, Inc., 15# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. 16 17import("//build/ohos.gni") 18 19group("exfatprogs") { 20 deps = [ 21 ":exfatlabel", 22 ":fsck.exfat", 23 ":mkfs.exfat", 24 ] 25} 26 27config("exfat-defaults") { 28 cflags = [ 29 "-std=gnu99", 30 "-Wno-error", 31 "-D_FILE_OFFSET_BITS=64", 32 "-DPACKAGE=\"exfatprogs\"", 33 "-DVERSION=\"1.1.3\"", 34 ] 35 include_dirs = [ 36 "dump", 37 "fsck", 38 "include", 39 "label", 40 "mkfs", 41 "tune", 42 ] 43} 44 45ohos_shared_library("libexfat") { 46 configs = [ ":exfat-defaults" ] 47 sources = [ "lib/libexfat.c" ] 48 49 include_dirs = [ "./libexfat" ] 50 51 deps = [] 52 install_enable = true 53 subsystem_name = "thirdparty" 54 part_name = "exfatprogs" 55 install_images = [ "system" ] 56} 57 58################################################### 59##Build mkfs.exfat 60ohos_executable("mkfs.exfat") { 61 configs = [ ":exfat-defaults" ] 62 sources = [ 63 "mkfs/mkfs.c", 64 "mkfs/upcase.c", 65 ] 66 67 include_dirs = [ 68 "./lib", 69 "./mkfs", 70 ] 71 72 deps = [ ":libexfat" ] 73 install_enable = true 74 subsystem_name = "thirdparty" 75 part_name = "exfatprogs" 76 install_images = [ "system" ] 77} 78 79################################################### 80##Build fsck.exfat 81ohos_executable("fsck.exfat") { 82 configs = [ ":exfat-defaults" ] 83 sources = [ 84 "fsck/de_iter.c", 85 "fsck/fsck.c", 86 "fsck/repair.c", 87 ] 88 89 include_dirs = [ 90 "./lib", 91 "./mkfs", 92 "./fsck", 93 ] 94 95 deps = [ ":libexfat" ] 96 install_enable = true 97 subsystem_name = "thirdparty" 98 part_name = "exfatprogs" 99 install_images = [ "system" ] 100} 101 102################################################### 103##Build dump.exfat 104ohos_executable("dump.exfat") { 105 configs = [ ":exfat-defaults" ] 106 sources = [ "dump/dump.c" ] 107 108 include_dirs = [ 109 "./lib", 110 "./mkfs", 111 "./fsck", 112 "./dump", 113 ] 114 115 deps = [ ":libexfat" ] 116 subsystem_name = "thirdparty" 117 part_name = "exfatprogs" 118} 119 120################################################### 121##Build exfatlabel 122ohos_executable("exfatlabel") { 123 configs = [ ":exfat-defaults" ] 124 sources = [ "label/label.c" ] 125 126 include_dirs = [ 127 "./lib", 128 "./mkfs", 129 "./fsck", 130 "./label", 131 ] 132 133 deps = [ ":libexfat" ] 134 subsystem_name = "thirdparty" 135 part_name = "exfatprogs" 136} 137 138################################################### 139##Build tune.exfat 140ohos_executable("tune.exfat") { 141 configs = [ ":exfat-defaults" ] 142 sources = [ "tune/tune.c" ] 143 144 include_dirs = [ 145 "./lib", 146 "./mkfs", 147 "./fsck", 148 "./label", 149 ] 150 151 deps = [ ":libexfat" ] 152 subsystem_name = "thirdparty" 153 part_name = "exfatprogs" 154} 155