blob: 19f6390636b9c893c6f27a6c709bd33b74d8542a [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",
David Anderson12211d12018-07-24 15:21:20 -070097 "device/flashing.cpp",
Hridya Valsarajudea91b42018-07-17 11:14:01 -070098 "device/main.cpp",
99 "device/usb_client.cpp",
Hridya Valsaraju31d2c262018-07-20 13:35:50 -0700100 "device/utility.cpp",
101 "device/variables.cpp",
Hridya Valsarajudea91b42018-07-17 11:14:01 -0700102 ],
103
104 shared_libs: [
Hridya Valsaraju31d2c262018-07-20 13:35:50 -0700105 "android.hardware.boot@1.0",
Hridya Valsarajudea91b42018-07-17 11:14:01 -0700106 "libadbd",
Tao Baob71eedf2018-08-06 19:13:38 -0700107 "libasyncio",
108 "libbase",
109 "libbootloader_message",
110 "libcutils",
111 "libext4_utils",
112 "libfs_mgr",
113 "libhidlbase",
114 "libhidltransport",
115 "libhwbinder",
116 "liblog",
117 "libsparse",
118 "libutils",
Hridya Valsarajudea91b42018-07-17 11:14:01 -0700119 ],
120
121 cpp_std: "c++17",
122}