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