Doug Zongker | 512536a | 2010-02-17 16:11:44 -0800 | [diff] [blame] | 1 | # Copyright (C) 2008 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 | |||||
Doug Zongker | 512536a | 2010-02-17 16:11:44 -0800 | [diff] [blame] | 15 | LOCAL_PATH := $(call my-dir) |
Tao Bao | 80e46e0 | 2015-06-03 10:49:29 -0700 | [diff] [blame] | 16 | |
Tao Bao | d80a998 | 2016-03-03 11:43:47 -0800 | [diff] [blame] | 17 | # libapplypatch (static library) |
18 | # =============================== | ||||
Doug Zongker | 512536a | 2010-02-17 16:11:44 -0800 | [diff] [blame] | 19 | include $(CLEAR_VARS) |
Tao Bao | d80a998 | 2016-03-03 11:43:47 -0800 | [diff] [blame] | 20 | LOCAL_SRC_FILES := \ |
21 | applypatch.cpp \ | ||||
22 | bspatch.cpp \ | ||||
23 | freecache.cpp \ | ||||
Tianjie Xu | 12b9055 | 2017-03-07 14:44:14 -0800 | [diff] [blame] | 24 | imgpatch.cpp |
Doug Zongker | 512536a | 2010-02-17 16:11:44 -0800 | [diff] [blame] | 25 | LOCAL_MODULE := libapplypatch |
26 | LOCAL_MODULE_TAGS := eng | ||||
Tao Bao | 97555da | 2016-12-15 10:15:06 -0800 | [diff] [blame] | 27 | LOCAL_C_INCLUDES := \ |
Tao Bao | d80a998 | 2016-03-03 11:43:47 -0800 | [diff] [blame] | 28 | $(LOCAL_PATH)/include \ |
29 | bootable/recovery | ||||
30 | LOCAL_EXPORT_C_INCLUDE_DIRS := $(LOCAL_PATH)/include | ||||
Tao Bao | 97555da | 2016-12-15 10:15:06 -0800 | [diff] [blame] | 31 | LOCAL_STATIC_LIBRARIES := \ |
Tao Bao | d80a998 | 2016-03-03 11:43:47 -0800 | [diff] [blame] | 32 | libotafault \ |
Tao Bao | 623fe7e | 2017-10-02 16:28:06 -0700 | [diff] [blame] | 33 | libotautil \ |
Tao Bao | d80a998 | 2016-03-03 11:43:47 -0800 | [diff] [blame] | 34 | libbase \ |
Josh Gao | 073164f | 2016-08-05 15:59:05 -0700 | [diff] [blame] | 35 | libcrypto \ |
Sen Jiang | 25c5697 | 2016-05-10 15:23:25 -0700 | [diff] [blame] | 36 | libbspatch \ |
Tao Bao | d80a998 | 2016-03-03 11:43:47 -0800 | [diff] [blame] | 37 | libbz \ |
38 | libz | ||||
Tao Bao | 087bc0c | 2017-01-19 10:46:39 -0800 | [diff] [blame] | 39 | LOCAL_CFLAGS := \ |
40 | -DZLIB_CONST \ | ||||
Tianjie Xu | c89d1e7 | 2017-08-28 14:15:07 -0700 | [diff] [blame] | 41 | -Wall \ |
Tao Bao | 087bc0c | 2017-01-19 10:46:39 -0800 | [diff] [blame] | 42 | -Werror |
Doug Zongker | 512536a | 2010-02-17 16:11:44 -0800 | [diff] [blame] | 43 | include $(BUILD_STATIC_LIBRARY) |
44 | |||||
Tao Bao | d80a998 | 2016-03-03 11:43:47 -0800 | [diff] [blame] | 45 | # libimgpatch (static library) |
46 | # =============================== | ||||
Doug Zongker | 512536a | 2010-02-17 16:11:44 -0800 | [diff] [blame] | 47 | include $(CLEAR_VARS) |
Tao Bao | 97555da | 2016-12-15 10:15:06 -0800 | [diff] [blame] | 48 | LOCAL_SRC_FILES := \ |
49 | bspatch.cpp \ | ||||
Tianjie Xu | 12b9055 | 2017-03-07 14:44:14 -0800 | [diff] [blame] | 50 | imgpatch.cpp |
Sen Jiang | 0cce9cd | 2016-01-22 20:49:07 +0800 | [diff] [blame] | 51 | LOCAL_MODULE := libimgpatch |
Tao Bao | 97555da | 2016-12-15 10:15:06 -0800 | [diff] [blame] | 52 | LOCAL_C_INCLUDES := \ |
Tao Bao | d80a998 | 2016-03-03 11:43:47 -0800 | [diff] [blame] | 53 | $(LOCAL_PATH)/include \ |
54 | bootable/recovery | ||||
Sen Jiang | 0cce9cd | 2016-01-22 20:49:07 +0800 | [diff] [blame] | 55 | LOCAL_EXPORT_C_INCLUDE_DIRS := $(LOCAL_PATH)/include |
Tao Bao | 97555da | 2016-12-15 10:15:06 -0800 | [diff] [blame] | 56 | LOCAL_STATIC_LIBRARIES := \ |
Tao Bao | 623fe7e | 2017-10-02 16:28:06 -0700 | [diff] [blame] | 57 | libotautil \ |
Tao Bao | 97555da | 2016-12-15 10:15:06 -0800 | [diff] [blame] | 58 | libcrypto \ |
Sen Jiang | 25c5697 | 2016-05-10 15:23:25 -0700 | [diff] [blame] | 59 | libbspatch \ |
Tianjie Xu | 12b9055 | 2017-03-07 14:44:14 -0800 | [diff] [blame] | 60 | libbase \ |
Tao Bao | 97555da | 2016-12-15 10:15:06 -0800 | [diff] [blame] | 61 | libbz \ |
62 | libz | ||||
Tao Bao | 087bc0c | 2017-01-19 10:46:39 -0800 | [diff] [blame] | 63 | LOCAL_CFLAGS := \ |
64 | -DZLIB_CONST \ | ||||
Tianjie Xu | c89d1e7 | 2017-08-28 14:15:07 -0700 | [diff] [blame] | 65 | -Wall \ |
Tao Bao | 087bc0c | 2017-01-19 10:46:39 -0800 | [diff] [blame] | 66 | -Werror |
Sen Jiang | 0cce9cd | 2016-01-22 20:49:07 +0800 | [diff] [blame] | 67 | include $(BUILD_STATIC_LIBRARY) |
68 | |||||
Tao Bao | d80a998 | 2016-03-03 11:43:47 -0800 | [diff] [blame] | 69 | # libimgpatch (host static library) |
70 | # =============================== | ||||
Sen Jiang | 0cce9cd | 2016-01-22 20:49:07 +0800 | [diff] [blame] | 71 | include $(CLEAR_VARS) |
Tao Bao | 97555da | 2016-12-15 10:15:06 -0800 | [diff] [blame] | 72 | LOCAL_SRC_FILES := \ |
73 | bspatch.cpp \ | ||||
Tianjie Xu | 12b9055 | 2017-03-07 14:44:14 -0800 | [diff] [blame] | 74 | imgpatch.cpp |
Sen Jiang | 0cce9cd | 2016-01-22 20:49:07 +0800 | [diff] [blame] | 75 | LOCAL_MODULE := libimgpatch |
Tao Bao | d80a998 | 2016-03-03 11:43:47 -0800 | [diff] [blame] | 76 | LOCAL_MODULE_HOST_OS := linux |
Tao Bao | 97555da | 2016-12-15 10:15:06 -0800 | [diff] [blame] | 77 | LOCAL_C_INCLUDES := \ |
Tao Bao | d80a998 | 2016-03-03 11:43:47 -0800 | [diff] [blame] | 78 | $(LOCAL_PATH)/include \ |
79 | bootable/recovery | ||||
Sen Jiang | 0cce9cd | 2016-01-22 20:49:07 +0800 | [diff] [blame] | 80 | LOCAL_EXPORT_C_INCLUDE_DIRS := $(LOCAL_PATH)/include |
Tao Bao | 97555da | 2016-12-15 10:15:06 -0800 | [diff] [blame] | 81 | LOCAL_STATIC_LIBRARIES := \ |
Tao Bao | 623fe7e | 2017-10-02 16:28:06 -0700 | [diff] [blame] | 82 | libotautil \ |
Tao Bao | 97555da | 2016-12-15 10:15:06 -0800 | [diff] [blame] | 83 | libcrypto \ |
Sen Jiang | 25c5697 | 2016-05-10 15:23:25 -0700 | [diff] [blame] | 84 | libbspatch \ |
Tianjie Xu | 12b9055 | 2017-03-07 14:44:14 -0800 | [diff] [blame] | 85 | libbase \ |
Tao Bao | 97555da | 2016-12-15 10:15:06 -0800 | [diff] [blame] | 86 | libbz \ |
87 | libz | ||||
Tao Bao | 087bc0c | 2017-01-19 10:46:39 -0800 | [diff] [blame] | 88 | LOCAL_CFLAGS := \ |
89 | -DZLIB_CONST \ | ||||
Tianjie Xu | c89d1e7 | 2017-08-28 14:15:07 -0700 | [diff] [blame] | 90 | -Wall \ |
Tao Bao | 087bc0c | 2017-01-19 10:46:39 -0800 | [diff] [blame] | 91 | -Werror |
Sen Jiang | 0cce9cd | 2016-01-22 20:49:07 +0800 | [diff] [blame] | 92 | include $(BUILD_HOST_STATIC_LIBRARY) |
93 | |||||
Tao Bao | 36c3511 | 2016-10-25 14:17:26 -0700 | [diff] [blame] | 94 | # libapplypatch_modes (static library) |
Tao Bao | d80a998 | 2016-03-03 11:43:47 -0800 | [diff] [blame] | 95 | # =============================== |
Sen Jiang | 0cce9cd | 2016-01-22 20:49:07 +0800 | [diff] [blame] | 96 | include $(CLEAR_VARS) |
Tao Bao | 36c3511 | 2016-10-25 14:17:26 -0700 | [diff] [blame] | 97 | LOCAL_SRC_FILES := \ |
98 | applypatch_modes.cpp | ||||
99 | LOCAL_MODULE := libapplypatch_modes | ||||
100 | LOCAL_C_INCLUDES := bootable/recovery | ||||
101 | LOCAL_STATIC_LIBRARIES := \ | ||||
102 | libapplypatch \ | ||||
103 | libbase \ | ||||
104 | libedify \ | ||||
Tao Bao | 623fe7e | 2017-10-02 16:28:06 -0700 | [diff] [blame] | 105 | libotautil \ |
Tao Bao | 36c3511 | 2016-10-25 14:17:26 -0700 | [diff] [blame] | 106 | libcrypto |
Tianjie Xu | c89d1e7 | 2017-08-28 14:15:07 -0700 | [diff] [blame] | 107 | LOCAL_CFLAGS := -Wall -Werror |
Tao Bao | 36c3511 | 2016-10-25 14:17:26 -0700 | [diff] [blame] | 108 | include $(BUILD_STATIC_LIBRARY) |
109 | |||||
110 | # applypatch (target executable) | ||||
111 | # =============================== | ||||
112 | include $(CLEAR_VARS) | ||||
Tao Bao | 36c3511 | 2016-10-25 14:17:26 -0700 | [diff] [blame] | 113 | LOCAL_SRC_FILES := applypatch_main.cpp |
Doug Zongker | 512536a | 2010-02-17 16:11:44 -0800 | [diff] [blame] | 114 | LOCAL_MODULE := applypatch |
Tao Bao | 36c3511 | 2016-10-25 14:17:26 -0700 | [diff] [blame] | 115 | LOCAL_C_INCLUDES := bootable/recovery |
116 | LOCAL_STATIC_LIBRARIES := \ | ||||
117 | libapplypatch_modes \ | ||||
Tao Bao | d80a998 | 2016-03-03 11:43:47 -0800 | [diff] [blame] | 118 | libapplypatch \ |
Tao Bao | d80a998 | 2016-03-03 11:43:47 -0800 | [diff] [blame] | 119 | libedify \ |
120 | libotafault \ | ||||
Tao Bao | 623fe7e | 2017-10-02 16:28:06 -0700 | [diff] [blame] | 121 | libotautil \ |
Sen Jiang | 25c5697 | 2016-05-10 15:23:25 -0700 | [diff] [blame] | 122 | libbspatch \ |
Tao Bao | 646b05a | 2017-09-28 17:43:53 -0700 | [diff] [blame] | 123 | libbase \ |
124 | libziparchive \ | ||||
125 | liblog \ | ||||
126 | libcrypto \ | ||||
Tao Bao | d80a998 | 2016-03-03 11:43:47 -0800 | [diff] [blame] | 127 | libbz |
Tao Bao | 36c3511 | 2016-10-25 14:17:26 -0700 | [diff] [blame] | 128 | LOCAL_SHARED_LIBRARIES := \ |
129 | libbase \ | ||||
130 | libz \ | ||||
131 | libcutils | ||||
Tianjie Xu | c89d1e7 | 2017-08-28 14:15:07 -0700 | [diff] [blame] | 132 | LOCAL_CFLAGS := -Wall -Werror |
Doug Zongker | 512536a | 2010-02-17 16:11:44 -0800 | [diff] [blame] | 133 | include $(BUILD_EXECUTABLE) |
134 | |||||
Tianjie Xu | 12b9055 | 2017-03-07 14:44:14 -0800 | [diff] [blame] | 135 | libimgdiff_src_files := imgdiff.cpp |
Tao Bao | 97555da | 2016-12-15 10:15:06 -0800 | [diff] [blame] | 136 | |
137 | # libbsdiff is compiled with -D_FILE_OFFSET_BITS=64. | ||||
138 | libimgdiff_cflags := \ | ||||
Tianjie Xu | c89d1e7 | 2017-08-28 14:15:07 -0700 | [diff] [blame] | 139 | -Wall \ |
Tao Bao | 97555da | 2016-12-15 10:15:06 -0800 | [diff] [blame] | 140 | -Werror \ |
Tianjie Xu | 6b03ba7 | 2017-07-19 14:16:30 -0700 | [diff] [blame] | 141 | -D_FILE_OFFSET_BITS=64 \ |
142 | -DZLIB_CONST | ||||
Tao Bao | 97555da | 2016-12-15 10:15:06 -0800 | [diff] [blame] | 143 | |
144 | libimgdiff_static_libraries := \ | ||||
145 | libbsdiff \ | ||||
Sen Jiang | 930edb6 | 2017-01-18 17:26:42 -0800 | [diff] [blame] | 146 | libdivsufsort \ |
147 | libdivsufsort64 \ | ||||
Tianjie Xu | 1ea84d6 | 2017-02-22 18:23:58 -0800 | [diff] [blame] | 148 | libziparchive \ |
149 | libutils \ | ||||
150 | liblog \ | ||||
Tao Bao | d37ce8f | 2016-12-17 17:10:04 -0800 | [diff] [blame] | 151 | libbase \ |
Tao Bao | 97555da | 2016-12-15 10:15:06 -0800 | [diff] [blame] | 152 | libz |
153 | |||||
154 | # libimgdiff (static library) | ||||
155 | # =============================== | ||||
156 | include $(CLEAR_VARS) | ||||
157 | LOCAL_SRC_FILES := \ | ||||
158 | $(libimgdiff_src_files) | ||||
159 | LOCAL_MODULE := libimgdiff | ||||
160 | LOCAL_CFLAGS := \ | ||||
161 | $(libimgdiff_cflags) | ||||
162 | LOCAL_STATIC_LIBRARIES := \ | ||||
163 | $(libimgdiff_static_libraries) | ||||
164 | LOCAL_C_INCLUDES := \ | ||||
Tianjie Xu | 57dd961 | 2017-08-17 17:50:56 -0700 | [diff] [blame] | 165 | $(LOCAL_PATH)/include \ |
166 | bootable/recovery | ||||
Tao Bao | 97555da | 2016-12-15 10:15:06 -0800 | [diff] [blame] | 167 | LOCAL_EXPORT_C_INCLUDE_DIRS := $(LOCAL_PATH)/include |
168 | include $(BUILD_STATIC_LIBRARY) | ||||
169 | |||||
170 | # libimgdiff (host static library) | ||||
171 | # =============================== | ||||
172 | include $(CLEAR_VARS) | ||||
173 | LOCAL_SRC_FILES := \ | ||||
174 | $(libimgdiff_src_files) | ||||
175 | LOCAL_MODULE := libimgdiff | ||||
176 | LOCAL_CFLAGS := \ | ||||
177 | $(libimgdiff_cflags) | ||||
178 | LOCAL_STATIC_LIBRARIES := \ | ||||
179 | $(libimgdiff_static_libraries) | ||||
180 | LOCAL_C_INCLUDES := \ | ||||
Tianjie Xu | 57dd961 | 2017-08-17 17:50:56 -0700 | [diff] [blame] | 181 | $(LOCAL_PATH)/include \ |
182 | bootable/recovery | ||||
Tao Bao | 97555da | 2016-12-15 10:15:06 -0800 | [diff] [blame] | 183 | LOCAL_EXPORT_C_INCLUDE_DIRS := $(LOCAL_PATH)/include |
184 | include $(BUILD_HOST_STATIC_LIBRARY) | ||||
185 | |||||
Tao Bao | d80a998 | 2016-03-03 11:43:47 -0800 | [diff] [blame] | 186 | # imgdiff (host static executable) |
187 | # =============================== | ||||
Doug Zongker | 512536a | 2010-02-17 16:11:44 -0800 | [diff] [blame] | 188 | include $(CLEAR_VARS) |
Tao Bao | 97555da | 2016-12-15 10:15:06 -0800 | [diff] [blame] | 189 | LOCAL_SRC_FILES := imgdiff_main.cpp |
Doug Zongker | 512536a | 2010-02-17 16:11:44 -0800 | [diff] [blame] | 190 | LOCAL_MODULE := imgdiff |
Tianjie Xu | c89d1e7 | 2017-08-28 14:15:07 -0700 | [diff] [blame] | 191 | LOCAL_CFLAGS := -Wall -Werror |
Tao Bao | 97555da | 2016-12-15 10:15:06 -0800 | [diff] [blame] | 192 | LOCAL_STATIC_LIBRARIES := \ |
193 | libimgdiff \ | ||||
194 | $(libimgdiff_static_libraries) \ | ||||
Sen Jiang | 930edb6 | 2017-01-18 17:26:42 -0800 | [diff] [blame] | 195 | libbz |
Tianjie Xu | 57dd961 | 2017-08-17 17:50:56 -0700 | [diff] [blame] | 196 | LOCAL_C_INCLUDES := \ |
197 | $(LOCAL_PATH)/include \ | ||||
198 | bootable/recovery | ||||
Doug Zongker | 512536a | 2010-02-17 16:11:44 -0800 | [diff] [blame] | 199 | include $(BUILD_HOST_EXECUTABLE) |