blob: 59aa0ce6cc8ee6692922dab6cee721606c7cb28b [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 \
115 libbase \
116 libedify \
117 libotafault \
Josh Gao073164f2016-08-05 15:59:05 -0700118 libcrypto \
Sen Jiang25c56972016-05-10 15:23:25 -0700119 libbspatch \
Tao Baod80a9982016-03-03 11:43:47 -0800120 libbz
Tao Bao36c35112016-10-25 14:17:26 -0700121LOCAL_SHARED_LIBRARIES := \
122 libbase \
123 libz \
124 libcutils
Tianjie Xuc89d1e72017-08-28 14:15:07 -0700125LOCAL_CFLAGS := -Wall -Werror
Doug Zongker512536a2010-02-17 16:11:44 -0800126include $(BUILD_EXECUTABLE)
127
Tianjie Xu12b90552017-03-07 14:44:14 -0800128libimgdiff_src_files := imgdiff.cpp
Tao Bao97555da2016-12-15 10:15:06 -0800129
130# libbsdiff is compiled with -D_FILE_OFFSET_BITS=64.
131libimgdiff_cflags := \
Tianjie Xuc89d1e72017-08-28 14:15:07 -0700132 -Wall \
Tao Bao97555da2016-12-15 10:15:06 -0800133 -Werror \
Tianjie Xu6b03ba72017-07-19 14:16:30 -0700134 -D_FILE_OFFSET_BITS=64 \
135 -DZLIB_CONST
Tao Bao97555da2016-12-15 10:15:06 -0800136
137libimgdiff_static_libraries := \
138 libbsdiff \
Sen Jiang930edb62017-01-18 17:26:42 -0800139 libdivsufsort \
140 libdivsufsort64 \
Tianjie Xu1ea84d62017-02-22 18:23:58 -0800141 libziparchive \
142 libutils \
143 liblog \
Tao Baod37ce8f2016-12-17 17:10:04 -0800144 libbase \
Tao Bao97555da2016-12-15 10:15:06 -0800145 libz
146
147# libimgdiff (static library)
148# ===============================
149include $(CLEAR_VARS)
150LOCAL_SRC_FILES := \
151 $(libimgdiff_src_files)
152LOCAL_MODULE := libimgdiff
153LOCAL_CFLAGS := \
154 $(libimgdiff_cflags)
155LOCAL_STATIC_LIBRARIES := \
156 $(libimgdiff_static_libraries)
157LOCAL_C_INCLUDES := \
Tianjie Xu57dd9612017-08-17 17:50:56 -0700158 $(LOCAL_PATH)/include \
159 bootable/recovery
Tao Bao97555da2016-12-15 10:15:06 -0800160LOCAL_EXPORT_C_INCLUDE_DIRS := $(LOCAL_PATH)/include
161include $(BUILD_STATIC_LIBRARY)
162
163# libimgdiff (host static library)
164# ===============================
165include $(CLEAR_VARS)
166LOCAL_SRC_FILES := \
167 $(libimgdiff_src_files)
168LOCAL_MODULE := libimgdiff
169LOCAL_CFLAGS := \
170 $(libimgdiff_cflags)
171LOCAL_STATIC_LIBRARIES := \
172 $(libimgdiff_static_libraries)
173LOCAL_C_INCLUDES := \
Tianjie Xu57dd9612017-08-17 17:50:56 -0700174 $(LOCAL_PATH)/include \
175 bootable/recovery
Tao Bao97555da2016-12-15 10:15:06 -0800176LOCAL_EXPORT_C_INCLUDE_DIRS := $(LOCAL_PATH)/include
177include $(BUILD_HOST_STATIC_LIBRARY)
178
Tao Baod80a9982016-03-03 11:43:47 -0800179# imgdiff (host static executable)
180# ===============================
Doug Zongker512536a2010-02-17 16:11:44 -0800181include $(CLEAR_VARS)
Tao Bao97555da2016-12-15 10:15:06 -0800182LOCAL_SRC_FILES := imgdiff_main.cpp
Doug Zongker512536a2010-02-17 16:11:44 -0800183LOCAL_MODULE := imgdiff
Tianjie Xuc89d1e72017-08-28 14:15:07 -0700184LOCAL_CFLAGS := -Wall -Werror
Tao Bao97555da2016-12-15 10:15:06 -0800185LOCAL_STATIC_LIBRARIES := \
186 libimgdiff \
187 $(libimgdiff_static_libraries) \
Sen Jiang930edb62017-01-18 17:26:42 -0800188 libbz
Tianjie Xu57dd9612017-08-17 17:50:56 -0700189LOCAL_C_INCLUDES := \
190 $(LOCAL_PATH)/include \
191 bootable/recovery
Doug Zongker512536a2010-02-17 16:11:44 -0800192include $(BUILD_HOST_EXECUTABLE)