• 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
17include $(CLEAR_VARS)
18
19LOCAL_SRC_FILES := fuse_sideload.cpp
20LOCAL_CLANG := true
21LOCAL_CFLAGS := -O2 -g -DADB_HOST=0 -Wall -Wno-unused-parameter
22LOCAL_CFLAGS += -D_XOPEN_SOURCE -D_GNU_SOURCE
23
24LOCAL_MODULE := libfusesideload
25
26LOCAL_STATIC_LIBRARIES := libcutils libc libcrypto_static
27include $(BUILD_STATIC_LIBRARY)
28
29include $(CLEAR_VARS)
30
31LOCAL_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
45LOCAL_MODULE := recovery
46
47LOCAL_FORCE_STATIC_EXECUTABLE := true
48
49ifeq ($(TARGET_USERIMAGES_USE_F2FS),true)
50ifeq ($(HOST_OS),linux)
51LOCAL_REQUIRED_MODULES := mkfs.f2fs
52endif
53endif
54
55RECOVERY_API_VERSION := 3
56RECOVERY_FSTAB_VERSION := 2
57LOCAL_CFLAGS += -DRECOVERY_API_VERSION=$(RECOVERY_API_VERSION)
58LOCAL_CFLAGS += -Wno-unused-parameter
59LOCAL_CLANG := true
60
61LOCAL_C_INCLUDES += \
62    system/vold \
63    system/extras/ext4_utils \
64    system/core/adb \
65
66LOCAL_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
88LOCAL_HAL_STATIC_LIBRARIES := libhealthd
89
90ifeq ($(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
94endif
95
96ifeq ($(AB_OTA_UPDATER),true)
97    LOCAL_CFLAGS += -DAB_OTA_UPDATER=1
98endif
99
100LOCAL_MODULE_PATH := $(TARGET_RECOVERY_ROOT_OUT)/sbin
101
102ifeq ($(TARGET_RECOVERY_UI_LIB),)
103  LOCAL_SRC_FILES += default_device.cpp
104else
105  LOCAL_STATIC_LIBRARIES += $(TARGET_RECOVERY_UI_LIB)
106endif
107
108ifeq ($(BOARD_CACHEIMAGE_PARTITION_SIZE),)
109LOCAL_REQUIRED_MODULES := recovery-persist recovery-refresh
110endif
111
112include $(BUILD_EXECUTABLE)
113
114# recovery-persist (system partition dynamic executable run after /data mounts)
115# ===============================
116include $(CLEAR_VARS)
117LOCAL_SRC_FILES := recovery-persist.cpp
118LOCAL_MODULE := recovery-persist
119LOCAL_SHARED_LIBRARIES := liblog libbase
120LOCAL_CFLAGS := -Werror
121LOCAL_INIT_RC := recovery-persist.rc
122include $(BUILD_EXECUTABLE)
123
124# recovery-refresh (system partition dynamic executable run at init)
125# ===============================
126include $(CLEAR_VARS)
127LOCAL_SRC_FILES := recovery-refresh.cpp
128LOCAL_MODULE := recovery-refresh
129LOCAL_SHARED_LIBRARIES := liblog
130LOCAL_CFLAGS := -Werror
131LOCAL_INIT_RC := recovery-refresh.rc
132include $(BUILD_EXECUTABLE)
133
134# All the APIs for testing
135include $(CLEAR_VARS)
136LOCAL_CLANG := true
137LOCAL_MODULE := libverifier
138LOCAL_MODULE_TAGS := tests
139LOCAL_SRC_FILES := \
140    asn1_decoder.cpp \
141    verifier.cpp \
142    ui.cpp
143LOCAL_STATIC_LIBRARIES := libcrypto_static
144include $(BUILD_STATIC_LIBRARY)
145
146include \
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