Dan Willemsen | a852f95 | 2018-01-08 13:50:55 -0800 | [diff] [blame] | 1 | cc_defaults { |
| 2 | name: "toolbox_defaults", |
Dan Willemsen | a852f95 | 2018-01-08 13:50:55 -0800 | [diff] [blame] | 3 | cflags: [ |
| 4 | "-Werror", |
| 5 | "-Wno-unused-parameter", |
| 6 | "-Wno-unused-const-variable", |
Elliott Hughes | 16b82b7 | 2018-01-22 16:15:55 -0800 | [diff] [blame] | 7 | "-D_FILE_OFFSET_BITS=64", |
Yifan Hong | 49641ba | 2017-05-22 18:08:02 -0700 | [diff] [blame] | 8 | ], |
Dan Willemsen | a852f95 | 2018-01-08 13:50:55 -0800 | [diff] [blame] | 9 | } |
| 10 | |
| 11 | genrule { |
Dan Willemsen | a852f95 | 2018-01-08 13:50:55 -0800 | [diff] [blame] | 12 | name: "toolbox_input_labels", |
| 13 | tool_files: ["generate-input.h-labels.py"], |
| 14 | cmd: "$(location) $(in) >$(out)", |
| 15 | srcs: [":kernel_input_headers"], |
| 16 | out: ["input.h-labels.h"], |
| 17 | } |
| 18 | |
Tom Cherry | 6fb3dca | 2018-01-09 13:20:08 -0800 | [diff] [blame] | 19 | cc_defaults { |
| 20 | name: "toolbox_binary_defaults", |
Dan Willemsen | a852f95 | 2018-01-08 13:50:55 -0800 | [diff] [blame] | 21 | defaults: ["toolbox_defaults"], |
| 22 | srcs: [ |
| 23 | "toolbox.c", |
| 24 | "getevent.c", |
Tom Cherry | 91094e0 | 2018-01-02 11:50:16 -0800 | [diff] [blame] | 25 | "getprop.cpp", |
Steve Muckle | 64a5534 | 2019-07-30 11:53:15 -0700 | [diff] [blame] | 26 | "modprobe.cpp", |
Tom Cherry | 65a1ee8 | 2019-06-05 10:26:54 -0700 | [diff] [blame] | 27 | "setprop.cpp", |
| 28 | "start.cpp", |
Dan Willemsen | a852f95 | 2018-01-08 13:50:55 -0800 | [diff] [blame] | 29 | ], |
| 30 | generated_headers: [ |
Dan Willemsen | a852f95 | 2018-01-08 13:50:55 -0800 | [diff] [blame] | 31 | "toolbox_input_labels", |
| 32 | ], |
Dan Willemsen | a852f95 | 2018-01-08 13:50:55 -0800 | [diff] [blame] | 33 | shared_libs: [ |
Tom Cherry | 91094e0 | 2018-01-02 11:50:16 -0800 | [diff] [blame] | 34 | "libbase", |
Dan Willemsen | a852f95 | 2018-01-08 13:50:55 -0800 | [diff] [blame] | 35 | ], |
Steve Muckle | 64a5534 | 2019-07-30 11:53:15 -0700 | [diff] [blame] | 36 | static_libs: [ |
| 37 | "libmodprobe", |
| 38 | "libpropertyinfoparser", |
| 39 | ], |
Dan Willemsen | a852f95 | 2018-01-08 13:50:55 -0800 | [diff] [blame] | 40 | |
| 41 | symlinks: [ |
Dan Willemsen | a852f95 | 2018-01-08 13:50:55 -0800 | [diff] [blame] | 42 | "getevent", |
Tom Cherry | 91094e0 | 2018-01-02 11:50:16 -0800 | [diff] [blame] | 43 | "getprop", |
Steve Muckle | 64a5534 | 2019-07-30 11:53:15 -0700 | [diff] [blame] | 44 | "modprobe", |
Tom Cherry | 65a1ee8 | 2019-06-05 10:26:54 -0700 | [diff] [blame] | 45 | "setprop", |
| 46 | "start", |
| 47 | "stop", |
Dan Willemsen | a852f95 | 2018-01-08 13:50:55 -0800 | [diff] [blame] | 48 | ], |
| 49 | } |
| 50 | |
Tom Cherry | 6fb3dca | 2018-01-09 13:20:08 -0800 | [diff] [blame] | 51 | cc_binary { |
| 52 | name: "toolbox", |
| 53 | defaults: ["toolbox_binary_defaults"], |
Jiyong Park | 011ee12 | 2018-05-29 16:41:30 +0900 | [diff] [blame] | 54 | recovery_available: true, |
Tom Cherry | 6fb3dca | 2018-01-09 13:20:08 -0800 | [diff] [blame] | 55 | } |
| 56 | |
| 57 | cc_binary { |
| 58 | name: "toolbox_vendor", |
| 59 | stem: "toolbox", |
| 60 | vendor: true, |
| 61 | defaults: ["toolbox_binary_defaults"], |
| 62 | } |