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