blob: 7aed0a95a574ee860dcc1757c228879398c2a187 [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 \
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 \
Tianjie Xu12b90552017-03-07 14:44:14 -080048 imgpatch.cpp
Sen Jiang0cce9cd2016-01-22 20:49:07 +080049LOCAL_MODULE := libimgpatch
Tao Bao97555da2016-12-15 10:15:06 -080050LOCAL_C_INCLUDES := \
Tao Baod80a9982016-03-03 11:43:47 -080051 $(LOCAL_PATH)/include \
52 bootable/recovery
Sen Jiang0cce9cd2016-01-22 20:49:07 +080053LOCAL_EXPORT_C_INCLUDE_DIRS := $(LOCAL_PATH)/include
Tao Bao97555da2016-12-15 10:15:06 -080054LOCAL_STATIC_LIBRARIES := \
55 libcrypto \
Sen Jiang25c56972016-05-10 15:23:25 -070056 libbspatch \
Tianjie Xu12b90552017-03-07 14:44:14 -080057 libbase \
Tao Bao97555da2016-12-15 10:15:06 -080058 libbz \
59 libz
Tao Bao087bc0c2017-01-19 10:46:39 -080060LOCAL_CFLAGS := \
61 -DZLIB_CONST \
62 -Werror
Sen Jiang0cce9cd2016-01-22 20:49:07 +080063include $(BUILD_STATIC_LIBRARY)
64
Tao Baod80a9982016-03-03 11:43:47 -080065# libimgpatch (host static library)
66# ===============================
Sen Jiang0cce9cd2016-01-22 20:49:07 +080067include $(CLEAR_VARS)
Tao Bao97555da2016-12-15 10:15:06 -080068LOCAL_SRC_FILES := \
69 bspatch.cpp \
Tianjie Xu12b90552017-03-07 14:44:14 -080070 imgpatch.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 \
Sen Jiang25c56972016-05-10 15:23:25 -070079 libbspatch \
Tianjie Xu12b90552017-03-07 14:44:14 -080080 libbase \
Tao Bao97555da2016-12-15 10:15:06 -080081 libbz \
82 libz
Tao Bao087bc0c2017-01-19 10:46:39 -080083LOCAL_CFLAGS := \
84 -DZLIB_CONST \
85 -Werror
Sen Jiang0cce9cd2016-01-22 20:49:07 +080086include $(BUILD_HOST_STATIC_LIBRARY)
87
Tao Bao36c35112016-10-25 14:17:26 -070088# libapplypatch_modes (static library)
Tao Baod80a9982016-03-03 11:43:47 -080089# ===============================
Sen Jiang0cce9cd2016-01-22 20:49:07 +080090include $(CLEAR_VARS)
Tao Bao36c35112016-10-25 14:17:26 -070091LOCAL_SRC_FILES := \
92 applypatch_modes.cpp
93LOCAL_MODULE := libapplypatch_modes
94LOCAL_C_INCLUDES := bootable/recovery
95LOCAL_STATIC_LIBRARIES := \
96 libapplypatch \
97 libbase \
98 libedify \
99 libcrypto
100LOCAL_CFLAGS := -Werror
101include $(BUILD_STATIC_LIBRARY)
102
103# applypatch (target executable)
104# ===============================
105include $(CLEAR_VARS)
Tao Bao36c35112016-10-25 14:17:26 -0700106LOCAL_SRC_FILES := applypatch_main.cpp
Doug Zongker512536a2010-02-17 16:11:44 -0800107LOCAL_MODULE := applypatch
Tao Bao36c35112016-10-25 14:17:26 -0700108LOCAL_C_INCLUDES := bootable/recovery
109LOCAL_STATIC_LIBRARIES := \
110 libapplypatch_modes \
Tao Baod80a9982016-03-03 11:43:47 -0800111 libapplypatch \
112 libbase \
113 libedify \
114 libotafault \
Josh Gao073164f2016-08-05 15:59:05 -0700115 libcrypto \
Sen Jiang25c56972016-05-10 15:23:25 -0700116 libbspatch \
Tao Baod80a9982016-03-03 11:43:47 -0800117 libbz
Tao Bao36c35112016-10-25 14:17:26 -0700118LOCAL_SHARED_LIBRARIES := \
119 libbase \
120 libz \
121 libcutils
Tianjie Xu7aa88742016-09-28 11:42:17 -0700122LOCAL_CFLAGS := -Werror
Doug Zongker512536a2010-02-17 16:11:44 -0800123include $(BUILD_EXECUTABLE)
124
Tianjie Xu12b90552017-03-07 14:44:14 -0800125libimgdiff_src_files := imgdiff.cpp
Tao Bao97555da2016-12-15 10:15:06 -0800126
127# libbsdiff is compiled with -D_FILE_OFFSET_BITS=64.
128libimgdiff_cflags := \
129 -Werror \
Tianjie Xu6b03ba72017-07-19 14:16:30 -0700130 -D_FILE_OFFSET_BITS=64 \
131 -DZLIB_CONST
Tao Bao97555da2016-12-15 10:15:06 -0800132
133libimgdiff_static_libraries := \
134 libbsdiff \
Sen Jiang930edb62017-01-18 17:26:42 -0800135 libdivsufsort \
136 libdivsufsort64 \
Tianjie Xu1ea84d62017-02-22 18:23:58 -0800137 libziparchive \
138 libutils \
139 liblog \
Tao Baod37ce8f2016-12-17 17:10:04 -0800140 libbase \
Tao Bao97555da2016-12-15 10:15:06 -0800141 libz
142
143# libimgdiff (static library)
144# ===============================
145include $(CLEAR_VARS)
146LOCAL_SRC_FILES := \
147 $(libimgdiff_src_files)
148LOCAL_MODULE := libimgdiff
149LOCAL_CFLAGS := \
150 $(libimgdiff_cflags)
151LOCAL_STATIC_LIBRARIES := \
152 $(libimgdiff_static_libraries)
153LOCAL_C_INCLUDES := \
154 $(LOCAL_PATH)/include
155LOCAL_EXPORT_C_INCLUDE_DIRS := $(LOCAL_PATH)/include
156include $(BUILD_STATIC_LIBRARY)
157
158# libimgdiff (host static library)
159# ===============================
160include $(CLEAR_VARS)
161LOCAL_SRC_FILES := \
162 $(libimgdiff_src_files)
163LOCAL_MODULE := libimgdiff
164LOCAL_CFLAGS := \
165 $(libimgdiff_cflags)
166LOCAL_STATIC_LIBRARIES := \
167 $(libimgdiff_static_libraries)
168LOCAL_C_INCLUDES := \
169 $(LOCAL_PATH)/include
170LOCAL_EXPORT_C_INCLUDE_DIRS := $(LOCAL_PATH)/include
171include $(BUILD_HOST_STATIC_LIBRARY)
172
Tao Baod80a9982016-03-03 11:43:47 -0800173# imgdiff (host static executable)
174# ===============================
Doug Zongker512536a2010-02-17 16:11:44 -0800175include $(CLEAR_VARS)
Tao Bao97555da2016-12-15 10:15:06 -0800176LOCAL_SRC_FILES := imgdiff_main.cpp
Doug Zongker512536a2010-02-17 16:11:44 -0800177LOCAL_MODULE := imgdiff
Tianjie Xu7aa88742016-09-28 11:42:17 -0700178LOCAL_CFLAGS := -Werror
Tao Bao97555da2016-12-15 10:15:06 -0800179LOCAL_STATIC_LIBRARIES := \
180 libimgdiff \
181 $(libimgdiff_static_libraries) \
Sen Jiang930edb62017-01-18 17:26:42 -0800182 libbz
Doug Zongker512536a2010-02-17 16:11:44 -0800183include $(BUILD_HOST_EXECUTABLE)