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 as published by 5# the Free Software Foundation; either version 2 of the License, or 6# (at your option) any later version. 7 8import("//build/ohos.gni") 9import("//build/ohos/ndk/ndk.gni") 10 11config("gptdisk_config") { 12 include_dirs = [ 13 ".", 14 "//third_party/e2fsprogs/e2fsprogs/lib/", 15 "//third_party/popt/", 16 ] 17 cflags_cc = [ 18 "-Wall", 19 "-D_FILE_OFFSET_BITS=64", 20 "-Wno-unused-parameter", 21 "-Wno-pragma-pack", 22 "-Wno-error=header-hygiene", 23 "-Wno-register", 24 "-Wno-unused-but-set-variable", 25 ] 26} 27ohos_executable("sgdisk") { 28 install_enable = true 29 sources = [ 30 "attributes.cc", 31 "basicmbr.cc", 32 "bsd.cc", 33 "crc32.cc", 34 "diskio-unix.cc", 35 "diskio.cc", 36 "gpt.cc", 37 "gptcl.cc", 38 "gptpart.cc", 39 "guid.cc", 40 "mbr.cc", 41 "mbrpart.cc", 42 "parttypes.cc", 43 "sgdisk.cc", 44 "support.cc", 45 ] 46 public_configs = [ ":gptdisk_config" ] 47 deps = [ 48 "//third_party/e2fsprogs:libext2_uuid", 49 "//third_party/popt:popt_static", 50 ] 51 subsystem_name = "thirdparty" 52 part_name = "gptfdisk" 53 install_images = [ "system" ] 54} 55