1package { 2 default_applicable_licenses: ["external_gptfdisk_license"], 3} 4 5// Added automatically by a large-scale-change that took the approach of 6// 'apply every license found to every target'. While this makes sure we respect 7// every license restriction, it may not be entirely correct. 8// 9// e.g. GPL in an MIT project might only apply to the contrib/ directory. 10// 11// Please consider splitting the single license below into multiple licenses, 12// taking care not to lose any license_kind information, and overriding the 13// default license using the 'licenses: [...]' property on targets as needed. 14// 15// For unused files, consider creating a 'fileGroup' with "//visibility:private" 16// to attach the license to, and including a comment whether the files may be 17// used in the current project. 18// See: http://go/android-license-faq 19license { 20 name: "external_gptfdisk_license", 21 visibility: [":__subpackages__"], 22 license_kinds: [ 23 "SPDX-license-identifier-GPL", 24 "SPDX-license-identifier-GPL-2.0", 25 "SPDX-license-identifier-LGPL", 26 ], 27 license_text: [ 28 "COPYING", 29 ], 30} 31 32cc_defaults { 33 name: "gptfdisk_default_flags", 34 cflags: [ 35 "-Wno-unused-parameter", 36 "-Wno-pragma-pack", 37 "-Werror", 38 "-fPIC", 39 ], 40 target: { 41 darwin: { 42 cflags: [ 43 "-D_FILE_OFFSET_BITS=64", 44 "-Doff64_t=off_t", 45 ], 46 }, 47 }, 48} 49 50cc_binary { 51 name: "sgdisk", 52 defaults: ["gptfdisk_default_flags"], 53 host_supported: true, 54 55 srcs: [ 56 "sgdisk.cc", 57 ], 58 59 shared_libs: ["libext2_uuid"], 60 static_libs: ["libgptf"], 61} 62 63lib_common_srcs = [ 64 "gptcl.cc", 65 "crc32.cc", 66 "support.cc", 67 "guid.cc", 68 "gptpart.cc", 69 "mbrpart.cc", 70 "basicmbr.cc", 71 "mbr.cc", 72 "gpt.cc", 73 "bsd.cc", 74 "parttypes.cc", 75 "attributes.cc", 76 "diskio.cc", 77 "android_popt.cc", 78] 79 80cc_library_static { 81 name: "libgptf", 82 defaults: ["gptfdisk_default_flags"], 83 host_supported: true, 84 85 export_include_dirs: ["."], 86 srcs: lib_common_srcs + ["diskio-unix.cc"], 87 88 shared_libs: ["libext2_uuid"], 89} 90 91cc_library_static { 92 name: "libgptf_fuzzer_lib", 93 defaults: ["gptfdisk_default_flags"], 94 host_supported: true, 95 96 export_include_dirs: ["."], 97 srcs: lib_common_srcs + ["diskio-heap.cc"], 98 cflags: ["-DENABLE_HEAP_DISKIO"], 99 100 shared_libs: ["libext2_uuid"], 101} 102