1/*
2 * Copyright (C) 2018 The Android Open Source Project
3 *
4 * Licensed under the Apache License, Version 2.0 (the "License");
5 * you may not use this file except in compliance with the License.
6 * You may obtain a copy of the License at
7 *
8 *      http://www.apache.org/licenses/LICENSE-2.0
9 *
10 * Unless required by applicable law or agreed to in writing, software
11 * distributed under the License is distributed on an "AS IS" BASIS,
12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 * See the License for the specific language governing permissions and
14 * limitations under the License.
15 */
16
17package {
18    // http://go/android-license-faq
19    // A large-scale-change added 'default_applicable_licenses' to import
20    // the below license kinds from "system_sepolicy_license":
21    //   SPDX-license-identifier-Apache-2.0
22    default_applicable_licenses: ["system_sepolicy_license"],
23}
24
25cc_defaults {
26    name: "sepolicy_tools_defaults",
27    cflags: [
28        "-Wall",
29        "-Werror",
30    ],
31    static_libs: ["libsepol"],
32    stl: "none",
33}
34
35cc_binary_host {
36    name: "checkseapp",
37    defaults: ["sepolicy_tools_defaults"],
38    srcs: ["check_seapp.c"],
39    whole_static_libs: ["libpcre2"],
40    cflags: ["-DLINK_SEPOL_STATIC"],
41}
42
43cc_binary_host {
44    name: "checkfc",
45    defaults: ["sepolicy_tools_defaults"],
46    srcs: ["checkfc.c"],
47    static_libs: ["libselinux"],
48}
49
50cc_binary_host {
51    name: "sepolicy-check",
52    defaults: ["sepolicy_tools_defaults"],
53    srcs: ["sepolicy-check.c"],
54}
55
56cc_binary_host {
57    name: "version_policy",
58    defaults: ["sepolicy_tools_defaults"],
59    srcs: ["version_policy.c"],
60}
61
62cc_binary {
63    name: "seamendc",
64    defaults: ["sepolicy_tools_defaults"],
65    srcs: ["seamendc.c"],
66    host_supported: true,
67}
68
69python_binary_host {
70    name: "insertkeys",
71    srcs: ["insertkeys.py"],
72}
73
74python_binary_host {
75    name: "sepolicy_generate_compat",
76    srcs: ["sepolicy_generate_compat.py"],
77    libs: [
78        "mini_cil_parser",
79        "pysepolwrap",
80    ],
81    data: [":libsepolwrap"],
82}
83
84python_binary_host {
85    name: "fuzzer_bindings_check",
86    srcs: ["fuzzer_bindings_check.py"],
87}
88