Dan Willemsen | b9548b7 | 2018-10-31 10:17:02 -0700 | [diff] [blame] | 1 | // Copyright 2016 The Android Open Source Project |
Bob Badour | 88ad004 | 2021-02-12 15:22:26 -0800 | [diff] [blame] | 2 | package { |
| 3 | default_applicable_licenses: ["external_dtc_license"], |
| 4 | } |
| 5 | |
| 6 | // Added automatically by a large-scale-change that took the approach of |
| 7 | // 'apply every license found to every target'. While this makes sure we respect |
| 8 | // every license restriction, it may not be entirely correct. |
| 9 | // |
| 10 | // e.g. GPL in an MIT project might only apply to the contrib/ directory. |
| 11 | // |
| 12 | // Please consider splitting the single license below into multiple licenses, |
| 13 | // taking care not to lose any license_kind information, and overriding the |
| 14 | // default license using the 'licenses: [...]' property on targets as needed. |
| 15 | // |
| 16 | // For unused files, consider creating a 'fileGroup' with "//visibility:private" |
| 17 | // to attach the license to, and including a comment whether the files may be |
| 18 | // used in the current project. |
| 19 | // |
| 20 | // large-scale-change included anything that looked like it might be a license |
| 21 | // text as a license_text. e.g. LICENSE, NOTICE, COPYING etc. |
| 22 | // |
| 23 | // Please consider removing redundant or irrelevant files from 'license_text:'. |
| 24 | // See: http://go/android-license-faq |
| 25 | license { |
| 26 | name: "external_dtc_license", |
| 27 | visibility: [":__subpackages__"], |
| 28 | license_kinds: [ |
| 29 | "SPDX-license-identifier-BSD", |
| 30 | "SPDX-license-identifier-BSD-2-Clause", |
| 31 | "SPDX-license-identifier-GPL", |
| 32 | "SPDX-license-identifier-GPL-2.0", |
| 33 | "SPDX-license-identifier-ISC", |
| 34 | "SPDX-license-identifier-LGPL", |
| 35 | "SPDX-license-identifier-LGPL-2.1", |
| 36 | ], |
| 37 | license_text: [ |
| 38 | "NOTICE", |
| 39 | "README.license", |
| 40 | ], |
| 41 | } |
| 42 | |
Martin Liu | 38bd6fa | 2019-03-19 15:37:35 +0800 | [diff] [blame] | 43 | cc_defaults { |
| 44 | name: "dt_defaults", |
Dan Willemsen | b9548b7 | 2018-10-31 10:17:02 -0700 | [diff] [blame] | 45 | cflags: [ |
| 46 | "-Wall", |
| 47 | "-Werror", |
| 48 | "-Wno-sign-compare", |
| 49 | "-Wno-missing-field-initializers", |
| 50 | "-Wno-unused-parameter", |
Steve Muckle | b734cfd | 2020-07-08 17:22:37 -0700 | [diff] [blame] | 51 | "-DNO_YAML" |
Dan Willemsen | b9548b7 | 2018-10-31 10:17:02 -0700 | [diff] [blame] | 52 | ], |
Martin Liu | 38bd6fa | 2019-03-19 15:37:35 +0800 | [diff] [blame] | 53 | |
Alistair Delva | 83534bb | 2020-07-31 10:40:06 -0700 | [diff] [blame] | 54 | shared_libs: ["libfdt"], |
Martin Liu | 38bd6fa | 2019-03-19 15:37:35 +0800 | [diff] [blame] | 55 | |
| 56 | stl: "none", |
| 57 | dist: { |
| 58 | targets: [ |
| 59 | "dist_files", |
| 60 | ], |
| 61 | dir: "dtc", |
| 62 | }, |
| 63 | } |
| 64 | |
| 65 | cc_binary_host { |
| 66 | name: "dtc", |
| 67 | defaults: ["dt_defaults"], |
Dan Willemsen | b9548b7 | 2018-10-31 10:17:02 -0700 | [diff] [blame] | 68 | srcs: [ |
| 69 | "checks.c", |
| 70 | "data.c", |
| 71 | "dtc.c", |
| 72 | "dtc-lexer.l", |
| 73 | "dtc-parser.y", |
| 74 | "flattree.c", |
| 75 | "fstree.c", |
| 76 | "livetree.c", |
| 77 | "srcpos.c", |
| 78 | "treesource.c", |
| 79 | "util.c", |
| 80 | ], |
Martin Liu | 38bd6fa | 2019-03-19 15:37:35 +0800 | [diff] [blame] | 81 | } |
Dan Willemsen | b9548b7 | 2018-10-31 10:17:02 -0700 | [diff] [blame] | 82 | |
Martin Liu | 38bd6fa | 2019-03-19 15:37:35 +0800 | [diff] [blame] | 83 | cc_binary_host { |
| 84 | name: "fdtget", |
| 85 | defaults: ["dt_defaults"], |
| 86 | srcs: [ |
| 87 | "fdtget.c", |
| 88 | "util.c", |
| 89 | ], |
Dan Willemsen | b9548b7 | 2018-10-31 10:17:02 -0700 | [diff] [blame] | 90 | } |