blob: f02957e7e0ac975455008c25421ec7058c2204c6 [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 Bao623fe7e2017-10-02 16:28:06 -070033 libotautil \
Tao Baod80a9982016-03-03 11:43:47 -080034 libbase \
Josh Gao073164f2016-08-05 15:59:05 -070035 libcrypto \
Sen Jiang25c56972016-05-10 15:23:25 -070036 libbspatch \
Tao Baod80a9982016-03-03 11:43:47 -080037 libbz \
38 libz
Tao Bao087bc0c2017-01-19 10:46:39 -080039LOCAL_CFLAGS := \
40 -DZLIB_CONST \
Tianjie Xuc89d1e72017-08-28 14:15:07 -070041 -Wall \
Tao Bao087bc0c2017-01-19 10:46:39 -080042 -Werror
Doug Zongker512536a2010-02-17 16:11:44 -080043include $(BUILD_STATIC_LIBRARY)
44
Tao Baod80a9982016-03-03 11:43:47 -080045# libimgpatch (static library)
46# ===============================
Doug Zongker512536a2010-02-17 16:11:44 -080047include $(CLEAR_VARS)
Tao Bao97555da2016-12-15 10:15:06 -080048LOCAL_SRC_FILES := \
49 bspatch.cpp \
Tianjie Xu12b90552017-03-07 14:44:14 -080050 imgpatch.cpp
Sen Jiang0cce9cd2016-01-22 20:49:07 +080051LOCAL_MODULE := libimgpatch
Tao Bao97555da2016-12-15 10:15:06 -080052LOCAL_C_INCLUDES := \
Tao Baod80a9982016-03-03 11:43:47 -080053 $(LOCAL_PATH)/include \
54 bootable/recovery
Sen Jiang0cce9cd2016-01-22 20:49:07 +080055LOCAL_EXPORT_C_INCLUDE_DIRS := $(LOCAL_PATH)/include
Tao Bao97555da2016-12-15 10:15:06 -080056LOCAL_STATIC_LIBRARIES := \
Tao Bao623fe7e2017-10-02 16:28:06 -070057 libotautil \
Tao Bao97555da2016-12-15 10:15:06 -080058 libcrypto \
Sen Jiang25c56972016-05-10 15:23:25 -070059 libbspatch \
Tianjie Xu12b90552017-03-07 14:44:14 -080060 libbase \
Tao Bao97555da2016-12-15 10:15:06 -080061 libbz \
62 libz
Tao Bao087bc0c2017-01-19 10:46:39 -080063LOCAL_CFLAGS := \
64 -DZLIB_CONST \
Tianjie Xuc89d1e72017-08-28 14:15:07 -070065 -Wall \
Tao Bao087bc0c2017-01-19 10:46:39 -080066 -Werror
Sen Jiang0cce9cd2016-01-22 20:49:07 +080067include $(BUILD_STATIC_LIBRARY)
68
Tao Baod80a9982016-03-03 11:43:47 -080069# libimgpatch (host static library)
70# ===============================
Sen Jiang0cce9cd2016-01-22 20:49:07 +080071include $(CLEAR_VARS)
Tao Bao97555da2016-12-15 10:15:06 -080072LOCAL_SRC_FILES := \
73 bspatch.cpp \
Tianjie Xu12b90552017-03-07 14:44:14 -080074 imgpatch.cpp
Sen Jiang0cce9cd2016-01-22 20:49:07 +080075LOCAL_MODULE := libimgpatch
Tao Baod80a9982016-03-03 11:43:47 -080076LOCAL_MODULE_HOST_OS := linux
Tao Bao97555da2016-12-15 10:15:06 -080077LOCAL_C_INCLUDES := \
Tao Baod80a9982016-03-03 11:43:47 -080078 $(LOCAL_PATH)/include \
79 bootable/recovery
Sen Jiang0cce9cd2016-01-22 20:49:07 +080080LOCAL_EXPORT_C_INCLUDE_DIRS := $(LOCAL_PATH)/include
Tao Bao97555da2016-12-15 10:15:06 -080081LOCAL_STATIC_LIBRARIES := \
Tao Bao623fe7e2017-10-02 16:28:06 -070082 libotautil \
Tao Bao97555da2016-12-15 10:15:06 -080083 libcrypto \
Sen Jiang25c56972016-05-10 15:23:25 -070084 libbspatch \
Tianjie Xu12b90552017-03-07 14:44:14 -080085 libbase \
Tao Bao97555da2016-12-15 10:15:06 -080086 libbz \
87 libz
Tao Bao087bc0c2017-01-19 10:46:39 -080088LOCAL_CFLAGS := \
89 -DZLIB_CONST \
Tianjie Xuc89d1e72017-08-28 14:15:07 -070090 -Wall \
Tao Bao087bc0c2017-01-19 10:46:39 -080091 -Werror
Sen Jiang0cce9cd2016-01-22 20:49:07 +080092include $(BUILD_HOST_STATIC_LIBRARY)
93
Tao Bao36c35112016-10-25 14:17:26 -070094# libapplypatch_modes (static library)
Tao Baod80a9982016-03-03 11:43:47 -080095# ===============================
Sen Jiang0cce9cd2016-01-22 20:49:07 +080096include $(CLEAR_VARS)
Tao Bao36c35112016-10-25 14:17:26 -070097LOCAL_SRC_FILES := \
98 applypatch_modes.cpp
99LOCAL_MODULE := libapplypatch_modes
100LOCAL_C_INCLUDES := bootable/recovery
101LOCAL_STATIC_LIBRARIES := \
102 libapplypatch \
103 libbase \
104 libedify \
Tao Bao623fe7e2017-10-02 16:28:06 -0700105 libotautil \
Tao Bao36c35112016-10-25 14:17:26 -0700106 libcrypto
Tianjie Xuc89d1e72017-08-28 14:15:07 -0700107LOCAL_CFLAGS := -Wall -Werror
Tao Bao36c35112016-10-25 14:17:26 -0700108include $(BUILD_STATIC_LIBRARY)
109
110# applypatch (target executable)
111# ===============================
112include $(CLEAR_VARS)
Tao Bao36c35112016-10-25 14:17:26 -0700113LOCAL_SRC_FILES := applypatch_main.cpp
Doug Zongker512536a2010-02-17 16:11:44 -0800114LOCAL_MODULE := applypatch
Tao Bao36c35112016-10-25 14:17:26 -0700115LOCAL_C_INCLUDES := bootable/recovery
116LOCAL_STATIC_LIBRARIES := \
117 libapplypatch_modes \
Tao Baod80a9982016-03-03 11:43:47 -0800118 libapplypatch \
Tao Baod80a9982016-03-03 11:43:47 -0800119 libedify \
120 libotafault \
Tao Bao623fe7e2017-10-02 16:28:06 -0700121 libotautil \
Sen Jiang25c56972016-05-10 15:23:25 -0700122 libbspatch \
Tao Bao646b05a2017-09-28 17:43:53 -0700123 libbase \
124 libziparchive \
125 liblog \
126 libcrypto \
Tao Baod80a9982016-03-03 11:43:47 -0800127 libbz
Tao Bao36c35112016-10-25 14:17:26 -0700128LOCAL_SHARED_LIBRARIES := \
129 libbase \
130 libz \
131 libcutils
Tianjie Xuc89d1e72017-08-28 14:15:07 -0700132LOCAL_CFLAGS := -Wall -Werror
Doug Zongker512536a2010-02-17 16:11:44 -0800133include $(BUILD_EXECUTABLE)
134
Tianjie Xu12b90552017-03-07 14:44:14 -0800135libimgdiff_src_files := imgdiff.cpp
Tao Bao97555da2016-12-15 10:15:06 -0800136
137# libbsdiff is compiled with -D_FILE_OFFSET_BITS=64.
138libimgdiff_cflags := \
Tianjie Xuc89d1e72017-08-28 14:15:07 -0700139 -Wall \
Tao Bao97555da2016-12-15 10:15:06 -0800140 -Werror \
Tianjie Xu6b03ba72017-07-19 14:16:30 -0700141 -D_FILE_OFFSET_BITS=64 \
142 -DZLIB_CONST
Tao Bao97555da2016-12-15 10:15:06 -0800143
144libimgdiff_static_libraries := \
145 libbsdiff \
Sen Jiang930edb62017-01-18 17:26:42 -0800146 libdivsufsort \
147 libdivsufsort64 \
Tianjie Xu1ea84d62017-02-22 18:23:58 -0800148 libziparchive \
149 libutils \
150 liblog \
Tao Baod37ce8f2016-12-17 17:10:04 -0800151 libbase \
Tao Bao97555da2016-12-15 10:15:06 -0800152 libz
153
154# libimgdiff (static library)
155# ===============================
156include $(CLEAR_VARS)
157LOCAL_SRC_FILES := \
158 $(libimgdiff_src_files)
159LOCAL_MODULE := libimgdiff
160LOCAL_CFLAGS := \
161 $(libimgdiff_cflags)
162LOCAL_STATIC_LIBRARIES := \
163 $(libimgdiff_static_libraries)
164LOCAL_C_INCLUDES := \
Tianjie Xu57dd9612017-08-17 17:50:56 -0700165 $(LOCAL_PATH)/include \
166 bootable/recovery
Tao Bao97555da2016-12-15 10:15:06 -0800167LOCAL_EXPORT_C_INCLUDE_DIRS := $(LOCAL_PATH)/include
168include $(BUILD_STATIC_LIBRARY)
169
170# libimgdiff (host static library)
171# ===============================
172include $(CLEAR_VARS)
173LOCAL_SRC_FILES := \
174 $(libimgdiff_src_files)
175LOCAL_MODULE := libimgdiff
176LOCAL_CFLAGS := \
177 $(libimgdiff_cflags)
178LOCAL_STATIC_LIBRARIES := \
179 $(libimgdiff_static_libraries)
180LOCAL_C_INCLUDES := \
Tianjie Xu57dd9612017-08-17 17:50:56 -0700181 $(LOCAL_PATH)/include \
182 bootable/recovery
Tao Bao97555da2016-12-15 10:15:06 -0800183LOCAL_EXPORT_C_INCLUDE_DIRS := $(LOCAL_PATH)/include
184include $(BUILD_HOST_STATIC_LIBRARY)
185
Tao Baod80a9982016-03-03 11:43:47 -0800186# imgdiff (host static executable)
187# ===============================
Doug Zongker512536a2010-02-17 16:11:44 -0800188include $(CLEAR_VARS)
Tao Bao97555da2016-12-15 10:15:06 -0800189LOCAL_SRC_FILES := imgdiff_main.cpp
Doug Zongker512536a2010-02-17 16:11:44 -0800190LOCAL_MODULE := imgdiff
Tianjie Xuc89d1e72017-08-28 14:15:07 -0700191LOCAL_CFLAGS := -Wall -Werror
Tao Bao97555da2016-12-15 10:15:06 -0800192LOCAL_STATIC_LIBRARIES := \
193 libimgdiff \
194 $(libimgdiff_static_libraries) \
Sen Jiang930edb62017-01-18 17:26:42 -0800195 libbz
Tianjie Xu57dd9612017-08-17 17:50:56 -0700196LOCAL_C_INCLUDES := \
197 $(LOCAL_PATH)/include \
198 bootable/recovery
Doug Zongker512536a2010-02-17 16:11:44 -0800199include $(BUILD_HOST_EXECUTABLE)