blob: 3c88d1f58ea672002cb089b4fb980c2f35ec15d9 [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 \
Tao Baod37ce8f2016-12-17 17:10:04 -0800133 libbase \
Tao Bao97555da2016-12-15 10:15:06 -0800134 libz
135
136# libimgdiff (static library)
137# ===============================
138include $(CLEAR_VARS)
139LOCAL_SRC_FILES := \
140 $(libimgdiff_src_files)
141LOCAL_MODULE := libimgdiff
142LOCAL_CFLAGS := \
143 $(libimgdiff_cflags)
144LOCAL_STATIC_LIBRARIES := \
145 $(libimgdiff_static_libraries)
146LOCAL_C_INCLUDES := \
147 $(LOCAL_PATH)/include
148LOCAL_EXPORT_C_INCLUDE_DIRS := $(LOCAL_PATH)/include
149include $(BUILD_STATIC_LIBRARY)
150
151# libimgdiff (host static library)
152# ===============================
153include $(CLEAR_VARS)
154LOCAL_SRC_FILES := \
155 $(libimgdiff_src_files)
156LOCAL_MODULE := libimgdiff
157LOCAL_CFLAGS := \
158 $(libimgdiff_cflags)
159LOCAL_STATIC_LIBRARIES := \
160 $(libimgdiff_static_libraries)
161LOCAL_C_INCLUDES := \
162 $(LOCAL_PATH)/include
163LOCAL_EXPORT_C_INCLUDE_DIRS := $(LOCAL_PATH)/include
164include $(BUILD_HOST_STATIC_LIBRARY)
165
Tao Baod80a9982016-03-03 11:43:47 -0800166# imgdiff (host static executable)
167# ===============================
Doug Zongker512536a2010-02-17 16:11:44 -0800168include $(CLEAR_VARS)
Tao Bao97555da2016-12-15 10:15:06 -0800169LOCAL_SRC_FILES := imgdiff_main.cpp
Doug Zongker512536a2010-02-17 16:11:44 -0800170LOCAL_MODULE := imgdiff
Tianjie Xu7aa88742016-09-28 11:42:17 -0700171LOCAL_CFLAGS := -Werror
Tao Bao97555da2016-12-15 10:15:06 -0800172LOCAL_STATIC_LIBRARIES := \
173 libimgdiff \
174 $(libimgdiff_static_libraries) \
175 libbz \
176 libdivsufsort \
177 libdivsufsort64
Doug Zongker512536a2010-02-17 16:11:44 -0800178include $(BUILD_HOST_EXECUTABLE)