• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1// Copyright (C) 2015 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
15cc_library {
16    name: "libcap",
17    clang: true,
18    host_supported: true,
19    vendor_available: true,
20    vndk: {
21        enabled: true,
22    },
23
24    cflags: [
25        "-Wno-unused-parameter",
26        "-Wno-tautological-compare",
27    ],
28
29    srcs: [
30        "libcap/cap_alloc.c",
31        "libcap/cap_extint.c",
32        "libcap/cap_file.c",
33        "libcap/cap_flag.c",
34        "libcap/cap_proc.c",
35        "libcap/cap_text.c",
36    ],
37
38    local_include_dirs: ["libcap/include"],
39    export_include_dirs: ["libcap/include"],
40
41    target: {
42        darwin: {
43            enabled: false,
44        },
45        linux_bionic: {
46            enabled: true,
47        },
48    },
49}
50
51cc_binary {
52    name: "getcap",
53    clang: true,
54
55    srcs: ["progs/getcap.c"],
56
57    cflags: [
58        "-Wno-unused-parameter",
59        "-Wno-tautological-compare",
60    ],
61
62    static_libs: [
63        "libcap",
64    ],
65}
66
67cc_binary {
68    name: "setcap",
69    clang: true,
70
71    srcs: ["progs/setcap.c"],
72
73    cflags: [
74        "-Wno-unused-parameter",
75        "-Wno-tautological-compare",
76    ],
77
78    static_libs: [
79        "libcap",
80    ],
81}
82