blob: fc5170537a34c06905a5f435f38715d9813b6898 [file] [log] [blame]
Dan Willemsena852f952018-01-08 13:50:55 -08001cc_defaults {
2 name: "toolbox_defaults",
3
4 cflags: [
5 "-Werror",
6 "-Wno-unused-parameter",
7 "-Wno-unused-const-variable",
Elliott Hughes16b82b72018-01-22 16:15:55 -08008 "-D_FILE_OFFSET_BITS=64",
Elliott Hughes21ceafb2018-04-20 17:46:03 -07009 "-DWITHOUT_NLS",
Yifan Hong49641ba2017-05-22 18:08:02 -070010 ],
Dan Willemsena852f952018-01-08 13:50:55 -080011}
12
13genrule {
Dan Willemsena852f952018-01-08 13:50:55 -080014 name: "toolbox_input_labels",
15 tool_files: ["generate-input.h-labels.py"],
16 cmd: "$(location) $(in) >$(out)",
17 srcs: [":kernel_input_headers"],
18 out: ["input.h-labels.h"],
19}
20
Tom Cherry6fb3dca2018-01-09 13:20:08 -080021cc_defaults {
22 name: "toolbox_binary_defaults",
Dan Willemsena852f952018-01-08 13:50:55 -080023 defaults: ["toolbox_defaults"],
Tom Cherry91094e02018-01-02 11:50:16 -080024 cpp_std: "experimental",
Dan Willemsena852f952018-01-08 13:50:55 -080025 srcs: [
26 "toolbox.c",
27 "getevent.c",
Tom Cherry91094e02018-01-02 11:50:16 -080028 "getprop.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 ],
Tom Cherry91094e02018-01-02 11:50:16 -080036 static_libs: ["libpropertyinfoparser"],
Dan Willemsena852f952018-01-08 13:50:55 -080037
38 symlinks: [
Dan Willemsena852f952018-01-08 13:50:55 -080039 "getevent",
Tom Cherry91094e02018-01-02 11:50:16 -080040 "getprop",
Dan Willemsena852f952018-01-08 13:50:55 -080041 ],
42}
43
Tom Cherry6fb3dca2018-01-09 13:20:08 -080044cc_binary {
45 name: "toolbox",
46 defaults: ["toolbox_binary_defaults"],
Jiyong Park011ee122018-05-29 16:41:30 +090047 recovery_available: true,
Tom Cherry6fb3dca2018-01-09 13:20:08 -080048}
49
50cc_binary {
51 name: "toolbox_vendor",
52 stem: "toolbox",
53 vendor: true,
54 defaults: ["toolbox_binary_defaults"],
55}
56
Dan Willemsena852f952018-01-08 13:50:55 -080057// We only want 'r' on userdebug and eng builds.
58cc_binary {
59 name: "r",
60 defaults: ["toolbox_defaults"],
61 srcs: ["r.c"],
Yifan Hong49641ba2017-05-22 18:08:02 -070062}