blob: 85b5c9fcdcbd077d60de012d50fa8cdf26da0da7 [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 \
24 imgpatch.cpp \
25 utils.cpp
Doug Zongker512536a2010-02-17 16:11:44 -080026LOCAL_MODULE := libapplypatch
27LOCAL_MODULE_TAGS := eng
Tao Bao97555da2016-12-15 10:15:06 -080028LOCAL_C_INCLUDES := \
Tao Baod80a9982016-03-03 11:43:47 -080029 $(LOCAL_PATH)/include \
30 bootable/recovery
31LOCAL_EXPORT_C_INCLUDE_DIRS := $(LOCAL_PATH)/include
Tao Bao97555da2016-12-15 10:15:06 -080032LOCAL_STATIC_LIBRARIES := \
Tao Baod80a9982016-03-03 11:43:47 -080033 libotafault \
Tao Baod80a9982016-03-03 11:43:47 -080034 libbase \
Josh Gao073164f2016-08-05 15:59:05 -070035 libcrypto \
Tao Baod80a9982016-03-03 11:43:47 -080036 libbz \
37 libz
Tianjie Xu7aa88742016-09-28 11:42:17 -070038LOCAL_CFLAGS := -Werror
Doug Zongker512536a2010-02-17 16:11:44 -080039include $(BUILD_STATIC_LIBRARY)
40
Tao Baod80a9982016-03-03 11:43:47 -080041# libimgpatch (static library)
42# ===============================
Doug Zongker512536a2010-02-17 16:11:44 -080043include $(CLEAR_VARS)
Tao Bao97555da2016-12-15 10:15:06 -080044LOCAL_SRC_FILES := \
45 bspatch.cpp \
46 imgpatch.cpp \
47 utils.cpp
Sen Jiang0cce9cd2016-01-22 20:49:07 +080048LOCAL_MODULE := libimgpatch
Tao Bao97555da2016-12-15 10:15:06 -080049LOCAL_C_INCLUDES := \
Tao Baod80a9982016-03-03 11:43:47 -080050 $(LOCAL_PATH)/include \
51 bootable/recovery
Sen Jiang0cce9cd2016-01-22 20:49:07 +080052LOCAL_EXPORT_C_INCLUDE_DIRS := $(LOCAL_PATH)/include
Tao Bao97555da2016-12-15 10:15:06 -080053LOCAL_STATIC_LIBRARIES := \
54 libcrypto \
55 libbz \
56 libz
Tianjie Xu7aa88742016-09-28 11:42:17 -070057LOCAL_CFLAGS := -Werror
Sen Jiang0cce9cd2016-01-22 20:49:07 +080058include $(BUILD_STATIC_LIBRARY)
59
Tao Baod80a9982016-03-03 11:43:47 -080060# libimgpatch (host static library)
61# ===============================
Sen Jiang0cce9cd2016-01-22 20:49:07 +080062include $(CLEAR_VARS)
Tao Bao97555da2016-12-15 10:15:06 -080063LOCAL_SRC_FILES := \
64 bspatch.cpp \
65 imgpatch.cpp \
66 utils.cpp
Sen Jiang0cce9cd2016-01-22 20:49:07 +080067LOCAL_MODULE := libimgpatch
Tao Baod80a9982016-03-03 11:43:47 -080068LOCAL_MODULE_HOST_OS := linux
Tao Bao97555da2016-12-15 10:15:06 -080069LOCAL_C_INCLUDES := \
Tao Baod80a9982016-03-03 11:43:47 -080070 $(LOCAL_PATH)/include \
71 bootable/recovery
Sen Jiang0cce9cd2016-01-22 20:49:07 +080072LOCAL_EXPORT_C_INCLUDE_DIRS := $(LOCAL_PATH)/include
Tao Bao97555da2016-12-15 10:15:06 -080073LOCAL_STATIC_LIBRARIES := \
74 libcrypto \
75 libbz \
76 libz
Tianjie Xu7aa88742016-09-28 11:42:17 -070077LOCAL_CFLAGS := -Werror
Sen Jiang0cce9cd2016-01-22 20:49:07 +080078include $(BUILD_HOST_STATIC_LIBRARY)
79
Tao Bao36c35112016-10-25 14:17:26 -070080# libapplypatch_modes (static library)
Tao Baod80a9982016-03-03 11:43:47 -080081# ===============================
Sen Jiang0cce9cd2016-01-22 20:49:07 +080082include $(CLEAR_VARS)
Tao Bao36c35112016-10-25 14:17:26 -070083LOCAL_SRC_FILES := \
84 applypatch_modes.cpp
85LOCAL_MODULE := libapplypatch_modes
86LOCAL_C_INCLUDES := bootable/recovery
87LOCAL_STATIC_LIBRARIES := \
88 libapplypatch \
89 libbase \
90 libedify \
91 libcrypto
92LOCAL_CFLAGS := -Werror
93include $(BUILD_STATIC_LIBRARY)
94
95# applypatch (target executable)
96# ===============================
97include $(CLEAR_VARS)
Tao Bao36c35112016-10-25 14:17:26 -070098LOCAL_SRC_FILES := applypatch_main.cpp
Doug Zongker512536a2010-02-17 16:11:44 -080099LOCAL_MODULE := applypatch
Tao Bao36c35112016-10-25 14:17:26 -0700100LOCAL_C_INCLUDES := bootable/recovery
101LOCAL_STATIC_LIBRARIES := \
102 libapplypatch_modes \
Tao Baod80a9982016-03-03 11:43:47 -0800103 libapplypatch \
104 libbase \
105 libedify \
106 libotafault \
Josh Gao073164f2016-08-05 15:59:05 -0700107 libcrypto \
Tao Baod80a9982016-03-03 11:43:47 -0800108 libbz
Tao Bao36c35112016-10-25 14:17:26 -0700109LOCAL_SHARED_LIBRARIES := \
110 libbase \
111 libz \
112 libcutils
Tianjie Xu7aa88742016-09-28 11:42:17 -0700113LOCAL_CFLAGS := -Werror
Doug Zongker512536a2010-02-17 16:11:44 -0800114include $(BUILD_EXECUTABLE)
115
Tao Bao97555da2016-12-15 10:15:06 -0800116libimgdiff_src_files := \
117 imgdiff.cpp \
118 utils.cpp
119
120# libbsdiff is compiled with -D_FILE_OFFSET_BITS=64.
121libimgdiff_cflags := \
122 -Werror \
123 -D_FILE_OFFSET_BITS=64
124
125libimgdiff_static_libraries := \
126 libbsdiff \
Sen Jiang930edb62017-01-18 17:26:42 -0800127 libdivsufsort \
128 libdivsufsort64 \
Tao Baod37ce8f2016-12-17 17:10:04 -0800129 libbase \
Tao Bao97555da2016-12-15 10:15:06 -0800130 libz
131
132# libimgdiff (static library)
133# ===============================
134include $(CLEAR_VARS)
135LOCAL_SRC_FILES := \
136 $(libimgdiff_src_files)
137LOCAL_MODULE := libimgdiff
138LOCAL_CFLAGS := \
139 $(libimgdiff_cflags)
140LOCAL_STATIC_LIBRARIES := \
141 $(libimgdiff_static_libraries)
142LOCAL_C_INCLUDES := \
143 $(LOCAL_PATH)/include
144LOCAL_EXPORT_C_INCLUDE_DIRS := $(LOCAL_PATH)/include
145include $(BUILD_STATIC_LIBRARY)
146
147# libimgdiff (host 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 := \
158 $(LOCAL_PATH)/include
159LOCAL_EXPORT_C_INCLUDE_DIRS := $(LOCAL_PATH)/include
160include $(BUILD_HOST_STATIC_LIBRARY)
161
Tao Baod80a9982016-03-03 11:43:47 -0800162# imgdiff (host static executable)
163# ===============================
Doug Zongker512536a2010-02-17 16:11:44 -0800164include $(CLEAR_VARS)
Tao Bao97555da2016-12-15 10:15:06 -0800165LOCAL_SRC_FILES := imgdiff_main.cpp
Doug Zongker512536a2010-02-17 16:11:44 -0800166LOCAL_MODULE := imgdiff
Tianjie Xu7aa88742016-09-28 11:42:17 -0700167LOCAL_CFLAGS := -Werror
Tao Bao97555da2016-12-15 10:15:06 -0800168LOCAL_STATIC_LIBRARIES := \
169 libimgdiff \
170 $(libimgdiff_static_libraries) \
Sen Jiang930edb62017-01-18 17:26:42 -0800171 libbz
Doug Zongker512536a2010-02-17 16:11:44 -0800172include $(BUILD_HOST_EXECUTABLE)