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