1// Copyright (C) 2017 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 15cc_library_static { 16 name: "libotafault", 17 18 host_supported: true, 19 20 srcs: [ 21 "config.cpp", 22 "ota_io.cpp", 23 ], 24 25 static_libs: [ 26 "libbase", 27 "liblog", 28 "libziparchive", 29 ], 30 31 export_include_dirs: [ 32 "include", 33 ], 34 35 cflags: [ 36 "-D_LIBCPP_ENABLE_THREAD_SAFETY_ANNOTATIONS", 37 "-Wall", 38 "-Werror", 39 "-Wthread-safety", 40 "-Wthread-safety-negative", 41 ], 42 43 target: { 44 darwin: { 45 enabled: false, 46 }, 47 }, 48} 49 50cc_test { 51 name: "otafault_test", 52 53 srcs: ["test.cpp"], 54 55 cflags: [ 56 "-Wall", 57 "-Werror", 58 ], 59 60 static_executable: true, 61 62 static_libs: [ 63 "libotafault", 64 "libziparchive", 65 "libbase", 66 "liblog", 67 ], 68} 69