1# Copyright (C) 2007 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 15LOCAL_PATH := $(call my-dir) 16 17 18include $(CLEAR_VARS) 19 20LOCAL_SRC_FILES := fuse_sideload.c 21 22LOCAL_CFLAGS := -O2 -g -DADB_HOST=0 -Wall -Wno-unused-parameter 23LOCAL_CFLAGS += -D_XOPEN_SOURCE -D_GNU_SOURCE 24 25LOCAL_MODULE := libfusesideload 26 27LOCAL_STATIC_LIBRARIES := libcutils libc libmincrypt 28include $(BUILD_STATIC_LIBRARY) 29 30include $(CLEAR_VARS) 31 32LOCAL_SRC_FILES := \ 33 adb_install.cpp \ 34 asn1_decoder.cpp \ 35 bootloader.cpp \ 36 device.cpp \ 37 fuse_sdcard_provider.c \ 38 install.cpp \ 39 recovery.cpp \ 40 roots.cpp \ 41 screen_ui.cpp \ 42 ui.cpp \ 43 verifier.cpp \ 44 45LOCAL_MODULE := recovery 46 47LOCAL_FORCE_STATIC_EXECUTABLE := true 48 49ifeq ($(HOST_OS),linux) 50LOCAL_REQUIRED_MODULES := mkfs.f2fs 51endif 52 53RECOVERY_API_VERSION := 3 54RECOVERY_FSTAB_VERSION := 2 55LOCAL_CFLAGS += -DRECOVERY_API_VERSION=$(RECOVERY_API_VERSION) 56LOCAL_CFLAGS += -Wno-unused-parameter 57 58LOCAL_C_INCLUDES += \ 59 system/vold \ 60 system/extras/ext4_utils \ 61 system/core/adb \ 62 63LOCAL_STATIC_LIBRARIES := \ 64 libext4_utils_static \ 65 libsparse_static \ 66 libminzip \ 67 libz \ 68 libmtdutils \ 69 libmincrypt \ 70 libminadbd \ 71 libfusesideload \ 72 libminui \ 73 libpng \ 74 libfs_mgr \ 75 libbase \ 76 libcutils \ 77 liblog \ 78 libselinux \ 79 libstdc++ \ 80 libm \ 81 libc 82 83ifeq ($(TARGET_USERIMAGES_USE_EXT4), true) 84 LOCAL_CFLAGS += -DUSE_EXT4 85 LOCAL_C_INCLUDES += system/extras/ext4_utils 86 LOCAL_STATIC_LIBRARIES += libext4_utils_static libz 87endif 88 89LOCAL_MODULE_PATH := $(TARGET_RECOVERY_ROOT_OUT)/sbin 90 91ifeq ($(TARGET_RECOVERY_UI_LIB),) 92 LOCAL_SRC_FILES += default_device.cpp 93else 94 LOCAL_STATIC_LIBRARIES += $(TARGET_RECOVERY_UI_LIB) 95endif 96 97include $(BUILD_EXECUTABLE) 98 99# All the APIs for testing 100include $(CLEAR_VARS) 101LOCAL_MODULE := libverifier 102LOCAL_MODULE_TAGS := tests 103LOCAL_SRC_FILES := \ 104 asn1_decoder.cpp 105include $(BUILD_STATIC_LIBRARY) 106 107include $(CLEAR_VARS) 108LOCAL_MODULE := verifier_test 109LOCAL_FORCE_STATIC_EXECUTABLE := true 110LOCAL_MODULE_TAGS := tests 111LOCAL_CFLAGS += -Wno-unused-parameter 112LOCAL_SRC_FILES := \ 113 verifier_test.cpp \ 114 asn1_decoder.cpp \ 115 verifier.cpp \ 116 ui.cpp 117LOCAL_STATIC_LIBRARIES := \ 118 libmincrypt \ 119 libminui \ 120 libminzip \ 121 libcutils \ 122 libstdc++ \ 123 libc 124include $(BUILD_EXECUTABLE) 125 126 127include $(LOCAL_PATH)/minui/Android.mk \ 128 $(LOCAL_PATH)/minzip/Android.mk \ 129 $(LOCAL_PATH)/minadbd/Android.mk \ 130 $(LOCAL_PATH)/mtdutils/Android.mk \ 131 $(LOCAL_PATH)/tests/Android.mk \ 132 $(LOCAL_PATH)/tools/Android.mk \ 133 $(LOCAL_PATH)/edify/Android.mk \ 134 $(LOCAL_PATH)/uncrypt/Android.mk \ 135 $(LOCAL_PATH)/updater/Android.mk \ 136 $(LOCAL_PATH)/applypatch/Android.mk 137