Home | History | Annotate | Download | only in recovery
      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 
     15 LOCAL_PATH := $(call my-dir)
     16 
     17 include $(CLEAR_VARS)
     18 
     19 LOCAL_SRC_FILES := fuse_sideload.cpp
     20 LOCAL_CLANG := true
     21 LOCAL_CFLAGS := -O2 -g -DADB_HOST=0 -Wall -Wno-unused-parameter
     22 LOCAL_CFLAGS += -D_XOPEN_SOURCE -D_GNU_SOURCE
     23 
     24 LOCAL_MODULE := libfusesideload
     25 
     26 LOCAL_STATIC_LIBRARIES := libcutils libc libcrypto_static
     27 include $(BUILD_STATIC_LIBRARY)
     28 
     29 include $(CLEAR_VARS)
     30 
     31 LOCAL_SRC_FILES := \
     32     adb_install.cpp \
     33     asn1_decoder.cpp \
     34     device.cpp \
     35     fuse_sdcard_provider.cpp \
     36     install.cpp \
     37     recovery.cpp \
     38     roots.cpp \
     39     screen_ui.cpp \
     40     ui.cpp \
     41     verifier.cpp \
     42     wear_ui.cpp \
     43     wear_touch.cpp \
     44 
     45 LOCAL_MODULE := recovery
     46 
     47 LOCAL_FORCE_STATIC_EXECUTABLE := true
     48 
     49 ifeq ($(TARGET_USERIMAGES_USE_F2FS),true)
     50 ifeq ($(HOST_OS),linux)
     51 LOCAL_REQUIRED_MODULES := mkfs.f2fs
     52 endif
     53 endif
     54 
     55 RECOVERY_API_VERSION := 3
     56 RECOVERY_FSTAB_VERSION := 2
     57 LOCAL_CFLAGS += -DRECOVERY_API_VERSION=$(RECOVERY_API_VERSION)
     58 LOCAL_CFLAGS += -Wno-unused-parameter
     59 LOCAL_CLANG := true
     60 
     61 LOCAL_C_INCLUDES += \
     62     system/vold \
     63     system/extras/ext4_utils \
     64     system/core/adb \
     65 
     66 LOCAL_STATIC_LIBRARIES := \
     67     libbatterymonitor \
     68     libbootloader_message \
     69     libext4_utils_static \
     70     libsparse_static \
     71     libminzip \
     72     libz \
     73     libmtdutils \
     74     libminadbd \
     75     libfusesideload \
     76     libminui \
     77     libpng \
     78     libfs_mgr \
     79     libcrypto_static \
     80     libbase \
     81     libcutils \
     82     libutils \
     83     liblog \
     84     libselinux \
     85     libm \
     86     libc
     87 
     88 LOCAL_HAL_STATIC_LIBRARIES := libhealthd
     89 
     90 ifeq ($(TARGET_USERIMAGES_USE_EXT4), true)
     91     LOCAL_CFLAGS += -DUSE_EXT4
     92     LOCAL_C_INCLUDES += system/extras/ext4_utils
     93     LOCAL_STATIC_LIBRARIES += libext4_utils_static libz
     94 endif
     95 
     96 ifeq ($(AB_OTA_UPDATER),true)
     97     LOCAL_CFLAGS += -DAB_OTA_UPDATER=1
     98 endif
     99 
    100 LOCAL_MODULE_PATH := $(TARGET_RECOVERY_ROOT_OUT)/sbin
    101 
    102 ifeq ($(TARGET_RECOVERY_UI_LIB),)
    103   LOCAL_SRC_FILES += default_device.cpp
    104 else
    105   LOCAL_STATIC_LIBRARIES += $(TARGET_RECOVERY_UI_LIB)
    106 endif
    107 
    108 ifeq ($(BOARD_CACHEIMAGE_PARTITION_SIZE),)
    109 LOCAL_REQUIRED_MODULES := recovery-persist recovery-refresh
    110 endif
    111 
    112 include $(BUILD_EXECUTABLE)
    113 
    114 # recovery-persist (system partition dynamic executable run after /data mounts)
    115 # ===============================
    116 include $(CLEAR_VARS)
    117 LOCAL_SRC_FILES := recovery-persist.cpp
    118 LOCAL_MODULE := recovery-persist
    119 LOCAL_SHARED_LIBRARIES := liblog libbase
    120 LOCAL_CFLAGS := -Werror
    121 LOCAL_INIT_RC := recovery-persist.rc
    122 include $(BUILD_EXECUTABLE)
    123 
    124 # recovery-refresh (system partition dynamic executable run at init)
    125 # ===============================
    126 include $(CLEAR_VARS)
    127 LOCAL_SRC_FILES := recovery-refresh.cpp
    128 LOCAL_MODULE := recovery-refresh
    129 LOCAL_SHARED_LIBRARIES := liblog
    130 LOCAL_CFLAGS := -Werror
    131 LOCAL_INIT_RC := recovery-refresh.rc
    132 include $(BUILD_EXECUTABLE)
    133 
    134 # All the APIs for testing
    135 include $(CLEAR_VARS)
    136 LOCAL_CLANG := true
    137 LOCAL_MODULE := libverifier
    138 LOCAL_MODULE_TAGS := tests
    139 LOCAL_SRC_FILES := \
    140     asn1_decoder.cpp \
    141     verifier.cpp \
    142     ui.cpp
    143 LOCAL_STATIC_LIBRARIES := libcrypto_static
    144 include $(BUILD_STATIC_LIBRARY)
    145 
    146 include \
    147     $(LOCAL_PATH)/applypatch/Android.mk \
    148     $(LOCAL_PATH)/bootloader_message/Android.mk \
    149     $(LOCAL_PATH)/edify/Android.mk \
    150     $(LOCAL_PATH)/minui/Android.mk \
    151     $(LOCAL_PATH)/minzip/Android.mk \
    152     $(LOCAL_PATH)/minadbd/Android.mk \
    153     $(LOCAL_PATH)/mtdutils/Android.mk \
    154     $(LOCAL_PATH)/otafault/Android.mk \
    155     $(LOCAL_PATH)/tests/Android.mk \
    156     $(LOCAL_PATH)/tools/Android.mk \
    157     $(LOCAL_PATH)/uncrypt/Android.mk \
    158     $(LOCAL_PATH)/updater/Android.mk \
    159     $(LOCAL_PATH)/update_verifier/Android.mk \
    160