blob: ae7e9c5cccec05086fe4dabe2f2026647fe94004 [file] [log] [blame]
Tao Bao582b6782017-10-05 09:06:21 -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_defaults {
16 name: "applypatch_defaults",
17
18 cflags: [
19 "-D_FILE_OFFSET_BITS=64",
20 "-DZLIB_CONST",
21 "-Wall",
22 "-Werror",
23 ],
24
25 local_include_dirs: [
26 "include",
27 ],
28}
29
30cc_library_static {
31 name: "libapplypatch",
32
Tianjie Xue40c80d2018-02-03 17:20:56 -080033 host_supported: true,
34
Tao Bao582b6782017-10-05 09:06:21 -070035 defaults: [
36 "applypatch_defaults",
37 ],
38
39 srcs: [
40 "applypatch.cpp",
41 "bspatch.cpp",
42 "freecache.cpp",
43 "imgpatch.cpp",
44 ],
45
46 export_include_dirs: [
47 "include",
48 ],
49
50 static_libs: [
51 "libbase",
52 "libbspatch",
53 "libbz",
Tao Bao582b6782017-10-05 09:06:21 -070054 "libedify",
Tao Bao582b6782017-10-05 09:06:21 -070055 "libotautil",
56 "libz",
57 ],
Tianjie Xu7a4dacf2018-02-17 21:58:54 -080058
Pete Bentley189d4242019-09-12 19:53:46 +010059 shared_libs: [
60 "libcrypto",
61 ],
62
Tianjie Xu7a4dacf2018-02-17 21:58:54 -080063 target: {
64 darwin: {
65 enabled: false,
66 },
67 },
Tao Bao582b6782017-10-05 09:06:21 -070068}
69
70cc_library_static {
71 name: "libapplypatch_modes",
72
73 defaults: [
74 "applypatch_defaults",
75 ],
76
77 srcs: [
78 "applypatch_modes.cpp",
79 ],
80
81 static_libs: [
82 "libapplypatch",
83 "libbase",
Tao Bao582b6782017-10-05 09:06:21 -070084 "libedify",
85 "libotautil",
86 ],
Pete Bentley189d4242019-09-12 19:53:46 +010087
88 shared_libs: [
89 "libcrypto",
90 ],
Tao Bao582b6782017-10-05 09:06:21 -070091}
92
93cc_binary {
94 name: "applypatch",
95
96 defaults: [
97 "applypatch_defaults",
98 ],
99
100 srcs: [
101 "applypatch_main.cpp",
102 ],
103
104 static_libs: [
105 "libapplypatch_modes",
106 "libapplypatch",
107 "libedify",
Tao Bao582b6782017-10-05 09:06:21 -0700108 "libotautil",
109 "libbspatch",
110 ],
111
112 shared_libs: [
113 "libbase",
Tianjie Xu3d843862017-11-03 15:52:22 -0700114 "libbrotli",
Tao Bao582b6782017-10-05 09:06:21 -0700115 "libbz",
116 "libcrypto",
117 "liblog",
118 "libz",
119 "libziparchive",
120 ],
121}
122
Tianjie Xu42d77792019-06-28 11:04:07 -0700123cc_library_host_static {
Tao Bao582b6782017-10-05 09:06:21 -0700124 name: "libimgdiff",
125
Tao Bao582b6782017-10-05 09:06:21 -0700126 defaults: [
127 "applypatch_defaults",
128 ],
129
130 srcs: [
131 "imgdiff.cpp",
132 ],
133
134 export_include_dirs: [
135 "include",
136 ],
137
138 static_libs: [
139 "libbase",
140 "libbsdiff",
141 "libdivsufsort",
142 "libdivsufsort64",
143 "liblog",
144 "libotautil",
145 "libutils",
146 "libz",
147 "libziparchive",
148 ],
149}
150
151cc_binary_host {
152 name: "imgdiff",
153
154 srcs: [
155 "imgdiff_main.cpp",
156 ],
157
158 defaults: [
159 "applypatch_defaults",
160 ],
161
162 static_libs: [
163 "libimgdiff",
Tao Bao45685822017-10-13 14:54:12 -0700164 "libotautil",
Tao Bao582b6782017-10-05 09:06:21 -0700165 "libbsdiff",
166 "libdivsufsort",
167 "libdivsufsort64",
168 "libziparchive",
169 "libbase",
170 "libutils",
171 "liblog",
Tianjie Xu8c280812017-10-28 22:13:16 -0700172 "libbrotli",
Tao Bao582b6782017-10-05 09:06:21 -0700173 "libbz",
174 "libz",
175 ],
176}