blob: aa88a8a44fbfdf13c898e67b0ba60122ed5d1cd8 [file] [log] [blame]
Hridya Valsarajudea91b42018-07-17 11:14:01 -07001// Copyright (C) 2018 The Android Open Source Project
2//
3// Licensed under the Apache License, Version 2.0 (the "License");
4// you may not use this file except in compliance with the License.
5// You may obtain a copy of the License at
6//
7// http://www.apache.org/licenses/LICENSE-2.0
8//
9// Unless required by applicable law or agreed to in writing, software
10// distributed under the License is distributed on an "AS IS" BASIS,
11// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12// See the License for the specific language governing permissions and
13// limitations under the License.
14
Aaron Wisnerdb511202018-06-26 15:38:35 -050015cc_library_host_static {
16 name: "libfastboot2",
17
18 //host_supported: true,
19
20 compile_multilib: "first",
21 srcs: [
22 "bootimg_utils.cpp",
23 "fs.cpp",
24 "socket.cpp",
25 "tcp.cpp",
26 "udp.cpp",
27 "util.cpp",
28 "fastboot_driver.cpp",
29 ],
30
31 static_libs: [
32 "libziparchive",
33 "libsparse",
34 "libutils",
35 "liblog",
36 "libz",
37 "libdiagnose_usb",
38 "libbase",
39 "libcutils",
40 "libgtest",
41 "libgtest_main",
42 "libbase",
43 "libadb_host"
44 ],
45
46 header_libs: [
47 "bootimg_headers"
48 ],
49
50 export_header_lib_headers: [
51 "bootimg_headers"
52 ],
53
54
55 target: {
56 linux: {
57 srcs: ["usb_linux.cpp"],
58 },
59 },
60
61 cflags: [
62 "-Wall",
63 "-Wextra",
64 "-Werror",
65 "-Wunreachable-code",
66 ],
67
68 export_include_dirs: ["."],
69
70}
Hridya Valsarajudea91b42018-07-17 11:14:01 -070071
72cc_defaults {
73 name: "fastboot_defaults",
74
75 cflags: [
76 "-Wall",
77 "-Wextra",
78 "-Werror",
79 "-Wvla",
80 ],
81 rtti: true,
82
83 clang_cflags: [
84 "-Wthread-safety",
85 ],
86}
87
88cc_binary {
89 name: "fastbootd",
90 defaults: ["fastboot_defaults"],
91
92 recovery: true,
93
94 srcs: [
95 "device/commands.cpp",
96 "device/fastboot_device.cpp",
97 "device/main.cpp",
98 "device/usb_client.cpp",
Hridya Valsaraju31d2c262018-07-20 13:35:50 -070099 "device/utility.cpp",
100 "device/variables.cpp",
Hridya Valsarajudea91b42018-07-17 11:14:01 -0700101 ],
102
103 shared_libs: [
104 "libasyncio",
105 "libext4_utils",
106 "libsparse",
107 "liblog",
Hridya Valsaraju31d2c262018-07-20 13:35:50 -0700108 "android.hardware.boot@1.0",
Hridya Valsarajudea91b42018-07-17 11:14:01 -0700109 "libbootloader_message",
110 "libhidltransport",
111 "libhidlbase",
112 "libhwbinder",
113 "libbase",
114 "libutils",
115 "libcutils",
116 "libfs_mgr",
117 ],
118
119 static_libs: [
120 "libadbd",
121 ],
122
123 cpp_std: "c++17",
124}