blob: 77e499ec6aa4edcdb29cf3058c68f0119b0fceae [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 Bao80e46e02015-06-03 10:49:29 -070020LOCAL_CLANG := true
Tao Baod80a9982016-03-03 11:43:47 -080021LOCAL_SRC_FILES := \
22 applypatch.cpp \
23 bspatch.cpp \
24 freecache.cpp \
25 imgpatch.cpp \
26 utils.cpp
Doug Zongker512536a2010-02-17 16:11:44 -080027LOCAL_MODULE := libapplypatch
28LOCAL_MODULE_TAGS := eng
Tao Baod80a9982016-03-03 11:43:47 -080029LOCAL_C_INCLUDES += \
30 $(LOCAL_PATH)/include \
31 bootable/recovery
32LOCAL_EXPORT_C_INCLUDE_DIRS := $(LOCAL_PATH)/include
33LOCAL_STATIC_LIBRARIES += \
34 libotafault \
Tao Baod80a9982016-03-03 11:43:47 -080035 libbase \
Josh Gao073164f2016-08-05 15:59:05 -070036 libcrypto \
Tao Baod80a9982016-03-03 11:43:47 -080037 libbz \
38 libz
Tianjie Xu17e316c2016-09-28 11:42:17 -070039LOCAL_CFLAGS := -Werror
Doug Zongker512536a2010-02-17 16:11:44 -080040include $(BUILD_STATIC_LIBRARY)
41
Tao Baod80a9982016-03-03 11:43:47 -080042# libimgpatch (static library)
43# ===============================
Doug Zongker512536a2010-02-17 16:11:44 -080044include $(CLEAR_VARS)
Tao Bao80e46e02015-06-03 10:49:29 -070045LOCAL_CLANG := true
Sen Jiang0cce9cd2016-01-22 20:49:07 +080046LOCAL_SRC_FILES := bspatch.cpp imgpatch.cpp utils.cpp
47LOCAL_MODULE := libimgpatch
Tao Baod80a9982016-03-03 11:43:47 -080048LOCAL_C_INCLUDES += \
49 $(LOCAL_PATH)/include \
50 bootable/recovery
Sen Jiang0cce9cd2016-01-22 20:49:07 +080051LOCAL_EXPORT_C_INCLUDE_DIRS := $(LOCAL_PATH)/include
Josh Gao073164f2016-08-05 15:59:05 -070052LOCAL_STATIC_LIBRARIES += libcrypto libbz libz
Tianjie Xu17e316c2016-09-28 11:42:17 -070053LOCAL_CFLAGS := -Werror
Sen Jiang0cce9cd2016-01-22 20:49:07 +080054include $(BUILD_STATIC_LIBRARY)
55
Tao Baod80a9982016-03-03 11:43:47 -080056# libimgpatch (host static library)
57# ===============================
Sen Jiang0cce9cd2016-01-22 20:49:07 +080058include $(CLEAR_VARS)
Sen Jiang0cce9cd2016-01-22 20:49:07 +080059LOCAL_CLANG := true
60LOCAL_SRC_FILES := bspatch.cpp imgpatch.cpp utils.cpp
61LOCAL_MODULE := libimgpatch
Tao Baod80a9982016-03-03 11:43:47 -080062LOCAL_MODULE_HOST_OS := linux
63LOCAL_C_INCLUDES += \
64 $(LOCAL_PATH)/include \
65 bootable/recovery
Sen Jiang0cce9cd2016-01-22 20:49:07 +080066LOCAL_EXPORT_C_INCLUDE_DIRS := $(LOCAL_PATH)/include
Josh Gao073164f2016-08-05 15:59:05 -070067LOCAL_STATIC_LIBRARIES += libcrypto libbz libz
Tianjie Xu17e316c2016-09-28 11:42:17 -070068LOCAL_CFLAGS := -Werror
Sen Jiang0cce9cd2016-01-22 20:49:07 +080069include $(BUILD_HOST_STATIC_LIBRARY)
70
Tao Baod80a9982016-03-03 11:43:47 -080071# applypatch (executable)
72# ===============================
Sen Jiang0cce9cd2016-01-22 20:49:07 +080073include $(CLEAR_VARS)
Sen Jiang0cce9cd2016-01-22 20:49:07 +080074LOCAL_CLANG := true
Tao Baoba9a42a2015-06-23 23:23:33 -070075LOCAL_SRC_FILES := main.cpp
Doug Zongker512536a2010-02-17 16:11:44 -080076LOCAL_MODULE := applypatch
Doug Zongkerc4351c72010-02-22 14:46:32 -080077LOCAL_C_INCLUDES += bootable/recovery
Tao Baod80a9982016-03-03 11:43:47 -080078LOCAL_STATIC_LIBRARIES += \
79 libapplypatch \
80 libbase \
81 libedify \
82 libotafault \
83 libminzip \
Josh Gao073164f2016-08-05 15:59:05 -070084 libcrypto \
Tao Baod80a9982016-03-03 11:43:47 -080085 libbz
Tianjie Xuc21edd42016-08-05 18:00:04 -070086LOCAL_SHARED_LIBRARIES += libbase libz libcutils libc
Tianjie Xu17e316c2016-09-28 11:42:17 -070087LOCAL_CFLAGS := -Werror
Doug Zongker512536a2010-02-17 16:11:44 -080088include $(BUILD_EXECUTABLE)
89
Tao Baod80a9982016-03-03 11:43:47 -080090# imgdiff (host static executable)
91# ===============================
Doug Zongker512536a2010-02-17 16:11:44 -080092include $(CLEAR_VARS)
Tao Bao80e46e02015-06-03 10:49:29 -070093LOCAL_CLANG := true
Sen Jiang2fffcb12016-05-03 15:49:10 -070094LOCAL_SRC_FILES := imgdiff.cpp utils.cpp
Doug Zongker512536a2010-02-17 16:11:44 -080095LOCAL_MODULE := imgdiff
Sen Jiang2fffcb12016-05-03 15:49:10 -070096LOCAL_STATIC_LIBRARIES += \
97 libbsdiff \
98 libbz \
99 libdivsufsort64 \
100 libdivsufsort \
101 libz
Tianjie Xu17e316c2016-09-28 11:42:17 -0700102LOCAL_CFLAGS := -Werror
Tao Bao16e38612016-06-01 00:08:40 +0000103LOCAL_FORCE_STATIC_EXECUTABLE := true
Doug Zongker512536a2010-02-17 16:11:44 -0800104include $(BUILD_HOST_EXECUTABLE)