blob: fa0fe8a3764f0beb72da513e370286e9c8b1766e [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 Xu7aa88742016-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 Xu7aa88742016-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 Xu7aa88742016-09-28 11:42:17 -070068LOCAL_CFLAGS := -Werror
Sen Jiang0cce9cd2016-01-22 20:49:07 +080069include $(BUILD_HOST_STATIC_LIBRARY)
70
Tao Bao36c35112016-10-25 14:17:26 -070071# libapplypatch_modes (static library)
Tao Baod80a9982016-03-03 11:43:47 -080072# ===============================
Sen Jiang0cce9cd2016-01-22 20:49:07 +080073include $(CLEAR_VARS)
Sen Jiang0cce9cd2016-01-22 20:49:07 +080074LOCAL_CLANG := true
Tao Bao36c35112016-10-25 14:17:26 -070075LOCAL_SRC_FILES := \
76 applypatch_modes.cpp
77LOCAL_MODULE := libapplypatch_modes
78LOCAL_C_INCLUDES := bootable/recovery
79LOCAL_STATIC_LIBRARIES := \
80 libapplypatch \
81 libbase \
82 libedify \
83 libcrypto
84LOCAL_CFLAGS := -Werror
85include $(BUILD_STATIC_LIBRARY)
86
87# applypatch (target executable)
88# ===============================
89include $(CLEAR_VARS)
90LOCAL_CLANG := true
91LOCAL_SRC_FILES := applypatch_main.cpp
Doug Zongker512536a2010-02-17 16:11:44 -080092LOCAL_MODULE := applypatch
Tao Bao36c35112016-10-25 14:17:26 -070093LOCAL_C_INCLUDES := bootable/recovery
94LOCAL_STATIC_LIBRARIES := \
95 libapplypatch_modes \
Tao Baod80a9982016-03-03 11:43:47 -080096 libapplypatch \
97 libbase \
98 libedify \
99 libotafault \
Josh Gao073164f2016-08-05 15:59:05 -0700100 libcrypto \
Tao Baod80a9982016-03-03 11:43:47 -0800101 libbz
Tao Bao36c35112016-10-25 14:17:26 -0700102LOCAL_SHARED_LIBRARIES := \
103 libbase \
104 libz \
105 libcutils
Tianjie Xu7aa88742016-09-28 11:42:17 -0700106LOCAL_CFLAGS := -Werror
Doug Zongker512536a2010-02-17 16:11:44 -0800107include $(BUILD_EXECUTABLE)
108
Tao Baod80a9982016-03-03 11:43:47 -0800109# imgdiff (host static executable)
110# ===============================
Doug Zongker512536a2010-02-17 16:11:44 -0800111include $(CLEAR_VARS)
Tao Bao80e46e02015-06-03 10:49:29 -0700112LOCAL_CLANG := true
Sen Jiang2fffcb12016-05-03 15:49:10 -0700113LOCAL_SRC_FILES := imgdiff.cpp utils.cpp
Doug Zongker512536a2010-02-17 16:11:44 -0800114LOCAL_MODULE := imgdiff
Sen Jiang2fffcb12016-05-03 15:49:10 -0700115LOCAL_STATIC_LIBRARIES += \
116 libbsdiff \
117 libbz \
118 libdivsufsort64 \
119 libdivsufsort \
120 libz
Tianjie Xu7aa88742016-09-28 11:42:17 -0700121LOCAL_CFLAGS := -Werror
Tao Bao16e38612016-06-01 00:08:40 +0000122LOCAL_FORCE_STATIC_EXECUTABLE := true
Doug Zongker512536a2010-02-17 16:11:44 -0800123include $(BUILD_HOST_EXECUTABLE)