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