blob: db72e8eee303aec85fbac559529bc8ad2d6f2daa [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 := \
Tao Bao38d78d12017-10-09 11:03:38 -070056 libedify \
Tao Bao97555da2016-12-15 10:15:06 -080057 libcrypto \
Sen Jiang25c56972016-05-10 15:23:25 -070058 libbspatch \
Tianjie Xu12b90552017-03-07 14:44:14 -080059 libbase \
Tao Bao97555da2016-12-15 10:15:06 -080060 libbz \
61 libz
Tao Bao087bc0c2017-01-19 10:46:39 -080062LOCAL_CFLAGS := \
63 -DZLIB_CONST \
Tianjie Xuc89d1e72017-08-28 14:15:07 -070064 -Wall \
Tao Bao087bc0c2017-01-19 10:46:39 -080065 -Werror
Sen Jiang0cce9cd2016-01-22 20:49:07 +080066include $(BUILD_STATIC_LIBRARY)
67
Tao Baod80a9982016-03-03 11:43:47 -080068# libimgpatch (host static library)
69# ===============================
Sen Jiang0cce9cd2016-01-22 20:49:07 +080070include $(CLEAR_VARS)
Tao Bao97555da2016-12-15 10:15:06 -080071LOCAL_SRC_FILES := \
72 bspatch.cpp \
Tianjie Xu12b90552017-03-07 14:44:14 -080073 imgpatch.cpp
Sen Jiang0cce9cd2016-01-22 20:49:07 +080074LOCAL_MODULE := libimgpatch
Tao Baod80a9982016-03-03 11:43:47 -080075LOCAL_MODULE_HOST_OS := linux
Tao Bao97555da2016-12-15 10:15:06 -080076LOCAL_C_INCLUDES := \
Tao Baod80a9982016-03-03 11:43:47 -080077 $(LOCAL_PATH)/include \
78 bootable/recovery
Sen Jiang0cce9cd2016-01-22 20:49:07 +080079LOCAL_EXPORT_C_INCLUDE_DIRS := $(LOCAL_PATH)/include
Tao Bao97555da2016-12-15 10:15:06 -080080LOCAL_STATIC_LIBRARIES := \
Tao Bao38d78d12017-10-09 11:03:38 -070081 libedify \
Tao Bao97555da2016-12-15 10:15:06 -080082 libcrypto \
Sen Jiang25c56972016-05-10 15:23:25 -070083 libbspatch \
Tianjie Xu12b90552017-03-07 14:44:14 -080084 libbase \
Tao Bao97555da2016-12-15 10:15:06 -080085 libbz \
86 libz
Tao Bao087bc0c2017-01-19 10:46:39 -080087LOCAL_CFLAGS := \
88 -DZLIB_CONST \
Tianjie Xuc89d1e72017-08-28 14:15:07 -070089 -Wall \
Tao Bao087bc0c2017-01-19 10:46:39 -080090 -Werror
Sen Jiang0cce9cd2016-01-22 20:49:07 +080091include $(BUILD_HOST_STATIC_LIBRARY)
92
Tao Bao36c35112016-10-25 14:17:26 -070093# libapplypatch_modes (static library)
Tao Baod80a9982016-03-03 11:43:47 -080094# ===============================
Sen Jiang0cce9cd2016-01-22 20:49:07 +080095include $(CLEAR_VARS)
Tao Bao36c35112016-10-25 14:17:26 -070096LOCAL_SRC_FILES := \
97 applypatch_modes.cpp
98LOCAL_MODULE := libapplypatch_modes
99LOCAL_C_INCLUDES := bootable/recovery
100LOCAL_STATIC_LIBRARIES := \
101 libapplypatch \
102 libbase \
103 libedify \
104 libcrypto
Tianjie Xuc89d1e72017-08-28 14:15:07 -0700105LOCAL_CFLAGS := -Wall -Werror
Tao Bao36c35112016-10-25 14:17:26 -0700106include $(BUILD_STATIC_LIBRARY)
107
108# applypatch (target executable)
109# ===============================
110include $(CLEAR_VARS)
Tao Bao36c35112016-10-25 14:17:26 -0700111LOCAL_SRC_FILES := applypatch_main.cpp
Doug Zongker512536a2010-02-17 16:11:44 -0800112LOCAL_MODULE := applypatch
Tao Bao36c35112016-10-25 14:17:26 -0700113LOCAL_C_INCLUDES := bootable/recovery
114LOCAL_STATIC_LIBRARIES := \
115 libapplypatch_modes \
Tao Baod80a9982016-03-03 11:43:47 -0800116 libapplypatch \
Tao Baod80a9982016-03-03 11:43:47 -0800117 libedify \
118 libotafault \
Sen Jiang25c56972016-05-10 15:23:25 -0700119 libbspatch \
Tao Bao646b05a2017-09-28 17:43:53 -0700120 libbase \
121 libziparchive \
122 liblog \
123 libcrypto \
Tao Baod80a9982016-03-03 11:43:47 -0800124 libbz
Tao Bao36c35112016-10-25 14:17:26 -0700125LOCAL_SHARED_LIBRARIES := \
126 libbase \
127 libz \
128 libcutils
Tianjie Xuc89d1e72017-08-28 14:15:07 -0700129LOCAL_CFLAGS := -Wall -Werror
Doug Zongker512536a2010-02-17 16:11:44 -0800130include $(BUILD_EXECUTABLE)
131
Tianjie Xu12b90552017-03-07 14:44:14 -0800132libimgdiff_src_files := imgdiff.cpp
Tao Bao97555da2016-12-15 10:15:06 -0800133
134# libbsdiff is compiled with -D_FILE_OFFSET_BITS=64.
135libimgdiff_cflags := \
Tianjie Xuc89d1e72017-08-28 14:15:07 -0700136 -Wall \
Tao Bao97555da2016-12-15 10:15:06 -0800137 -Werror \
Tianjie Xu6b03ba72017-07-19 14:16:30 -0700138 -D_FILE_OFFSET_BITS=64 \
139 -DZLIB_CONST
Tao Bao97555da2016-12-15 10:15:06 -0800140
141libimgdiff_static_libraries := \
142 libbsdiff \
Sen Jiang930edb62017-01-18 17:26:42 -0800143 libdivsufsort \
144 libdivsufsort64 \
Tianjie Xu1ea84d62017-02-22 18:23:58 -0800145 libziparchive \
146 libutils \
147 liblog \
Tao Baod37ce8f2016-12-17 17:10:04 -0800148 libbase \
Tao Bao97555da2016-12-15 10:15:06 -0800149 libz
150
151# libimgdiff (static library)
152# ===============================
153include $(CLEAR_VARS)
154LOCAL_SRC_FILES := \
155 $(libimgdiff_src_files)
156LOCAL_MODULE := libimgdiff
157LOCAL_CFLAGS := \
158 $(libimgdiff_cflags)
159LOCAL_STATIC_LIBRARIES := \
160 $(libimgdiff_static_libraries)
161LOCAL_C_INCLUDES := \
Tianjie Xu57dd9612017-08-17 17:50:56 -0700162 $(LOCAL_PATH)/include \
163 bootable/recovery
Tao Bao97555da2016-12-15 10:15:06 -0800164LOCAL_EXPORT_C_INCLUDE_DIRS := $(LOCAL_PATH)/include
165include $(BUILD_STATIC_LIBRARY)
166
167# libimgdiff (host static library)
168# ===============================
169include $(CLEAR_VARS)
170LOCAL_SRC_FILES := \
171 $(libimgdiff_src_files)
172LOCAL_MODULE := libimgdiff
173LOCAL_CFLAGS := \
174 $(libimgdiff_cflags)
175LOCAL_STATIC_LIBRARIES := \
176 $(libimgdiff_static_libraries)
177LOCAL_C_INCLUDES := \
Tianjie Xu57dd9612017-08-17 17:50:56 -0700178 $(LOCAL_PATH)/include \
179 bootable/recovery
Tao Bao97555da2016-12-15 10:15:06 -0800180LOCAL_EXPORT_C_INCLUDE_DIRS := $(LOCAL_PATH)/include
181include $(BUILD_HOST_STATIC_LIBRARY)
182
Tao Baod80a9982016-03-03 11:43:47 -0800183# imgdiff (host static executable)
184# ===============================
Doug Zongker512536a2010-02-17 16:11:44 -0800185include $(CLEAR_VARS)
Tao Bao97555da2016-12-15 10:15:06 -0800186LOCAL_SRC_FILES := imgdiff_main.cpp
Doug Zongker512536a2010-02-17 16:11:44 -0800187LOCAL_MODULE := imgdiff
Tianjie Xuc89d1e72017-08-28 14:15:07 -0700188LOCAL_CFLAGS := -Wall -Werror
Tao Bao97555da2016-12-15 10:15:06 -0800189LOCAL_STATIC_LIBRARIES := \
190 libimgdiff \
191 $(libimgdiff_static_libraries) \
Sen Jiang930edb62017-01-18 17:26:42 -0800192 libbz
Tianjie Xu57dd9612017-08-17 17:50:56 -0700193LOCAL_C_INCLUDES := \
194 $(LOCAL_PATH)/include \
195 bootable/recovery
Doug Zongker512536a2010-02-17 16:11:44 -0800196include $(BUILD_HOST_EXECUTABLE)