Dan Willemsen | d0dbccb | 2016-08-01 23:43:42 -0700 | [diff] [blame] | 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 | |
Chih-Hung Hsieh | e39c530 | 2017-09-28 13:39:39 -0700 | [diff] [blame] | 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 | |
Dan Willemsen | d0dbccb | 2016-08-01 23:43:42 -0700 | [diff] [blame] | 26 | cc_library { |
| 27 | name: "libcap", |
Dan Willemsen | d0dbccb | 2016-08-01 23:43:42 -0700 | [diff] [blame] | 28 | host_supported: true, |
Jiyong Park | 9c58810 | 2017-04-25 16:56:25 +0900 | [diff] [blame] | 29 | vendor_available: true, |
Jiyong Park | a63cdda | 2018-05-24 14:08:14 +0900 | [diff] [blame] | 30 | recovery_available: true, |
Justin Yun | d05a95e | 2017-07-24 15:19:44 +0900 | [diff] [blame] | 31 | vndk: { |
| 32 | enabled: true, |
| 33 | }, |
Chih-Hung Hsieh | e39c530 | 2017-09-28 13:39:39 -0700 | [diff] [blame] | 34 | defaults: ["libcap_defaults"], |
Dan Willemsen | d0dbccb | 2016-08-01 23:43:42 -0700 | [diff] [blame] | 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, |
Tom Cherry | 64dcb22 | 2017-05-09 16:38:39 -0700 | [diff] [blame] | 51 | }, |
| 52 | linux_bionic: { |
| 53 | enabled: true, |
| 54 | }, |
| 55 | }, |
Jiyong Park | 2f878c6 | 2020-04-08 22:36:47 +0900 | [diff] [blame] | 56 | apex_available: [ |
Jooyung Han | bb24439 | 2020-04-16 18:48:27 +0900 | [diff] [blame] | 57 | "//apex_available:platform", |
| 58 | "com.android.adbd", |
| 59 | "com.android.media.swcodec", |
Jiyong Park | 2f878c6 | 2020-04-08 22:36:47 +0900 | [diff] [blame] | 60 | ], |
Jooyung Han | bb24439 | 2020-04-16 18:48:27 +0900 | [diff] [blame] | 61 | min_sdk_version: "29", |
Dan Willemsen | d0dbccb | 2016-08-01 23:43:42 -0700 | [diff] [blame] | 62 | } |
liminghao | 5e044e0 | 2016-11-15 16:28:23 +0800 | [diff] [blame] | 63 | |
| 64 | cc_binary { |
| 65 | name: "getcap", |
liminghao | 5e044e0 | 2016-11-15 16:28:23 +0800 | [diff] [blame] | 66 | |
| 67 | srcs: ["progs/getcap.c"], |
| 68 | |
Chih-Hung Hsieh | e39c530 | 2017-09-28 13:39:39 -0700 | [diff] [blame] | 69 | defaults: ["libcap_defaults"], |
liminghao | 5e044e0 | 2016-11-15 16:28:23 +0800 | [diff] [blame] | 70 | |
| 71 | static_libs: [ |
| 72 | "libcap", |
| 73 | ], |
| 74 | } |
| 75 | |
| 76 | cc_binary { |
| 77 | name: "setcap", |
liminghao | 5e044e0 | 2016-11-15 16:28:23 +0800 | [diff] [blame] | 78 | |
| 79 | srcs: ["progs/setcap.c"], |
| 80 | |
Chih-Hung Hsieh | e39c530 | 2017-09-28 13:39:39 -0700 | [diff] [blame] | 81 | defaults: ["libcap_defaults"], |
liminghao | 5e044e0 | 2016-11-15 16:28:23 +0800 | [diff] [blame] | 82 | |
| 83 | static_libs: [ |
| 84 | "libcap", |
| 85 | ], |
| 86 | } |