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