1// 2// Copyright (C) 2019 The Android Open Source Project 3// 4// Licensed under the Apache License, Version 2.0 (the "License"); 5// you may not use this file except in compliance with the License. 6// You may obtain a copy of the License at 7// 8// http://www.apache.org/licenses/LICENSE-2.0 9// 10// Unless required by applicable law or agreed to in writing, software 11// distributed under the License is distributed on an "AS IS" BASIS, 12// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13// See the License for the specific language governing permissions and 14// limitations under the License. 15// 16 17package { 18 default_applicable_licenses: ["Android-Apache-2.0"], 19} 20 21cc_defaults { 22 name: "misc_writer_defaults", 23 vendor: true, 24 cpp_std: "experimental", 25 26 cflags: [ 27 "-Wall", 28 "-Werror", 29 ], 30 31 shared_libs: [ 32 "libbase", 33 ], 34 35 static_libs: [ 36 "libbootloader_message_vendor", 37 "libfstab", 38 ], 39} 40 41// TODO(xunchang) Remove duplicates after we convert the device specific librecovery_ui to recovery 42// module. Then libmisc_writer can build as a vendor module available in recovery. 43cc_library_static { 44 name: "libmisc_writer", 45 cpp_std: "experimental", 46 47 cflags: [ 48 "-Wall", 49 "-Werror", 50 ], 51 52 shared_libs: [ 53 "libbase", 54 ], 55 56 static_libs: [ 57 "libbootloader_message", 58 "libfstab", 59 ], 60 61 srcs: [ 62 "misc_writer.cpp", 63 ], 64 65 export_include_dirs: [ 66 "include", 67 ], 68} 69 70cc_library_static { 71 name: "libmisc_writer_vendor", 72 defaults: [ 73 "misc_writer_defaults", 74 ], 75 76 srcs: [ 77 "misc_writer.cpp", 78 ], 79 80 export_include_dirs: [ 81 "include", 82 ], 83} 84 85cc_binary { 86 name: "misc_writer", 87 defaults: [ 88 "misc_writer_defaults", 89 ], 90 91 srcs: [ 92 "misc_writer_main.cpp", 93 ], 94 95 static_libs: [ 96 "libmisc_writer_vendor", 97 ] 98} 99 100cc_test { 101 name: "misc_writer_test", 102 defaults: [ 103 "misc_writer_defaults", 104 ], 105 106 srcs: [ 107 "misc_writer_test.cpp", 108 ], 109 test_suites: ["device-tests"], 110 111 static_libs: [ 112 "libmisc_writer_vendor", 113 ] 114} 115