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 := \
     21     recovery.cpp \
     22     bootloader.cpp \
     23     install.cpp \
     24     roots.cpp \
     25     ui.cpp \
     26     screen_ui.cpp \
     27     verifier.cpp \
     28     adb_install.cpp
     29 
     30 LOCAL_MODULE := recovery
     31 
     32 LOCAL_FORCE_STATIC_EXECUTABLE := true
     33 
     34 RECOVERY_API_VERSION := 3
     35 RECOVERY_FSTAB_VERSION := 2
     36 LOCAL_CFLAGS += -DRECOVERY_API_VERSION=$(RECOVERY_API_VERSION)
     37 
     38 LOCAL_STATIC_LIBRARIES := \
     39     libext4_utils_static \
     40     libsparse_static \
     41     libminzip \
     42     libz \
     43     libmtdutils \
     44     libmincrypt \
     45     libminadbd \
     46     libminui \
     47     libpixelflinger_static \
     48     libpng \
     49     libfs_mgr \
     50     libcutils \
     51     liblog \
     52     libselinux \
     53     libstdc++ \
     54     libm \
     55     libc
     56 
     57 ifeq ($(TARGET_USERIMAGES_USE_EXT4), true)
     58     LOCAL_CFLAGS += -DUSE_EXT4
     59     LOCAL_C_INCLUDES += system/extras/ext4_utils
     60     LOCAL_STATIC_LIBRARIES += libext4_utils_static libz
     61 endif
     62 
     63 # This binary is in the recovery ramdisk, which is otherwise a copy of root.
     64 # It gets copied there in config/Makefile.  LOCAL_MODULE_TAGS suppresses
     65 # a (redundant) copy of the binary in /system/bin for user builds.
     66 # TODO: Build the ramdisk image in a more principled way.
     67 LOCAL_MODULE_TAGS := eng
     68 
     69 ifeq ($(TARGET_RECOVERY_UI_LIB),)
     70   LOCAL_SRC_FILES += default_device.cpp
     71 else
     72   LOCAL_STATIC_LIBRARIES += $(TARGET_RECOVERY_UI_LIB)
     73 endif
     74 
     75 LOCAL_C_INCLUDES += system/extras/ext4_utils
     76 
     77 include $(BUILD_EXECUTABLE)
     78 
     79 
     80 
     81 include $(CLEAR_VARS)
     82 LOCAL_MODULE := verifier_test
     83 LOCAL_FORCE_STATIC_EXECUTABLE := true
     84 LOCAL_MODULE_TAGS := tests
     85 LOCAL_SRC_FILES := \
     86     verifier_test.cpp \
     87     verifier.cpp \
     88     ui.cpp
     89 LOCAL_STATIC_LIBRARIES := \
     90     libmincrypt \
     91     libminui \
     92     libcutils \
     93     libstdc++ \
     94     libc
     95 include $(BUILD_EXECUTABLE)
     96 
     97 
     98 include $(LOCAL_PATH)/minui/Android.mk \
     99     $(LOCAL_PATH)/minelf/Android.mk \
    100     $(LOCAL_PATH)/minzip/Android.mk \
    101     $(LOCAL_PATH)/minadbd/Android.mk \
    102     $(LOCAL_PATH)/mtdutils/Android.mk \
    103     $(LOCAL_PATH)/tools/Android.mk \
    104     $(LOCAL_PATH)/edify/Android.mk \
    105     $(LOCAL_PATH)/updater/Android.mk \
    106     $(LOCAL_PATH)/applypatch/Android.mk
    107