Hridya Valsaraju | dea91b4 | 2018-07-17 11:14:01 -0700 | [diff] [blame] | 1 | // 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 Wisner | db51120 | 2018-06-26 15:38:35 -0500 | [diff] [blame] | 15 | cc_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 Valsaraju | dea91b4 | 2018-07-17 11:14:01 -0700 | [diff] [blame] | 71 | |
| 72 | cc_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 | |
| 88 | cc_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 Anderson | 12211d1 | 2018-07-24 15:21:20 -0700 | [diff] [blame^] | 97 | "device/flashing.cpp", |
Hridya Valsaraju | dea91b4 | 2018-07-17 11:14:01 -0700 | [diff] [blame] | 98 | "device/main.cpp", |
| 99 | "device/usb_client.cpp", |
Hridya Valsaraju | 31d2c26 | 2018-07-20 13:35:50 -0700 | [diff] [blame] | 100 | "device/utility.cpp", |
| 101 | "device/variables.cpp", |
Hridya Valsaraju | dea91b4 | 2018-07-17 11:14:01 -0700 | [diff] [blame] | 102 | ], |
| 103 | |
| 104 | shared_libs: [ |
Hridya Valsaraju | 31d2c26 | 2018-07-20 13:35:50 -0700 | [diff] [blame] | 105 | "android.hardware.boot@1.0", |
Hridya Valsaraju | dea91b4 | 2018-07-17 11:14:01 -0700 | [diff] [blame] | 106 | "libadbd", |
Tao Bao | b71eedf | 2018-08-06 19:13:38 -0700 | [diff] [blame] | 107 | "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 Valsaraju | dea91b4 | 2018-07-17 11:14:01 -0700 | [diff] [blame] | 119 | ], |
| 120 | |
| 121 | cpp_std: "c++17", |
| 122 | } |