blob: 4ca5f5a0edb412b7a168e671106a660e8a36e2c4 [file] [log] [blame]
Dan Willemsena852f952018-01-08 13:50:55 -08001cc_defaults {
2 name: "toolbox_defaults",
Dan Willemsena852f952018-01-08 13:50:55 -08003 cflags: [
4 "-Werror",
5 "-Wno-unused-parameter",
6 "-Wno-unused-const-variable",
Elliott Hughes16b82b72018-01-22 16:15:55 -08007 "-D_FILE_OFFSET_BITS=64",
Yifan Hong49641ba2017-05-22 18:08:02 -07008 ],
Dan Willemsena852f952018-01-08 13:50:55 -08009}
10
11genrule {
Dan Willemsena852f952018-01-08 13:50:55 -080012 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 Cherry6fb3dca2018-01-09 13:20:08 -080019cc_defaults {
20 name: "toolbox_binary_defaults",
Dan Willemsena852f952018-01-08 13:50:55 -080021 defaults: ["toolbox_defaults"],
Tom Cherry91094e02018-01-02 11:50:16 -080022 cpp_std: "experimental",
Dan Willemsena852f952018-01-08 13:50:55 -080023 srcs: [
24 "toolbox.c",
25 "getevent.c",
Tom Cherry91094e02018-01-02 11:50:16 -080026 "getprop.cpp",
Steve Muckle64a55342019-07-30 11:53:15 -070027 "modprobe.cpp",
Tom Cherry65a1ee82019-06-05 10:26:54 -070028 "setprop.cpp",
29 "start.cpp",
Dan Willemsena852f952018-01-08 13:50:55 -080030 ],
31 generated_headers: [
Dan Willemsena852f952018-01-08 13:50:55 -080032 "toolbox_input_labels",
33 ],
Dan Willemsena852f952018-01-08 13:50:55 -080034 shared_libs: [
Tom Cherry91094e02018-01-02 11:50:16 -080035 "libbase",
Dan Willemsena852f952018-01-08 13:50:55 -080036 ],
Steve Muckle64a55342019-07-30 11:53:15 -070037 static_libs: [
38 "libmodprobe",
39 "libpropertyinfoparser",
40 ],
Dan Willemsena852f952018-01-08 13:50:55 -080041
42 symlinks: [
Dan Willemsena852f952018-01-08 13:50:55 -080043 "getevent",
Tom Cherry91094e02018-01-02 11:50:16 -080044 "getprop",
Steve Muckle64a55342019-07-30 11:53:15 -070045 "modprobe",
Tom Cherry65a1ee82019-06-05 10:26:54 -070046 "setprop",
47 "start",
48 "stop",
Dan Willemsena852f952018-01-08 13:50:55 -080049 ],
50}
51
Tom Cherry6fb3dca2018-01-09 13:20:08 -080052cc_binary {
53 name: "toolbox",
54 defaults: ["toolbox_binary_defaults"],
Jiyong Park011ee122018-05-29 16:41:30 +090055 recovery_available: true,
Tom Cherry6fb3dca2018-01-09 13:20:08 -080056}
57
58cc_binary {
59 name: "toolbox_vendor",
60 stem: "toolbox",
61 vendor: true,
62 defaults: ["toolbox_binary_defaults"],
63}