blob: bdaef1b277342bb19431cfcfae1c4df9485e88da [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
Tao Bao087bc0c2017-01-19 10:46:39 -080038LOCAL_CFLAGS := \
39 -DZLIB_CONST \
40 -Werror
Doug Zongker512536a2010-02-17 16:11:44 -080041include $(BUILD_STATIC_LIBRARY)
42
Tao Baod80a9982016-03-03 11:43:47 -080043# libimgpatch (static library)
44# ===============================
Doug Zongker512536a2010-02-17 16:11:44 -080045include $(CLEAR_VARS)
Tao Bao97555da2016-12-15 10:15:06 -080046LOCAL_SRC_FILES := \
47 bspatch.cpp \
48 imgpatch.cpp \
49 utils.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 \
57 libbz \
58 libz
Tao Bao087bc0c2017-01-19 10:46:39 -080059LOCAL_CFLAGS := \
60 -DZLIB_CONST \
61 -Werror
Sen Jiang0cce9cd2016-01-22 20:49:07 +080062include $(BUILD_STATIC_LIBRARY)
63
Tao Baod80a9982016-03-03 11:43:47 -080064# libimgpatch (host static library)
65# ===============================
Sen Jiang0cce9cd2016-01-22 20:49:07 +080066include $(CLEAR_VARS)
Tao Bao97555da2016-12-15 10:15:06 -080067LOCAL_SRC_FILES := \
68 bspatch.cpp \
69 imgpatch.cpp \
70 utils.cpp
Sen Jiang0cce9cd2016-01-22 20:49:07 +080071LOCAL_MODULE := libimgpatch
Tao Baod80a9982016-03-03 11:43:47 -080072LOCAL_MODULE_HOST_OS := linux
Tao Bao97555da2016-12-15 10:15:06 -080073LOCAL_C_INCLUDES := \
Tao Baod80a9982016-03-03 11:43:47 -080074 $(LOCAL_PATH)/include \
75 bootable/recovery
Sen Jiang0cce9cd2016-01-22 20:49:07 +080076LOCAL_EXPORT_C_INCLUDE_DIRS := $(LOCAL_PATH)/include
Tao Bao97555da2016-12-15 10:15:06 -080077LOCAL_STATIC_LIBRARIES := \
78 libcrypto \
79 libbz \
80 libz
Tao Bao087bc0c2017-01-19 10:46:39 -080081LOCAL_CFLAGS := \
82 -DZLIB_CONST \
83 -Werror
Sen Jiang0cce9cd2016-01-22 20:49:07 +080084include $(BUILD_HOST_STATIC_LIBRARY)
85
Tao Bao36c35112016-10-25 14:17:26 -070086# libapplypatch_modes (static library)
Tao Baod80a9982016-03-03 11:43:47 -080087# ===============================
Sen Jiang0cce9cd2016-01-22 20:49:07 +080088include $(CLEAR_VARS)
Tao Bao36c35112016-10-25 14:17:26 -070089LOCAL_SRC_FILES := \
90 applypatch_modes.cpp
91LOCAL_MODULE := libapplypatch_modes
92LOCAL_C_INCLUDES := bootable/recovery
93LOCAL_STATIC_LIBRARIES := \
94 libapplypatch \
95 libbase \
96 libedify \
97 libcrypto
98LOCAL_CFLAGS := -Werror
99include $(BUILD_STATIC_LIBRARY)
100
101# applypatch (target executable)
102# ===============================
103include $(CLEAR_VARS)
Tao Bao36c35112016-10-25 14:17:26 -0700104LOCAL_SRC_FILES := applypatch_main.cpp
Doug Zongker512536a2010-02-17 16:11:44 -0800105LOCAL_MODULE := applypatch
Tao Bao36c35112016-10-25 14:17:26 -0700106LOCAL_C_INCLUDES := bootable/recovery
107LOCAL_STATIC_LIBRARIES := \
108 libapplypatch_modes \
Tao Baod80a9982016-03-03 11:43:47 -0800109 libapplypatch \
110 libbase \
111 libedify \
112 libotafault \
Josh Gao073164f2016-08-05 15:59:05 -0700113 libcrypto \
Tao Baod80a9982016-03-03 11:43:47 -0800114 libbz
Tao Bao36c35112016-10-25 14:17:26 -0700115LOCAL_SHARED_LIBRARIES := \
116 libbase \
117 libz \
118 libcutils
Tianjie Xu7aa88742016-09-28 11:42:17 -0700119LOCAL_CFLAGS := -Werror
Doug Zongker512536a2010-02-17 16:11:44 -0800120include $(BUILD_EXECUTABLE)
121
Tao Bao97555da2016-12-15 10:15:06 -0800122libimgdiff_src_files := \
123 imgdiff.cpp \
124 utils.cpp
125
126# libbsdiff is compiled with -D_FILE_OFFSET_BITS=64.
127libimgdiff_cflags := \
128 -Werror \
129 -D_FILE_OFFSET_BITS=64
130
131libimgdiff_static_libraries := \
132 libbsdiff \
Sen Jiang930edb62017-01-18 17:26:42 -0800133 libdivsufsort \
134 libdivsufsort64 \
Tao Baod37ce8f2016-12-17 17:10:04 -0800135 libbase \
Tao Bao97555da2016-12-15 10:15:06 -0800136 libz
137
138# libimgdiff (static library)
139# ===============================
140include $(CLEAR_VARS)
141LOCAL_SRC_FILES := \
142 $(libimgdiff_src_files)
143LOCAL_MODULE := libimgdiff
144LOCAL_CFLAGS := \
145 $(libimgdiff_cflags)
146LOCAL_STATIC_LIBRARIES := \
147 $(libimgdiff_static_libraries)
148LOCAL_C_INCLUDES := \
149 $(LOCAL_PATH)/include
150LOCAL_EXPORT_C_INCLUDE_DIRS := $(LOCAL_PATH)/include
151include $(BUILD_STATIC_LIBRARY)
152
153# libimgdiff (host static library)
154# ===============================
155include $(CLEAR_VARS)
156LOCAL_SRC_FILES := \
157 $(libimgdiff_src_files)
158LOCAL_MODULE := libimgdiff
159LOCAL_CFLAGS := \
160 $(libimgdiff_cflags)
161LOCAL_STATIC_LIBRARIES := \
162 $(libimgdiff_static_libraries)
163LOCAL_C_INCLUDES := \
164 $(LOCAL_PATH)/include
165LOCAL_EXPORT_C_INCLUDE_DIRS := $(LOCAL_PATH)/include
166include $(BUILD_HOST_STATIC_LIBRARY)
167
Tao Baod80a9982016-03-03 11:43:47 -0800168# imgdiff (host static executable)
169# ===============================
Doug Zongker512536a2010-02-17 16:11:44 -0800170include $(CLEAR_VARS)
Tao Bao97555da2016-12-15 10:15:06 -0800171LOCAL_SRC_FILES := imgdiff_main.cpp
Doug Zongker512536a2010-02-17 16:11:44 -0800172LOCAL_MODULE := imgdiff
Tianjie Xu7aa88742016-09-28 11:42:17 -0700173LOCAL_CFLAGS := -Werror
Tao Bao97555da2016-12-15 10:15:06 -0800174LOCAL_STATIC_LIBRARIES := \
175 libimgdiff \
176 $(libimgdiff_static_libraries) \
Sen Jiang930edb62017-01-18 17:26:42 -0800177 libbz
Doug Zongker512536a2010-02-17 16:11:44 -0800178include $(BUILD_HOST_EXECUTABLE)