1// Copyright (C) 2017 The Android Open Source Project
2//
3// Licensed under the Apache License, Version 2.0 (the "License");
4// you may not use this file except in compliance with the License.
5// You may obtain a copy of the License at
6//
7//      http://www.apache.org/licenses/LICENSE-2.0
8//
9// Unless required by applicable law or agreed to in writing, software
10// distributed under the License is distributed on an "AS IS" BASIS,
11// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12// See the License for the specific language governing permissions and
13// limitations under the License.
14
15//##################################################
16package {
17    // See: http://go/android-license-faq
18    // A large-scale-change added 'default_applicable_licenses' to import
19    // all of the 'license_kinds' from "system_libufdt_license"
20    // to get the below license kinds:
21    //   SPDX-license-identifier-Apache-2.0
22    default_applicable_licenses: ["system_libufdt_license"],
23}
24
25cc_binary_host {
26    name: "mkdtimg",
27    cflags: [
28        "-Wall",
29        "-Werror",
30    ],
31    target: {
32        darwin: {
33            cflags: ["-Wno-error=format"],
34        },
35    },
36    srcs: [
37        "mkdtimg.c",
38        "mkdtimg_cfg_create.c",
39        "mkdtimg_core.c",
40        "mkdtimg_create.c",
41        "mkdtimg_dump.c",
42        "dt_table.c",
43    ],
44    static_libs: [
45        "libfdt",
46        "libufdt_sysdeps",
47    ],
48    required: ["dtc"],
49    stl: "none",
50    dist: {
51        targets: ["dist_files"],
52        dir: "libufdt",
53    },
54}
55
56//##################################################
57python_binary_host {
58    name: "mkdtboimg.py",
59    main: "mkdtboimg.py",
60    srcs: ["mkdtboimg.py"],
61    version: {
62        py2: {
63            embedded_launcher: true,
64            enabled: true,
65        },
66        py3: {
67            enabled: false,
68        },
69    },
70}
71
72//##################################################
73// TODO(b/153848038): Remove once we can use python binary as data for java_test_host
74filegroup {
75    name: "mkdtboimg",
76    srcs: ["mkdtboimg.py"],
77}
78