blob: 8be5c36be9fe05a7de26f028a553e3cf6cbe1718 [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 \
Sen Jiang25c56972016-05-10 15:23:25 -070036 libbspatch \
Tao Baod80a9982016-03-03 11:43:47 -080037 libbz \
38 libz
Tao Bao087bc0c2017-01-19 10:46:39 -080039LOCAL_CFLAGS := \
40 -DZLIB_CONST \
41 -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 \
49 imgpatch.cpp \
50 utils.cpp
Sen Jiang0cce9cd2016-01-22 20:49:07 +080051LOCAL_MODULE := libimgpatch
Tao Bao97555da2016-12-15 10:15:06 -080052LOCAL_C_INCLUDES := \
Tao Baod80a9982016-03-03 11:43:47 -080053 $(LOCAL_PATH)/include \
54 bootable/recovery
Sen Jiang0cce9cd2016-01-22 20:49:07 +080055LOCAL_EXPORT_C_INCLUDE_DIRS := $(LOCAL_PATH)/include
Tao Bao97555da2016-12-15 10:15:06 -080056LOCAL_STATIC_LIBRARIES := \
57 libcrypto \
Sen Jiang25c56972016-05-10 15:23:25 -070058 libbspatch \
Tao Bao97555da2016-12-15 10:15:06 -080059 libbz \
60 libz
Tao Bao087bc0c2017-01-19 10:46:39 -080061LOCAL_CFLAGS := \
62 -DZLIB_CONST \
63 -Werror
Sen Jiang0cce9cd2016-01-22 20:49:07 +080064include $(BUILD_STATIC_LIBRARY)
65
Tao Baod80a9982016-03-03 11:43:47 -080066# libimgpatch (host static library)
67# ===============================
Sen Jiang0cce9cd2016-01-22 20:49:07 +080068include $(CLEAR_VARS)
Tao Bao97555da2016-12-15 10:15:06 -080069LOCAL_SRC_FILES := \
70 bspatch.cpp \
71 imgpatch.cpp \
72 utils.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 \
Tao Bao97555da2016-12-15 10:15:06 -080082 libbz \
83 libz
Tao Bao087bc0c2017-01-19 10:46:39 -080084LOCAL_CFLAGS := \
85 -DZLIB_CONST \
86 -Werror
Sen Jiang0cce9cd2016-01-22 20:49:07 +080087include $(BUILD_HOST_STATIC_LIBRARY)
88
Tao Bao36c35112016-10-25 14:17:26 -070089# libapplypatch_modes (static library)
Tao Baod80a9982016-03-03 11:43:47 -080090# ===============================
Sen Jiang0cce9cd2016-01-22 20:49:07 +080091include $(CLEAR_VARS)
Tao Bao36c35112016-10-25 14:17:26 -070092LOCAL_SRC_FILES := \
93 applypatch_modes.cpp
94LOCAL_MODULE := libapplypatch_modes
95LOCAL_C_INCLUDES := bootable/recovery
96LOCAL_STATIC_LIBRARIES := \
97 libapplypatch \
98 libbase \
99 libedify \
100 libcrypto
101LOCAL_CFLAGS := -Werror
102include $(BUILD_STATIC_LIBRARY)
103
104# applypatch (target executable)
105# ===============================
106include $(CLEAR_VARS)
Tao Bao36c35112016-10-25 14:17:26 -0700107LOCAL_SRC_FILES := applypatch_main.cpp
Doug Zongker512536a2010-02-17 16:11:44 -0800108LOCAL_MODULE := applypatch
Tao Bao36c35112016-10-25 14:17:26 -0700109LOCAL_C_INCLUDES := bootable/recovery
110LOCAL_STATIC_LIBRARIES := \
111 libapplypatch_modes \
Tao Baod80a9982016-03-03 11:43:47 -0800112 libapplypatch \
113 libbase \
114 libedify \
115 libotafault \
Josh Gao073164f2016-08-05 15:59:05 -0700116 libcrypto \
Sen Jiang25c56972016-05-10 15:23:25 -0700117 libbspatch \
Tao Baod80a9982016-03-03 11:43:47 -0800118 libbz
Tao Bao36c35112016-10-25 14:17:26 -0700119LOCAL_SHARED_LIBRARIES := \
120 libbase \
121 libz \
122 libcutils
Tianjie Xu7aa88742016-09-28 11:42:17 -0700123LOCAL_CFLAGS := -Werror
Doug Zongker512536a2010-02-17 16:11:44 -0800124include $(BUILD_EXECUTABLE)
125
Tao Bao97555da2016-12-15 10:15:06 -0800126libimgdiff_src_files := \
127 imgdiff.cpp \
128 utils.cpp
129
130# libbsdiff is compiled with -D_FILE_OFFSET_BITS=64.
131libimgdiff_cflags := \
132 -Werror \
133 -D_FILE_OFFSET_BITS=64
134
135libimgdiff_static_libraries := \
136 libbsdiff \
Sen Jiang930edb62017-01-18 17:26:42 -0800137 libdivsufsort \
138 libdivsufsort64 \
Tianjie Xu1ea84d62017-02-22 18:23:58 -0800139 libziparchive \
140 libutils \
141 liblog \
Tao Baod37ce8f2016-12-17 17:10:04 -0800142 libbase \
Tao Bao97555da2016-12-15 10:15:06 -0800143 libz
144
145# libimgdiff (static library)
146# ===============================
147include $(CLEAR_VARS)
148LOCAL_SRC_FILES := \
149 $(libimgdiff_src_files)
150LOCAL_MODULE := libimgdiff
151LOCAL_CFLAGS := \
152 $(libimgdiff_cflags)
153LOCAL_STATIC_LIBRARIES := \
154 $(libimgdiff_static_libraries)
155LOCAL_C_INCLUDES := \
156 $(LOCAL_PATH)/include
157LOCAL_EXPORT_C_INCLUDE_DIRS := $(LOCAL_PATH)/include
158include $(BUILD_STATIC_LIBRARY)
159
160# libimgdiff (host static library)
161# ===============================
162include $(CLEAR_VARS)
163LOCAL_SRC_FILES := \
164 $(libimgdiff_src_files)
165LOCAL_MODULE := libimgdiff
166LOCAL_CFLAGS := \
167 $(libimgdiff_cflags)
168LOCAL_STATIC_LIBRARIES := \
169 $(libimgdiff_static_libraries)
170LOCAL_C_INCLUDES := \
171 $(LOCAL_PATH)/include
172LOCAL_EXPORT_C_INCLUDE_DIRS := $(LOCAL_PATH)/include
173include $(BUILD_HOST_STATIC_LIBRARY)
174
Tao Baod80a9982016-03-03 11:43:47 -0800175# imgdiff (host static executable)
176# ===============================
Doug Zongker512536a2010-02-17 16:11:44 -0800177include $(CLEAR_VARS)
Tao Bao97555da2016-12-15 10:15:06 -0800178LOCAL_SRC_FILES := imgdiff_main.cpp
Doug Zongker512536a2010-02-17 16:11:44 -0800179LOCAL_MODULE := imgdiff
Tianjie Xu7aa88742016-09-28 11:42:17 -0700180LOCAL_CFLAGS := -Werror
Tao Bao97555da2016-12-15 10:15:06 -0800181LOCAL_STATIC_LIBRARIES := \
182 libimgdiff \
183 $(libimgdiff_static_libraries) \
Sen Jiang930edb62017-01-18 17:26:42 -0800184 libbz
Doug Zongker512536a2010-02-17 16:11:44 -0800185include $(BUILD_HOST_EXECUTABLE)