blob: 320782419c2de0a73bc9c77e1e26ddb55aba82a1 [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"],
22 srcs: [
23 "toolbox.c",
24 "getevent.c",
Tom Cherry91094e02018-01-02 11:50:16 -080025 "getprop.cpp",
Steve Muckle64a55342019-07-30 11:53:15 -070026 "modprobe.cpp",
Tom Cherry65a1ee82019-06-05 10:26:54 -070027 "setprop.cpp",
28 "start.cpp",
Dan Willemsena852f952018-01-08 13:50:55 -080029 ],
30 generated_headers: [
Dan Willemsena852f952018-01-08 13:50:55 -080031 "toolbox_input_labels",
32 ],
Dan Willemsena852f952018-01-08 13:50:55 -080033 shared_libs: [
Tom Cherry91094e02018-01-02 11:50:16 -080034 "libbase",
Dan Willemsena852f952018-01-08 13:50:55 -080035 ],
Steve Muckle64a55342019-07-30 11:53:15 -070036 static_libs: [
37 "libmodprobe",
38 "libpropertyinfoparser",
39 ],
Dan Willemsena852f952018-01-08 13:50:55 -080040
41 symlinks: [
Dan Willemsena852f952018-01-08 13:50:55 -080042 "getevent",
Tom Cherry91094e02018-01-02 11:50:16 -080043 "getprop",
Steve Muckle64a55342019-07-30 11:53:15 -070044 "modprobe",
Tom Cherry65a1ee82019-06-05 10:26:54 -070045 "setprop",
46 "start",
47 "stop",
Dan Willemsena852f952018-01-08 13:50:55 -080048 ],
49}
50
Tom Cherry6fb3dca2018-01-09 13:20:08 -080051cc_binary {
52 name: "toolbox",
53 defaults: ["toolbox_binary_defaults"],
Jiyong Park011ee122018-05-29 16:41:30 +090054 recovery_available: true,
Tom Cherry6fb3dca2018-01-09 13:20:08 -080055}
56
57cc_binary {
58 name: "toolbox_vendor",
59 stem: "toolbox",
60 vendor: true,
61 defaults: ["toolbox_binary_defaults"],
62}