blob: f5dda2bc4bebecee7b4a52c5c76d6140e8ba19d7 [file] [log] [blame]
Doug Zongker512536a2010-02-17 16:11:44 -08001# 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 Zongker512536a2010-02-17 16:11:44 -080015LOCAL_PATH := $(call my-dir)
Tao Bao80e46e02015-06-03 10:49:29 -070016
Tao Baod80a9982016-03-03 11:43:47 -080017# libapplypatch (static library)
18# ===============================
Doug Zongker512536a2010-02-17 16:11:44 -080019include $(CLEAR_VARS)
Tao Baod80a9982016-03-03 11:43:47 -080020LOCAL_SRC_FILES := \
21 applypatch.cpp \
22 bspatch.cpp \
23 freecache.cpp \
Tianjie Xu12b90552017-03-07 14:44:14 -080024 imgpatch.cpp
Doug Zongker512536a2010-02-17 16:11:44 -080025LOCAL_MODULE := libapplypatch
26LOCAL_MODULE_TAGS := eng
Tao Bao97555da2016-12-15 10:15:06 -080027LOCAL_C_INCLUDES := \
Tao Baod80a9982016-03-03 11:43:47 -080028 $(LOCAL_PATH)/include \
29 bootable/recovery
30LOCAL_EXPORT_C_INCLUDE_DIRS := $(LOCAL_PATH)/include
Tao Bao97555da2016-12-15 10:15:06 -080031LOCAL_STATIC_LIBRARIES := \
Tao Baod80a9982016-03-03 11:43:47 -080032 libotafault \
Tao Baod80a9982016-03-03 11:43:47 -080033 libbase \
Josh Gao073164f2016-08-05 15:59:05 -070034 libcrypto \
Sen Jiang25c56972016-05-10 15:23:25 -070035 libbspatch \
Tao Baod80a9982016-03-03 11:43:47 -080036 libbz \
37 libz
Tao Bao087bc0c2017-01-19 10:46:39 -080038LOCAL_CFLAGS := \
39 -DZLIB_CONST \
Tianjie Xuc89d1e72017-08-28 14:15:07 -070040 -Wall \
Tao Bao087bc0c2017-01-19 10:46:39 -080041 -Werror
Doug Zongker512536a2010-02-17 16:11:44 -080042include $(BUILD_STATIC_LIBRARY)
43
Tao Baod80a9982016-03-03 11:43:47 -080044# libimgpatch (static library)
45# ===============================
Doug Zongker512536a2010-02-17 16:11:44 -080046include $(CLEAR_VARS)
Tao Bao97555da2016-12-15 10:15:06 -080047LOCAL_SRC_FILES := \
48 bspatch.cpp \
Tianjie Xu12b90552017-03-07 14:44:14 -080049 imgpatch.cpp
Sen Jiang0cce9cd2016-01-22 20:49:07 +080050LOCAL_MODULE := libimgpatch
Tao Bao97555da2016-12-15 10:15:06 -080051LOCAL_C_INCLUDES := \
Tao Baod80a9982016-03-03 11:43:47 -080052 $(LOCAL_PATH)/include \
53 bootable/recovery
Sen Jiang0cce9cd2016-01-22 20:49:07 +080054LOCAL_EXPORT_C_INCLUDE_DIRS := $(LOCAL_PATH)/include
Tao Bao97555da2016-12-15 10:15:06 -080055LOCAL_STATIC_LIBRARIES := \
56 libcrypto \
Sen Jiang25c56972016-05-10 15:23:25 -070057 libbspatch \
Tianjie Xu12b90552017-03-07 14:44:14 -080058 libbase \
Tao Bao97555da2016-12-15 10:15:06 -080059 libbz \
60 libz
Tao Bao087bc0c2017-01-19 10:46:39 -080061LOCAL_CFLAGS := \
62 -DZLIB_CONST \
Tianjie Xuc89d1e72017-08-28 14:15:07 -070063 -Wall \
Tao Bao087bc0c2017-01-19 10:46:39 -080064 -Werror
Sen Jiang0cce9cd2016-01-22 20:49:07 +080065include $(BUILD_STATIC_LIBRARY)
66
Tao Baod80a9982016-03-03 11:43:47 -080067# libimgpatch (host static library)
68# ===============================
Sen Jiang0cce9cd2016-01-22 20:49:07 +080069include $(CLEAR_VARS)
Tao Bao97555da2016-12-15 10:15:06 -080070LOCAL_SRC_FILES := \
71 bspatch.cpp \
Tianjie Xu12b90552017-03-07 14:44:14 -080072 imgpatch.cpp
Sen Jiang0cce9cd2016-01-22 20:49:07 +080073LOCAL_MODULE := libimgpatch
Tao Baod80a9982016-03-03 11:43:47 -080074LOCAL_MODULE_HOST_OS := linux
Tao Bao97555da2016-12-15 10:15:06 -080075LOCAL_C_INCLUDES := \
Tao Baod80a9982016-03-03 11:43:47 -080076 $(LOCAL_PATH)/include \
77 bootable/recovery
Sen Jiang0cce9cd2016-01-22 20:49:07 +080078LOCAL_EXPORT_C_INCLUDE_DIRS := $(LOCAL_PATH)/include
Tao Bao97555da2016-12-15 10:15:06 -080079LOCAL_STATIC_LIBRARIES := \
80 libcrypto \
Sen Jiang25c56972016-05-10 15:23:25 -070081 libbspatch \
Tianjie Xu12b90552017-03-07 14:44:14 -080082 libbase \
Tao Bao97555da2016-12-15 10:15:06 -080083 libbz \
84 libz
Tao Bao087bc0c2017-01-19 10:46:39 -080085LOCAL_CFLAGS := \
86 -DZLIB_CONST \
Tianjie Xuc89d1e72017-08-28 14:15:07 -070087 -Wall \
Tao Bao087bc0c2017-01-19 10:46:39 -080088 -Werror
Sen Jiang0cce9cd2016-01-22 20:49:07 +080089include $(BUILD_HOST_STATIC_LIBRARY)
90
Tao Bao36c35112016-10-25 14:17:26 -070091# libapplypatch_modes (static library)
Tao Baod80a9982016-03-03 11:43:47 -080092# ===============================
Sen Jiang0cce9cd2016-01-22 20:49:07 +080093include $(CLEAR_VARS)
Tao Bao36c35112016-10-25 14:17:26 -070094LOCAL_SRC_FILES := \
95 applypatch_modes.cpp
96LOCAL_MODULE := libapplypatch_modes
97LOCAL_C_INCLUDES := bootable/recovery
98LOCAL_STATIC_LIBRARIES := \
99 libapplypatch \
100 libbase \
101 libedify \
102 libcrypto
Tianjie Xuc89d1e72017-08-28 14:15:07 -0700103LOCAL_CFLAGS := -Wall -Werror
Tao Bao36c35112016-10-25 14:17:26 -0700104include $(BUILD_STATIC_LIBRARY)
105
106# applypatch (target executable)
107# ===============================
108include $(CLEAR_VARS)
Tao Bao36c35112016-10-25 14:17:26 -0700109LOCAL_SRC_FILES := applypatch_main.cpp
Doug Zongker512536a2010-02-17 16:11:44 -0800110LOCAL_MODULE := applypatch
Tao Bao36c35112016-10-25 14:17:26 -0700111LOCAL_C_INCLUDES := bootable/recovery
112LOCAL_STATIC_LIBRARIES := \
113 libapplypatch_modes \
Tao Baod80a9982016-03-03 11:43:47 -0800114 libapplypatch \
Tao Baod80a9982016-03-03 11:43:47 -0800115 libedify \
116 libotafault \
Sen Jiang25c56972016-05-10 15:23:25 -0700117 libbspatch \
Tao Bao646b05a2017-09-28 17:43:53 -0700118 libbase \
119 libziparchive \
120 liblog \
121 libcrypto \
Tao Baod80a9982016-03-03 11:43:47 -0800122 libbz
Tao Bao36c35112016-10-25 14:17:26 -0700123LOCAL_SHARED_LIBRARIES := \
124 libbase \
125 libz \
126 libcutils
Tianjie Xuc89d1e72017-08-28 14:15:07 -0700127LOCAL_CFLAGS := -Wall -Werror
Doug Zongker512536a2010-02-17 16:11:44 -0800128include $(BUILD_EXECUTABLE)
129
Tianjie Xu12b90552017-03-07 14:44:14 -0800130libimgdiff_src_files := imgdiff.cpp
Tao Bao97555da2016-12-15 10:15:06 -0800131
132# libbsdiff is compiled with -D_FILE_OFFSET_BITS=64.
133libimgdiff_cflags := \
Tianjie Xuc89d1e72017-08-28 14:15:07 -0700134 -Wall \
Tao Bao97555da2016-12-15 10:15:06 -0800135 -Werror \
Tianjie Xu6b03ba72017-07-19 14:16:30 -0700136 -D_FILE_OFFSET_BITS=64 \
137 -DZLIB_CONST
Tao Bao97555da2016-12-15 10:15:06 -0800138
139libimgdiff_static_libraries := \
140 libbsdiff \
Sen Jiang930edb62017-01-18 17:26:42 -0800141 libdivsufsort \
142 libdivsufsort64 \
Tianjie Xu1ea84d62017-02-22 18:23:58 -0800143 libziparchive \
144 libutils \
145 liblog \
Tao Baod37ce8f2016-12-17 17:10:04 -0800146 libbase \
Tao Bao97555da2016-12-15 10:15:06 -0800147 libz
148
149# libimgdiff (static library)
150# ===============================
151include $(CLEAR_VARS)
152LOCAL_SRC_FILES := \
153 $(libimgdiff_src_files)
154LOCAL_MODULE := libimgdiff
155LOCAL_CFLAGS := \
156 $(libimgdiff_cflags)
157LOCAL_STATIC_LIBRARIES := \
158 $(libimgdiff_static_libraries)
159LOCAL_C_INCLUDES := \
Tianjie Xu57dd9612017-08-17 17:50:56 -0700160 $(LOCAL_PATH)/include \
161 bootable/recovery
Tao Bao97555da2016-12-15 10:15:06 -0800162LOCAL_EXPORT_C_INCLUDE_DIRS := $(LOCAL_PATH)/include
163include $(BUILD_STATIC_LIBRARY)
164
165# libimgdiff (host static library)
166# ===============================
167include $(CLEAR_VARS)
168LOCAL_SRC_FILES := \
169 $(libimgdiff_src_files)
170LOCAL_MODULE := libimgdiff
171LOCAL_CFLAGS := \
172 $(libimgdiff_cflags)
173LOCAL_STATIC_LIBRARIES := \
174 $(libimgdiff_static_libraries)
175LOCAL_C_INCLUDES := \
Tianjie Xu57dd9612017-08-17 17:50:56 -0700176 $(LOCAL_PATH)/include \
177 bootable/recovery
Tao Bao97555da2016-12-15 10:15:06 -0800178LOCAL_EXPORT_C_INCLUDE_DIRS := $(LOCAL_PATH)/include
179include $(BUILD_HOST_STATIC_LIBRARY)
180
Tao Baod80a9982016-03-03 11:43:47 -0800181# imgdiff (host static executable)
182# ===============================
Doug Zongker512536a2010-02-17 16:11:44 -0800183include $(CLEAR_VARS)
Tao Bao97555da2016-12-15 10:15:06 -0800184LOCAL_SRC_FILES := imgdiff_main.cpp
Doug Zongker512536a2010-02-17 16:11:44 -0800185LOCAL_MODULE := imgdiff
Tianjie Xuc89d1e72017-08-28 14:15:07 -0700186LOCAL_CFLAGS := -Wall -Werror
Tao Bao97555da2016-12-15 10:15:06 -0800187LOCAL_STATIC_LIBRARIES := \
188 libimgdiff \
189 $(libimgdiff_static_libraries) \
Sen Jiang930edb62017-01-18 17:26:42 -0800190 libbz
Tianjie Xu57dd9612017-08-17 17:50:56 -0700191LOCAL_C_INCLUDES := \
192 $(LOCAL_PATH)/include \
193 bootable/recovery
Doug Zongker512536a2010-02-17 16:11:44 -0800194include $(BUILD_HOST_EXECUTABLE)