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