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