blob: a7412d2380b3002c9841882280a120dd096457b0 [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 \
130 -D_FILE_OFFSET_BITS=64
131
132libimgdiff_static_libraries := \
133 libbsdiff \
Sen Jiang930edb62017-01-18 17:26:42 -0800134 libdivsufsort \
135 libdivsufsort64 \
Tianjie Xu1ea84d62017-02-22 18:23:58 -0800136 libziparchive \
137 libutils \
138 liblog \
Tao Baod37ce8f2016-12-17 17:10:04 -0800139 libbase \
Tao Bao97555da2016-12-15 10:15:06 -0800140 libz
141
142# libimgdiff (static library)
143# ===============================
144include $(CLEAR_VARS)
145LOCAL_SRC_FILES := \
146 $(libimgdiff_src_files)
147LOCAL_MODULE := libimgdiff
148LOCAL_CFLAGS := \
149 $(libimgdiff_cflags)
150LOCAL_STATIC_LIBRARIES := \
151 $(libimgdiff_static_libraries)
152LOCAL_C_INCLUDES := \
153 $(LOCAL_PATH)/include
154LOCAL_EXPORT_C_INCLUDE_DIRS := $(LOCAL_PATH)/include
155include $(BUILD_STATIC_LIBRARY)
156
157# libimgdiff (host static library)
158# ===============================
159include $(CLEAR_VARS)
160LOCAL_SRC_FILES := \
161 $(libimgdiff_src_files)
162LOCAL_MODULE := libimgdiff
163LOCAL_CFLAGS := \
164 $(libimgdiff_cflags)
165LOCAL_STATIC_LIBRARIES := \
166 $(libimgdiff_static_libraries)
167LOCAL_C_INCLUDES := \
168 $(LOCAL_PATH)/include
169LOCAL_EXPORT_C_INCLUDE_DIRS := $(LOCAL_PATH)/include
170include $(BUILD_HOST_STATIC_LIBRARY)
171
Tao Baod80a9982016-03-03 11:43:47 -0800172# imgdiff (host static executable)
173# ===============================
Doug Zongker512536a2010-02-17 16:11:44 -0800174include $(CLEAR_VARS)
Tao Bao97555da2016-12-15 10:15:06 -0800175LOCAL_SRC_FILES := imgdiff_main.cpp
Doug Zongker512536a2010-02-17 16:11:44 -0800176LOCAL_MODULE := imgdiff
Tianjie Xu7aa88742016-09-28 11:42:17 -0700177LOCAL_CFLAGS := -Werror
Tao Bao97555da2016-12-15 10:15:06 -0800178LOCAL_STATIC_LIBRARIES := \
179 libimgdiff \
180 $(libimgdiff_static_libraries) \
Sen Jiang930edb62017-01-18 17:26:42 -0800181 libbz
Doug Zongker512536a2010-02-17 16:11:44 -0800182include $(BUILD_HOST_EXECUTABLE)