Doug Zongker | 512536a | 2010-02-17 16:11:44 -0800 | [diff] [blame] | 1 | # 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 Zongker | 512536a | 2010-02-17 16:11:44 -0800 | [diff] [blame] | 15 | LOCAL_PATH := $(call my-dir) |
Tao Bao | 80e46e0 | 2015-06-03 10:49:29 -0700 | [diff] [blame] | 16 | |
Michael Bestas | c86b6d4 | 2017-04-28 22:43:09 +0300 | [diff] [blame] | 17 | ifdef project-path-for |
| 18 | RECOVERY_PATH := $(call project-path-for,recovery) |
| 19 | else |
| 20 | RECOVERY_PATH := bootable/recovery |
| 21 | endif |
| 22 | |
Doug Zongker | 512536a | 2010-02-17 16:11:44 -0800 | [diff] [blame] | 23 | include $(CLEAR_VARS) |
| 24 | |
Conn O'Griofa | d920104 | 2014-03-25 01:26:49 +0000 | [diff] [blame] | 25 | BOARD_RECOVERY_DEFINES := BOARD_BML_BOOT BOARD_BML_RECOVERY |
| 26 | |
| 27 | $(foreach board_define,$(BOARD_RECOVERY_DEFINES), \ |
| 28 | $(if $($(board_define)), \ |
| 29 | $(eval LOCAL_CFLAGS += -D$(board_define)=\"$($(board_define))\") \ |
| 30 | ) \ |
| 31 | ) |
| 32 | |
Matt Mower | 55c75ca | 2014-08-31 11:30:15 -0500 | [diff] [blame] | 33 | LOCAL_C_INCLUDES += \ |
| 34 | external/bzip2 \ |
| 35 | external/zlib \ |
| 36 | $(commands_recovery_local_path) |
Ethan Yonker | 34ae483 | 2016-08-24 15:32:18 -0500 | [diff] [blame] | 37 | |
Tao Bao | 80e46e0 | 2015-06-03 10:49:29 -0700 | [diff] [blame] | 38 | LOCAL_CLANG := true |
Tao Bao | ba9a42a | 2015-06-23 23:23:33 -0700 | [diff] [blame] | 39 | LOCAL_SRC_FILES := applypatch.cpp bspatch.cpp freecache.cpp imgpatch.cpp utils.cpp |
Doug Zongker | 512536a | 2010-02-17 16:11:44 -0800 | [diff] [blame] | 40 | LOCAL_MODULE := libapplypatch |
| 41 | LOCAL_MODULE_TAGS := eng |
Michael Bestas | c86b6d4 | 2017-04-28 22:43:09 +0300 | [diff] [blame] | 42 | LOCAL_C_INCLUDES += $(RECOVERY_PATH) |
Ethan Yonker | b8e985c | 2016-08-31 13:42:11 -0500 | [diff] [blame] | 43 | LOCAL_STATIC_LIBRARIES += libbase libotafault libmtdutils libcrypto_static libbz libz |
Doug Zongker | 512536a | 2010-02-17 16:11:44 -0800 | [diff] [blame] | 44 | |
| 45 | include $(BUILD_STATIC_LIBRARY) |
| 46 | |
| 47 | include $(CLEAR_VARS) |
| 48 | |
Tao Bao | 8b0db11 | 2016-01-28 21:56:06 -0800 | [diff] [blame] | 49 | ifeq ($(HOST_OS),linux) |
Sen Jiang | 0cce9cd | 2016-01-22 20:49:07 +0800 | [diff] [blame] | 50 | include $(CLEAR_VARS) |
| 51 | |
| 52 | LOCAL_CLANG := true |
| 53 | LOCAL_SRC_FILES := bspatch.cpp imgpatch.cpp utils.cpp |
| 54 | LOCAL_MODULE := libimgpatch |
Michael Bestas | c86b6d4 | 2017-04-28 22:43:09 +0300 | [diff] [blame] | 55 | LOCAL_C_INCLUDES += $(RECOVERY_PATH) |
Sen Jiang | 0cce9cd | 2016-01-22 20:49:07 +0800 | [diff] [blame] | 56 | LOCAL_EXPORT_C_INCLUDE_DIRS := $(LOCAL_PATH)/include |
Sen Jiang | c48cb5e | 2016-02-04 16:23:21 +0800 | [diff] [blame] | 57 | LOCAL_STATIC_LIBRARIES += libcrypto_static libbz libz |
Sen Jiang | 0cce9cd | 2016-01-22 20:49:07 +0800 | [diff] [blame] | 58 | |
| 59 | include $(BUILD_HOST_STATIC_LIBRARY) |
Tao Bao | 8b0db11 | 2016-01-28 21:56:06 -0800 | [diff] [blame] | 60 | endif # HOST_OS == linux |
Sen Jiang | 0cce9cd | 2016-01-22 20:49:07 +0800 | [diff] [blame] | 61 | |
| 62 | include $(CLEAR_VARS) |
| 63 | |
| 64 | LOCAL_CLANG := true |
Tao Bao | ba9a42a | 2015-06-23 23:23:33 -0700 | [diff] [blame] | 65 | LOCAL_SRC_FILES := main.cpp |
Doug Zongker | 512536a | 2010-02-17 16:11:44 -0800 | [diff] [blame] | 66 | LOCAL_MODULE := applypatch |
Michael Bestas | c86b6d4 | 2017-04-28 22:43:09 +0300 | [diff] [blame] | 67 | LOCAL_C_INCLUDES += $(RECOVERY_PATH) |
Yabin Cui | ca78c9f | 2016-02-05 15:27:52 -0800 | [diff] [blame] | 68 | LOCAL_STATIC_LIBRARIES += libapplypatch libbase libotafault libmtdutils libcrypto_static libbz \ |
| 69 | libedify \ |
| 70 | |
Dan Albert | e49a9e5 | 2015-05-19 11:33:18 -0700 | [diff] [blame] | 71 | LOCAL_SHARED_LIBRARIES += libz libcutils libc |
Doug Zongker | 512536a | 2010-02-17 16:11:44 -0800 | [diff] [blame] | 72 | |
| 73 | include $(BUILD_EXECUTABLE) |
| 74 | |
| 75 | include $(CLEAR_VARS) |
| 76 | |
Tao Bao | 80e46e0 | 2015-06-03 10:49:29 -0700 | [diff] [blame] | 77 | LOCAL_CLANG := true |
Tao Bao | ba9a42a | 2015-06-23 23:23:33 -0700 | [diff] [blame] | 78 | LOCAL_SRC_FILES := imgdiff.cpp utils.cpp bsdiff.cpp |
Doug Zongker | 512536a | 2010-02-17 16:11:44 -0800 | [diff] [blame] | 79 | LOCAL_MODULE := imgdiff |
| 80 | LOCAL_FORCE_STATIC_EXECUTABLE := true |
Doug Zongker | 512536a | 2010-02-17 16:11:44 -0800 | [diff] [blame] | 81 | LOCAL_C_INCLUDES += external/zlib external/bzip2 |
| 82 | LOCAL_STATIC_LIBRARIES += libz libbz |
| 83 | |
| 84 | include $(BUILD_HOST_EXECUTABLE) |