blob: 8fac2ffed6410e6d5e5eeff8dccf45f1e0ef2439 [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 Bao09e468f2017-09-29 14:39:33 -070028 $(LOCAL_PATH)/include
29LOCAL_EXPORT_C_INCLUDE_DIRS := \
30 $(LOCAL_PATH)/include
Tao Bao97555da2016-12-15 10:15:06 -080031LOCAL_STATIC_LIBRARIES := \
Tao Baoe6f7f952017-10-04 09:33:01 -070032 libedify \
Tao Baod80a9982016-03-03 11:43:47 -080033 libotafault \
Tao Bao09e468f2017-09-29 14:39:33 -070034 libotautil \
Tao Baod80a9982016-03-03 11:43:47 -080035 libbase \
Josh Gao073164f2016-08-05 15:59:05 -070036 libcrypto \
Sen Jiang25c56972016-05-10 15:23:25 -070037 libbspatch \
Tao Baod80a9982016-03-03 11:43:47 -080038 libbz \
39 libz
Tao Bao087bc0c2017-01-19 10:46:39 -080040LOCAL_CFLAGS := \
41 -DZLIB_CONST \
Tianjie Xuc89d1e72017-08-28 14:15:07 -070042 -Wall \
Tao Bao087bc0c2017-01-19 10:46:39 -080043 -Werror
Doug Zongker512536a2010-02-17 16:11:44 -080044include $(BUILD_STATIC_LIBRARY)
45
Tao Baod80a9982016-03-03 11:43:47 -080046# libimgpatch (static library)
47# ===============================
Doug Zongker512536a2010-02-17 16:11:44 -080048include $(CLEAR_VARS)
Tao Bao97555da2016-12-15 10:15:06 -080049LOCAL_SRC_FILES := \
50 bspatch.cpp \
Tianjie Xu12b90552017-03-07 14:44:14 -080051 imgpatch.cpp
Sen Jiang0cce9cd2016-01-22 20:49:07 +080052LOCAL_MODULE := libimgpatch
Tao Bao97555da2016-12-15 10:15:06 -080053LOCAL_C_INCLUDES := \
Tao Bao09e468f2017-09-29 14:39:33 -070054 $(LOCAL_PATH)/include
55LOCAL_EXPORT_C_INCLUDE_DIRS := \
56 $(LOCAL_PATH)/include
Tao Bao97555da2016-12-15 10:15:06 -080057LOCAL_STATIC_LIBRARIES := \
Tao Bao38d78d12017-10-09 11:03:38 -070058 libedify \
Tao Bao09e468f2017-09-29 14:39:33 -070059 libotautil \
Tao Bao97555da2016-12-15 10:15:06 -080060 libcrypto \
Sen Jiang25c56972016-05-10 15:23:25 -070061 libbspatch \
Tianjie Xu12b90552017-03-07 14:44:14 -080062 libbase \
Tao Bao97555da2016-12-15 10:15:06 -080063 libbz \
64 libz
Tao Bao087bc0c2017-01-19 10:46:39 -080065LOCAL_CFLAGS := \
66 -DZLIB_CONST \
Tianjie Xuc89d1e72017-08-28 14:15:07 -070067 -Wall \
Tao Bao087bc0c2017-01-19 10:46:39 -080068 -Werror
Sen Jiang0cce9cd2016-01-22 20:49:07 +080069include $(BUILD_STATIC_LIBRARY)
70
Tao Baod80a9982016-03-03 11:43:47 -080071# libimgpatch (host static library)
72# ===============================
Sen Jiang0cce9cd2016-01-22 20:49:07 +080073include $(CLEAR_VARS)
Tao Bao97555da2016-12-15 10:15:06 -080074LOCAL_SRC_FILES := \
75 bspatch.cpp \
Tianjie Xu12b90552017-03-07 14:44:14 -080076 imgpatch.cpp
Sen Jiang0cce9cd2016-01-22 20:49:07 +080077LOCAL_MODULE := libimgpatch
Tao Baod80a9982016-03-03 11:43:47 -080078LOCAL_MODULE_HOST_OS := linux
Tao Bao97555da2016-12-15 10:15:06 -080079LOCAL_C_INCLUDES := \
Tao Bao09e468f2017-09-29 14:39:33 -070080 $(LOCAL_PATH)/include
81LOCAL_EXPORT_C_INCLUDE_DIRS := \
82 $(LOCAL_PATH)/include
Tao Bao97555da2016-12-15 10:15:06 -080083LOCAL_STATIC_LIBRARIES := \
Tao Bao38d78d12017-10-09 11:03:38 -070084 libedify \
Tao Bao09e468f2017-09-29 14:39:33 -070085 libotautil \
Tao Bao97555da2016-12-15 10:15:06 -080086 libcrypto \
Sen Jiang25c56972016-05-10 15:23:25 -070087 libbspatch \
Tianjie Xu12b90552017-03-07 14:44:14 -080088 libbase \
Tao Bao97555da2016-12-15 10:15:06 -080089 libbz \
90 libz
Tao Bao087bc0c2017-01-19 10:46:39 -080091LOCAL_CFLAGS := \
92 -DZLIB_CONST \
Tianjie Xuc89d1e72017-08-28 14:15:07 -070093 -Wall \
Tao Bao087bc0c2017-01-19 10:46:39 -080094 -Werror
Sen Jiang0cce9cd2016-01-22 20:49:07 +080095include $(BUILD_HOST_STATIC_LIBRARY)
96
Tao Bao36c35112016-10-25 14:17:26 -070097# libapplypatch_modes (static library)
Tao Baod80a9982016-03-03 11:43:47 -080098# ===============================
Sen Jiang0cce9cd2016-01-22 20:49:07 +080099include $(CLEAR_VARS)
Tao Bao36c35112016-10-25 14:17:26 -0700100LOCAL_SRC_FILES := \
101 applypatch_modes.cpp
102LOCAL_MODULE := libapplypatch_modes
Tao Bao36c35112016-10-25 14:17:26 -0700103LOCAL_STATIC_LIBRARIES := \
104 libapplypatch \
Tao Bao09e468f2017-09-29 14:39:33 -0700105 libotautil \
Tao Bao36c35112016-10-25 14:17:26 -0700106 libbase \
107 libedify \
108 libcrypto
Tianjie Xuc89d1e72017-08-28 14:15:07 -0700109LOCAL_CFLAGS := -Wall -Werror
Tao Bao36c35112016-10-25 14:17:26 -0700110include $(BUILD_STATIC_LIBRARY)
111
112# applypatch (target executable)
113# ===============================
114include $(CLEAR_VARS)
Tao Bao36c35112016-10-25 14:17:26 -0700115LOCAL_SRC_FILES := applypatch_main.cpp
Doug Zongker512536a2010-02-17 16:11:44 -0800116LOCAL_MODULE := applypatch
Tao Bao36c35112016-10-25 14:17:26 -0700117LOCAL_STATIC_LIBRARIES := \
118 libapplypatch_modes \
Tao Baod80a9982016-03-03 11:43:47 -0800119 libapplypatch \
Tao Baod80a9982016-03-03 11:43:47 -0800120 libedify \
121 libotafault \
Tao Bao1fc5bf32017-10-06 07:43:41 -0700122 libotautil \
Tao Bao44fc7b12017-10-11 11:32:46 -0700123 libbspatch
Tao Bao36c35112016-10-25 14:17:26 -0700124LOCAL_SHARED_LIBRARIES := \
125 libbase \
Tao Bao44fc7b12017-10-11 11:32:46 -0700126 libbz \
Tao Bao3db32052017-10-10 15:02:13 -0700127 libcrypto \
128 liblog \
Tao Bao36c35112016-10-25 14:17:26 -0700129 libz \
Tao Bao3db32052017-10-10 15:02:13 -0700130 libziparchive
Tianjie Xuc89d1e72017-08-28 14:15:07 -0700131LOCAL_CFLAGS := -Wall -Werror
Doug Zongker512536a2010-02-17 16:11:44 -0800132include $(BUILD_EXECUTABLE)
133
Tianjie Xu12b90552017-03-07 14:44:14 -0800134libimgdiff_src_files := imgdiff.cpp
Tao Bao97555da2016-12-15 10:15:06 -0800135
136# libbsdiff is compiled with -D_FILE_OFFSET_BITS=64.
137libimgdiff_cflags := \
Tianjie Xuc89d1e72017-08-28 14:15:07 -0700138 -Wall \
Tao Bao97555da2016-12-15 10:15:06 -0800139 -Werror \
Tianjie Xu6b03ba72017-07-19 14:16:30 -0700140 -D_FILE_OFFSET_BITS=64 \
141 -DZLIB_CONST
Tao Bao97555da2016-12-15 10:15:06 -0800142
143libimgdiff_static_libraries := \
Tao Bao09e468f2017-09-29 14:39:33 -0700144 libotautil \
Tao Bao97555da2016-12-15 10:15:06 -0800145 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 := \
Tao Bao09e468f2017-09-29 14:39:33 -0700165 $(LOCAL_PATH)/include
Tao Bao97555da2016-12-15 10:15:06 -0800166LOCAL_EXPORT_C_INCLUDE_DIRS := $(LOCAL_PATH)/include
167include $(BUILD_STATIC_LIBRARY)
168
169# libimgdiff (host static library)
170# ===============================
171include $(CLEAR_VARS)
172LOCAL_SRC_FILES := \
173 $(libimgdiff_src_files)
174LOCAL_MODULE := libimgdiff
175LOCAL_CFLAGS := \
176 $(libimgdiff_cflags)
177LOCAL_STATIC_LIBRARIES := \
178 $(libimgdiff_static_libraries)
179LOCAL_C_INCLUDES := \
Tao Bao09e468f2017-09-29 14:39:33 -0700180 $(LOCAL_PATH)/include
Tao Bao97555da2016-12-15 10:15:06 -0800181LOCAL_EXPORT_C_INCLUDE_DIRS := $(LOCAL_PATH)/include
182include $(BUILD_HOST_STATIC_LIBRARY)
183
Tao Baod80a9982016-03-03 11:43:47 -0800184# imgdiff (host static executable)
185# ===============================
Doug Zongker512536a2010-02-17 16:11:44 -0800186include $(CLEAR_VARS)
Tao Bao97555da2016-12-15 10:15:06 -0800187LOCAL_SRC_FILES := imgdiff_main.cpp
Doug Zongker512536a2010-02-17 16:11:44 -0800188LOCAL_MODULE := imgdiff
Tianjie Xuc89d1e72017-08-28 14:15:07 -0700189LOCAL_CFLAGS := -Wall -Werror
Tao Bao97555da2016-12-15 10:15:06 -0800190LOCAL_STATIC_LIBRARIES := \
191 libimgdiff \
192 $(libimgdiff_static_libraries) \
Sen Jiang930edb62017-01-18 17:26:42 -0800193 libbz
Tianjie Xu57dd9612017-08-17 17:50:56 -0700194LOCAL_C_INCLUDES := \
Tao Bao09e468f2017-09-29 14:39:33 -0700195 $(LOCAL_PATH)/include
Doug Zongker512536a2010-02-17 16:11:44 -0800196include $(BUILD_HOST_EXECUTABLE)