blob: 077f5423d63a281423944e32a1805b92cee792c1 [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"],
49}
50
51cc_binary {
52 name: "toolbox_vendor",
53 stem: "toolbox",
54 vendor: true,
55 defaults: ["toolbox_binary_defaults"],
56}
57
Dan Willemsena852f952018-01-08 13:50:55 -080058// We only want 'r' on userdebug and eng builds.
59cc_binary {
60 name: "r",
61 defaults: ["toolbox_defaults"],
62 srcs: ["r.c"],
Yifan Hong49641ba2017-05-22 18:08:02 -070063}
Dan Willemsena2288222018-04-25 17:50:47 -070064
65cc_binary_host {
66 name: "newfs_msdos",
67 defaults: ["toolbox_defaults"],
68 srcs: ["newfs_msdos.c"],
69 cflags: ["-Dnewfs_msdos_main=main"]
70}