Tao Bao | 7ae0169 | 2019-05-16 14:42:42 -0700 | [diff] [blame] | 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 | |
Tianjie Xu | 3d57c84 | 2019-11-09 22:07:20 -0800 | [diff] [blame] | 17 | cc_defaults { |
| 18 | name: "misc_writer_defaults", |
Tao Bao | 7ae0169 | 2019-05-16 14:42:42 -0700 | [diff] [blame] | 19 | vendor: true, |
Tao Bao | 7ae0169 | 2019-05-16 14:42:42 -0700 | [diff] [blame] | 20 | cpp_std: "experimental", |
| 21 | |
| 22 | cflags: [ |
| 23 | "-Wall", |
| 24 | "-Werror", |
| 25 | ], |
| 26 | |
| 27 | shared_libs: [ |
| 28 | "libbase", |
| 29 | ], |
| 30 | |
| 31 | static_libs: [ |
| 32 | "libbootloader_message_vendor", |
| 33 | "libfstab", |
| 34 | ], |
| 35 | } |
Tianjie Xu | 3d57c84 | 2019-11-09 22:07:20 -0800 | [diff] [blame] | 36 | |
| 37 | // TODO(xunchang) Remove duplicates after we convert the device specific librecovery_ui to recovery |
| 38 | // module. Then libmisc_writer can build as a vendor module available in recovery. |
| 39 | cc_library_static { |
| 40 | name: "libmisc_writer", |
| 41 | cpp_std: "experimental", |
| 42 | |
| 43 | cflags: [ |
| 44 | "-Wall", |
| 45 | "-Werror", |
| 46 | ], |
| 47 | |
| 48 | shared_libs: [ |
| 49 | "libbase", |
| 50 | ], |
| 51 | |
| 52 | static_libs: [ |
| 53 | "libbootloader_message", |
| 54 | "libfstab", |
| 55 | ], |
| 56 | |
| 57 | srcs: [ |
| 58 | "misc_writer.cpp", |
| 59 | ], |
| 60 | |
| 61 | export_include_dirs: [ |
| 62 | "include", |
| 63 | ], |
| 64 | } |
| 65 | |
| 66 | cc_library_static { |
| 67 | name: "libmisc_writer_vendor", |
| 68 | defaults: [ |
| 69 | "misc_writer_defaults", |
| 70 | ], |
| 71 | |
| 72 | srcs: [ |
| 73 | "misc_writer.cpp", |
| 74 | ], |
| 75 | |
| 76 | export_include_dirs: [ |
| 77 | "include", |
| 78 | ], |
| 79 | } |
| 80 | |
| 81 | cc_binary { |
| 82 | name: "misc_writer", |
| 83 | defaults: [ |
| 84 | "misc_writer_defaults", |
| 85 | ], |
| 86 | |
| 87 | srcs: [ |
| 88 | "misc_writer_main.cpp", |
| 89 | ], |
| 90 | |
| 91 | static_libs: [ |
| 92 | "libmisc_writer_vendor", |
| 93 | ] |
| 94 | } |
| 95 | |
| 96 | cc_test { |
| 97 | name: "misc_writer_test", |
| 98 | defaults: [ |
| 99 | "misc_writer_defaults", |
| 100 | ], |
| 101 | |
| 102 | srcs: [ |
| 103 | "misc_writer_test.cpp", |
| 104 | ], |
| 105 | test_suites: ["device-tests"], |
| 106 | |
| 107 | static_libs: [ |
| 108 | "libmisc_writer_vendor", |
| 109 | ] |
| 110 | } |