blob: 42aa5295468b62e4f01b81b96ff4cb90cbfda8e5 [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",
54 "libcrypto",
55 "libedify",
Tao Bao582b6782017-10-05 09:06:21 -070056 "libotautil",
57 "libz",
58 ],
Tianjie Xu7a4dacf2018-02-17 21:58:54 -080059
60 target: {
61 darwin: {
62 enabled: false,
63 },
64 },
Tao Bao582b6782017-10-05 09:06:21 -070065}
66
67cc_library_static {
68 name: "libapplypatch_modes",
69
70 defaults: [
71 "applypatch_defaults",
72 ],
73
74 srcs: [
75 "applypatch_modes.cpp",
76 ],
77
78 static_libs: [
79 "libapplypatch",
80 "libbase",
81 "libcrypto",
82 "libedify",
83 "libotautil",
84 ],
85}
86
87cc_binary {
88 name: "applypatch",
89
90 defaults: [
91 "applypatch_defaults",
92 ],
93
94 srcs: [
95 "applypatch_main.cpp",
96 ],
97
98 static_libs: [
99 "libapplypatch_modes",
100 "libapplypatch",
101 "libedify",
Tao Bao582b6782017-10-05 09:06:21 -0700102 "libotautil",
103 "libbspatch",
104 ],
105
106 shared_libs: [
107 "libbase",
Tianjie Xu3d843862017-11-03 15:52:22 -0700108 "libbrotli",
Tao Bao582b6782017-10-05 09:06:21 -0700109 "libbz",
110 "libcrypto",
111 "liblog",
112 "libz",
113 "libziparchive",
114 ],
115}
116
Tianjie Xu42d77792019-06-28 11:04:07 -0700117cc_library_host_static {
Tao Bao582b6782017-10-05 09:06:21 -0700118 name: "libimgdiff",
119
Tao Bao582b6782017-10-05 09:06:21 -0700120 defaults: [
121 "applypatch_defaults",
122 ],
123
124 srcs: [
125 "imgdiff.cpp",
126 ],
127
128 export_include_dirs: [
129 "include",
130 ],
131
132 static_libs: [
133 "libbase",
134 "libbsdiff",
135 "libdivsufsort",
136 "libdivsufsort64",
137 "liblog",
138 "libotautil",
139 "libutils",
140 "libz",
141 "libziparchive",
142 ],
143}
144
145cc_binary_host {
146 name: "imgdiff",
147
148 srcs: [
149 "imgdiff_main.cpp",
150 ],
151
152 defaults: [
153 "applypatch_defaults",
154 ],
155
156 static_libs: [
157 "libimgdiff",
Tao Bao45685822017-10-13 14:54:12 -0700158 "libotautil",
Tao Bao582b6782017-10-05 09:06:21 -0700159 "libbsdiff",
160 "libdivsufsort",
161 "libdivsufsort64",
162 "libziparchive",
163 "libbase",
164 "libutils",
165 "liblog",
Tianjie Xu8c280812017-10-28 22:13:16 -0700166 "libbrotli",
Tao Bao582b6782017-10-05 09:06:21 -0700167 "libbz",
168 "libz",
169 ],
170}