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