blob: 8594ec40350227a5ad8fb0fcbe7a439eac373638 [file] [log] [blame]
Bob Badourd69ad692021-02-16 19:02:14 -08001package {
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
7license {
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 Willemsena852f952018-01-08 13:50:55 -080018cc_defaults {
19 name: "toolbox_defaults",
Dan Willemsena852f952018-01-08 13:50:55 -080020 cflags: [
21 "-Werror",
22 "-Wno-unused-parameter",
23 "-Wno-unused-const-variable",
Elliott Hughes16b82b72018-01-22 16:15:55 -080024 "-D_FILE_OFFSET_BITS=64",
Yifan Hong49641ba2017-05-22 18:08:02 -070025 ],
Dan Willemsena852f952018-01-08 13:50:55 -080026}
27
28genrule {
Dan Willemsena852f952018-01-08 13:50:55 -080029 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 Cherry6fb3dca2018-01-09 13:20:08 -080036cc_defaults {
37 name: "toolbox_binary_defaults",
Dan Willemsena852f952018-01-08 13:50:55 -080038 defaults: ["toolbox_defaults"],
39 srcs: [
40 "toolbox.c",
41 "getevent.c",
Tom Cherry91094e02018-01-02 11:50:16 -080042 "getprop.cpp",
Steve Muckle64a55342019-07-30 11:53:15 -070043 "modprobe.cpp",
Tom Cherry65a1ee82019-06-05 10:26:54 -070044 "setprop.cpp",
45 "start.cpp",
Dan Willemsena852f952018-01-08 13:50:55 -080046 ],
47 generated_headers: [
Dan Willemsena852f952018-01-08 13:50:55 -080048 "toolbox_input_labels",
49 ],
Dan Willemsena852f952018-01-08 13:50:55 -080050 shared_libs: [
Tom Cherry91094e02018-01-02 11:50:16 -080051 "libbase",
Dan Willemsena852f952018-01-08 13:50:55 -080052 ],
Steve Muckle64a55342019-07-30 11:53:15 -070053 static_libs: [
54 "libmodprobe",
55 "libpropertyinfoparser",
56 ],
Dan Willemsena852f952018-01-08 13:50:55 -080057
58 symlinks: [
Dan Willemsena852f952018-01-08 13:50:55 -080059 "getevent",
Tom Cherry91094e02018-01-02 11:50:16 -080060 "getprop",
Steve Muckle64a55342019-07-30 11:53:15 -070061 "modprobe",
Tom Cherry65a1ee82019-06-05 10:26:54 -070062 "setprop",
63 "start",
64 "stop",
Dan Willemsena852f952018-01-08 13:50:55 -080065 ],
66}
67
Tom Cherry6fb3dca2018-01-09 13:20:08 -080068cc_binary {
69 name: "toolbox",
70 defaults: ["toolbox_binary_defaults"],
Jiyong Park011ee122018-05-29 16:41:30 +090071 recovery_available: true,
Tom Cherry6fb3dca2018-01-09 13:20:08 -080072}
73
74cc_binary {
75 name: "toolbox_vendor",
76 stem: "toolbox",
77 vendor: true,
78 defaults: ["toolbox_binary_defaults"],
79}