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