blob: f12c810cd6bc1a92ea3edf7335d700d4feca99ea [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 "newfs_msdos.c",
30 ],
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 ],
Tom Cherry91094e02018-01-02 11:50:16 -080037 static_libs: ["libpropertyinfoparser"],
Dan Willemsena852f952018-01-08 13:50:55 -080038
39 symlinks: [
Dan Willemsena852f952018-01-08 13:50:55 -080040 "getevent",
Tom Cherry91094e02018-01-02 11:50:16 -080041 "getprop",
Dan Willemsena852f952018-01-08 13:50:55 -080042 "newfs_msdos",
43 ],
44}
45
Tom Cherry6fb3dca2018-01-09 13:20:08 -080046cc_binary {
47 name: "toolbox",
48 defaults: ["toolbox_binary_defaults"],
Jiyong Park011ee122018-05-29 16:41:30 +090049 recovery_available: true,
Tom Cherry6fb3dca2018-01-09 13:20:08 -080050}
51
52cc_binary {
53 name: "toolbox_vendor",
54 stem: "toolbox",
55 vendor: true,
56 defaults: ["toolbox_binary_defaults"],
57}
58
Dan Willemsena852f952018-01-08 13:50:55 -080059// We only want 'r' on userdebug and eng builds.
60cc_binary {
61 name: "r",
62 defaults: ["toolbox_defaults"],
63 srcs: ["r.c"],
Yifan Hong49641ba2017-05-22 18:08:02 -070064}
Dan Willemsena2288222018-04-25 17:50:47 -070065
66cc_binary_host {
67 name: "newfs_msdos",
68 defaults: ["toolbox_defaults"],
69 srcs: ["newfs_msdos.c"],
70 cflags: ["-Dnewfs_msdos_main=main"]
71}