blob: 581e53aa1cfeaf637d248be14e59479d90ec192c [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
Doug Zongker512536a2010-02-17 16:11:44 -080017include $(CLEAR_VARS)
18
Conn O'Griofad9201042014-03-25 01:26:49 +000019BOARD_RECOVERY_DEFINES := BOARD_BML_BOOT BOARD_BML_RECOVERY
20
21$(foreach board_define,$(BOARD_RECOVERY_DEFINES), \
22 $(if $($(board_define)), \
23 $(eval LOCAL_CFLAGS += -D$(board_define)=\"$($(board_define))\") \
24 ) \
25 )
26
Matt Mower55c75ca2014-08-31 11:30:15 -050027LOCAL_C_INCLUDES += \
28 external/bzip2 \
29 external/zlib \
30 $(commands_recovery_local_path)
Ethan Yonker34ae4832016-08-24 15:32:18 -050031
Tao Bao80e46e02015-06-03 10:49:29 -070032LOCAL_CLANG := true
Tao Baoba9a42a2015-06-23 23:23:33 -070033LOCAL_SRC_FILES := applypatch.cpp bspatch.cpp freecache.cpp imgpatch.cpp utils.cpp
Doug Zongker512536a2010-02-17 16:11:44 -080034LOCAL_MODULE := libapplypatch
35LOCAL_MODULE_TAGS := eng
Sen Jiang0cce9cd2016-01-22 20:49:07 +080036LOCAL_C_INCLUDES += bootable/recovery
Ethan Yonkerb8e985c2016-08-31 13:42:11 -050037LOCAL_STATIC_LIBRARIES += libbase libotafault libmtdutils libcrypto_static libbz libz
Doug Zongker512536a2010-02-17 16:11:44 -080038
39include $(BUILD_STATIC_LIBRARY)
40
41include $(CLEAR_VARS)
42
Tao Bao8b0db112016-01-28 21:56:06 -080043ifeq ($(HOST_OS),linux)
Sen Jiang0cce9cd2016-01-22 20:49:07 +080044include $(CLEAR_VARS)
45
46LOCAL_CLANG := true
47LOCAL_SRC_FILES := bspatch.cpp imgpatch.cpp utils.cpp
48LOCAL_MODULE := libimgpatch
49LOCAL_C_INCLUDES += bootable/recovery
50LOCAL_EXPORT_C_INCLUDE_DIRS := $(LOCAL_PATH)/include
Sen Jiangc48cb5e2016-02-04 16:23:21 +080051LOCAL_STATIC_LIBRARIES += libcrypto_static libbz libz
Sen Jiang0cce9cd2016-01-22 20:49:07 +080052
53include $(BUILD_HOST_STATIC_LIBRARY)
Tao Bao8b0db112016-01-28 21:56:06 -080054endif # HOST_OS == linux
Sen Jiang0cce9cd2016-01-22 20:49:07 +080055
56include $(CLEAR_VARS)
57
58LOCAL_CLANG := true
Tao Baoba9a42a2015-06-23 23:23:33 -070059LOCAL_SRC_FILES := main.cpp
Doug Zongker512536a2010-02-17 16:11:44 -080060LOCAL_MODULE := applypatch
Doug Zongkerc4351c72010-02-22 14:46:32 -080061LOCAL_C_INCLUDES += bootable/recovery
Yabin Cuica78c9f2016-02-05 15:27:52 -080062LOCAL_STATIC_LIBRARIES += libapplypatch libbase libotafault libmtdutils libcrypto_static libbz \
63 libedify \
64
Dan Alberte49a9e52015-05-19 11:33:18 -070065LOCAL_SHARED_LIBRARIES += libz libcutils libc
Doug Zongker512536a2010-02-17 16:11:44 -080066
67include $(BUILD_EXECUTABLE)
68
69include $(CLEAR_VARS)
70
Tao Bao80e46e02015-06-03 10:49:29 -070071LOCAL_CLANG := true
Tao Baoba9a42a2015-06-23 23:23:33 -070072LOCAL_SRC_FILES := imgdiff.cpp utils.cpp bsdiff.cpp
Doug Zongker512536a2010-02-17 16:11:44 -080073LOCAL_MODULE := imgdiff
74LOCAL_FORCE_STATIC_EXECUTABLE := true
Doug Zongker512536a2010-02-17 16:11:44 -080075LOCAL_C_INCLUDES += external/zlib external/bzip2
76LOCAL_STATIC_LIBRARIES += libz libbz
77
78include $(BUILD_HOST_EXECUTABLE)