Bob Badour | d69ad69 | 2021-02-16 19:02:14 -0800 | [diff] [blame] | 1 | package { |
| 2 | default_applicable_licenses: ["system_core_toolbox_license"], |
| 3 | } |
| 4 | |
| 5 | // Added automatically by a large-scale-change |
| 6 | // See: http://go/android-license-faq |
| 7 | license { |
| 8 | name: "system_core_toolbox_license", |
| 9 | visibility: [":__subpackages__"], |
| 10 | license_kinds: [ |
| 11 | "SPDX-license-identifier-Apache-2.0", |
| 12 | ], |
| 13 | license_text: [ |
| 14 | "NOTICE", |
| 15 | ], |
| 16 | } |
| 17 | |
Dan Willemsen | a852f95 | 2018-01-08 13:50:55 -0800 | [diff] [blame] | 18 | cc_defaults { |
| 19 | name: "toolbox_defaults", |
Dan Willemsen | a852f95 | 2018-01-08 13:50:55 -0800 | [diff] [blame] | 20 | cflags: [ |
| 21 | "-Werror", |
| 22 | "-Wno-unused-parameter", |
| 23 | "-Wno-unused-const-variable", |
Elliott Hughes | 16b82b7 | 2018-01-22 16:15:55 -0800 | [diff] [blame] | 24 | "-D_FILE_OFFSET_BITS=64", |
Yifan Hong | 49641ba | 2017-05-22 18:08:02 -0700 | [diff] [blame] | 25 | ], |
Dan Willemsen | a852f95 | 2018-01-08 13:50:55 -0800 | [diff] [blame] | 26 | } |
| 27 | |
| 28 | genrule { |
Dan Willemsen | a852f95 | 2018-01-08 13:50:55 -0800 | [diff] [blame] | 29 | name: "toolbox_input_labels", |
| 30 | tool_files: ["generate-input.h-labels.py"], |
| 31 | cmd: "$(location) $(in) >$(out)", |
| 32 | srcs: [":kernel_input_headers"], |
| 33 | out: ["input.h-labels.h"], |
| 34 | } |
| 35 | |
Tom Cherry | 6fb3dca | 2018-01-09 13:20:08 -0800 | [diff] [blame] | 36 | cc_defaults { |
| 37 | name: "toolbox_binary_defaults", |
Dan Willemsen | a852f95 | 2018-01-08 13:50:55 -0800 | [diff] [blame] | 38 | defaults: ["toolbox_defaults"], |
| 39 | srcs: [ |
| 40 | "toolbox.c", |
| 41 | "getevent.c", |
Tom Cherry | 91094e0 | 2018-01-02 11:50:16 -0800 | [diff] [blame] | 42 | "getprop.cpp", |
Steve Muckle | 64a5534 | 2019-07-30 11:53:15 -0700 | [diff] [blame] | 43 | "modprobe.cpp", |
Tom Cherry | 65a1ee8 | 2019-06-05 10:26:54 -0700 | [diff] [blame] | 44 | "setprop.cpp", |
| 45 | "start.cpp", |
Dan Willemsen | a852f95 | 2018-01-08 13:50:55 -0800 | [diff] [blame] | 46 | ], |
| 47 | generated_headers: [ |
Dan Willemsen | a852f95 | 2018-01-08 13:50:55 -0800 | [diff] [blame] | 48 | "toolbox_input_labels", |
| 49 | ], |
Dan Willemsen | a852f95 | 2018-01-08 13:50:55 -0800 | [diff] [blame] | 50 | shared_libs: [ |
Tom Cherry | 91094e0 | 2018-01-02 11:50:16 -0800 | [diff] [blame] | 51 | "libbase", |
Dan Willemsen | a852f95 | 2018-01-08 13:50:55 -0800 | [diff] [blame] | 52 | ], |
Steve Muckle | 64a5534 | 2019-07-30 11:53:15 -0700 | [diff] [blame] | 53 | static_libs: [ |
| 54 | "libmodprobe", |
| 55 | "libpropertyinfoparser", |
| 56 | ], |
Dan Willemsen | a852f95 | 2018-01-08 13:50:55 -0800 | [diff] [blame] | 57 | |
| 58 | symlinks: [ |
Dan Willemsen | a852f95 | 2018-01-08 13:50:55 -0800 | [diff] [blame] | 59 | "getevent", |
Tom Cherry | 91094e0 | 2018-01-02 11:50:16 -0800 | [diff] [blame] | 60 | "getprop", |
Steve Muckle | 64a5534 | 2019-07-30 11:53:15 -0700 | [diff] [blame] | 61 | "modprobe", |
Tom Cherry | 65a1ee8 | 2019-06-05 10:26:54 -0700 | [diff] [blame] | 62 | "setprop", |
| 63 | "start", |
| 64 | "stop", |
Dan Willemsen | a852f95 | 2018-01-08 13:50:55 -0800 | [diff] [blame] | 65 | ], |
| 66 | } |
| 67 | |
Tom Cherry | 6fb3dca | 2018-01-09 13:20:08 -0800 | [diff] [blame] | 68 | cc_binary { |
| 69 | name: "toolbox", |
| 70 | defaults: ["toolbox_binary_defaults"], |
Jiyong Park | 011ee12 | 2018-05-29 16:41:30 +0900 | [diff] [blame] | 71 | recovery_available: true, |
Tom Cherry | 6fb3dca | 2018-01-09 13:20:08 -0800 | [diff] [blame] | 72 | } |
| 73 | |
| 74 | cc_binary { |
| 75 | name: "toolbox_vendor", |
| 76 | stem: "toolbox", |
| 77 | vendor: true, |
| 78 | defaults: ["toolbox_binary_defaults"], |
| 79 | } |