blob: b39d5bee21f48cdec6b5b1f958d4da198df79401 [file] [log] [blame]
Tao Baoa26e32d2017-09-28 18:46:19 -07001// 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
Tianjie Xue40c80d2018-02-03 17:20:56 -080018 host_supported: true,
19
Tao Baoa26e32d2017-09-28 18:46:19 -070020 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 ],
Tianjie Xu7a4dacf2018-02-17 21:58:54 -080042
43 target: {
44 darwin: {
45 enabled: false,
46 },
47 },
Tao Baoa26e32d2017-09-28 18:46:19 -070048}
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}