• 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# Needed by build/make/core/Makefile.
18RECOVERY_API_VERSION := 3
19RECOVERY_FSTAB_VERSION := 2
20
21# libfusesideload (static library)
22# ===============================
23include $(CLEAR_VARS)
24LOCAL_SRC_FILES := fuse_sideload.cpp
25LOCAL_CFLAGS := -Wall -Werror
26LOCAL_CFLAGS += -D_XOPEN_SOURCE -D_GNU_SOURCE
27LOCAL_MODULE := libfusesideload
28LOCAL_STATIC_LIBRARIES := \
29    libcrypto \
30    libbase
31include $(BUILD_STATIC_LIBRARY)
32
33# libmounts (static library)
34# ===============================
35include $(CLEAR_VARS)
36LOCAL_SRC_FILES := mounts.cpp
37LOCAL_CFLAGS := \
38    -Wall \
39    -Werror
40LOCAL_MODULE := libmounts
41LOCAL_STATIC_LIBRARIES := libbase
42include $(BUILD_STATIC_LIBRARY)
43
44# librecovery (static library)
45# ===============================
46include $(CLEAR_VARS)
47LOCAL_SRC_FILES := \
48    install.cpp
49LOCAL_CFLAGS := -Wall -Werror
50LOCAL_CFLAGS += -DRECOVERY_API_VERSION=$(RECOVERY_API_VERSION)
51
52ifeq ($(AB_OTA_UPDATER),true)
53    LOCAL_CFLAGS += -DAB_OTA_UPDATER=1
54endif
55
56LOCAL_MODULE := librecovery
57LOCAL_STATIC_LIBRARIES := \
58    libminui \
59    libvintf_recovery \
60    libcrypto_utils \
61    libcrypto \
62    libbase \
63    libziparchive \
64
65include $(BUILD_STATIC_LIBRARY)
66
67# recovery (static executable)
68# ===============================
69include $(CLEAR_VARS)
70
71LOCAL_SRC_FILES := \
72    adb_install.cpp \
73    device.cpp \
74    fuse_sdcard_provider.cpp \
75    recovery.cpp \
76    roots.cpp \
77    rotate_logs.cpp \
78    screen_ui.cpp \
79    ui.cpp \
80    vr_ui.cpp \
81    wear_ui.cpp \
82
83LOCAL_MODULE := recovery
84
85LOCAL_FORCE_STATIC_EXECUTABLE := true
86
87LOCAL_REQUIRED_MODULES := e2fsdroid_static mke2fs_static mke2fs.conf
88
89ifeq ($(TARGET_USERIMAGES_USE_F2FS),true)
90ifeq ($(HOST_OS),linux)
91LOCAL_REQUIRED_MODULES += mkfs.f2fs
92endif
93endif
94
95LOCAL_CFLAGS += -DRECOVERY_API_VERSION=$(RECOVERY_API_VERSION)
96LOCAL_CFLAGS += -Wno-unused-parameter -Werror
97
98ifneq ($(TARGET_RECOVERY_UI_MARGIN_HEIGHT),)
99LOCAL_CFLAGS += -DRECOVERY_UI_MARGIN_HEIGHT=$(TARGET_RECOVERY_UI_MARGIN_HEIGHT)
100else
101LOCAL_CFLAGS += -DRECOVERY_UI_MARGIN_HEIGHT=0
102endif
103
104ifneq ($(TARGET_RECOVERY_UI_MARGIN_WIDTH),)
105LOCAL_CFLAGS += -DRECOVERY_UI_MARGIN_WIDTH=$(TARGET_RECOVERY_UI_MARGIN_WIDTH)
106else
107LOCAL_CFLAGS += -DRECOVERY_UI_MARGIN_WIDTH=0
108endif
109
110ifneq ($(TARGET_RECOVERY_UI_TOUCH_LOW_THRESHOLD),)
111LOCAL_CFLAGS += -DRECOVERY_UI_TOUCH_LOW_THRESHOLD=$(TARGET_RECOVERY_UI_TOUCH_LOW_THRESHOLD)
112else
113LOCAL_CFLAGS += -DRECOVERY_UI_TOUCH_LOW_THRESHOLD=50
114endif
115
116ifneq ($(TARGET_RECOVERY_UI_TOUCH_HIGH_THRESHOLD),)
117LOCAL_CFLAGS += -DRECOVERY_UI_TOUCH_HIGH_THRESHOLD=$(TARGET_RECOVERY_UI_TOUCH_HIGH_THRESHOLD)
118else
119LOCAL_CFLAGS += -DRECOVERY_UI_TOUCH_HIGH_THRESHOLD=90
120endif
121
122ifneq ($(TARGET_RECOVERY_UI_PROGRESS_BAR_BASELINE),)
123LOCAL_CFLAGS += -DRECOVERY_UI_PROGRESS_BAR_BASELINE=$(TARGET_RECOVERY_UI_PROGRESS_BAR_BASELINE)
124else
125LOCAL_CFLAGS += -DRECOVERY_UI_PROGRESS_BAR_BASELINE=259
126endif
127
128ifneq ($(TARGET_RECOVERY_UI_ANIMATION_FPS),)
129LOCAL_CFLAGS += -DRECOVERY_UI_ANIMATION_FPS=$(TARGET_RECOVERY_UI_ANIMATION_FPS)
130else
131LOCAL_CFLAGS += -DRECOVERY_UI_ANIMATION_FPS=30
132endif
133
134ifneq ($(TARGET_RECOVERY_UI_MENU_UNUSABLE_ROWS),)
135LOCAL_CFLAGS += -DRECOVERY_UI_MENU_UNUSABLE_ROWS=$(TARGET_RECOVERY_UI_MENU_UNUSABLE_ROWS)
136else
137LOCAL_CFLAGS += -DRECOVERY_UI_MENU_UNUSABLE_ROWS=9
138endif
139
140ifneq ($(TARGET_RECOVERY_UI_VR_STEREO_OFFSET),)
141LOCAL_CFLAGS += -DRECOVERY_UI_VR_STEREO_OFFSET=$(TARGET_RECOVERY_UI_VR_STEREO_OFFSET)
142else
143LOCAL_CFLAGS += -DRECOVERY_UI_VR_STEREO_OFFSET=0
144endif
145
146LOCAL_C_INCLUDES += \
147    system/vold \
148
149LOCAL_STATIC_LIBRARIES := \
150    librecovery \
151    libverifier \
152    libbatterymonitor \
153    libbootloader_message \
154    libfs_mgr \
155    libext4_utils \
156    libsparse \
157    libziparchive \
158    libotautil \
159    libmounts \
160    libz \
161    libminadbd \
162    libfusesideload \
163    libminui \
164    libpng \
165    libcrypto_utils \
166    libcrypto \
167    libvintf_recovery \
168    libvintf \
169    libtinyxml2 \
170    libbase \
171    libcutils \
172    libutils \
173    liblog \
174    libselinux \
175    libm \
176    libc
177
178LOCAL_HAL_STATIC_LIBRARIES := libhealthd
179
180ifeq ($(AB_OTA_UPDATER),true)
181    LOCAL_CFLAGS += -DAB_OTA_UPDATER=1
182endif
183
184LOCAL_MODULE_PATH := $(TARGET_RECOVERY_ROOT_OUT)/sbin
185
186ifeq ($(TARGET_RECOVERY_UI_LIB),)
187  LOCAL_SRC_FILES += default_device.cpp
188else
189  LOCAL_STATIC_LIBRARIES += $(TARGET_RECOVERY_UI_LIB)
190endif
191
192ifeq ($(BOARD_CACHEIMAGE_PARTITION_SIZE),)
193LOCAL_REQUIRED_MODULES += recovery-persist recovery-refresh
194endif
195
196include $(BUILD_EXECUTABLE)
197
198# recovery-persist (system partition dynamic executable run after /data mounts)
199# ===============================
200include $(CLEAR_VARS)
201LOCAL_SRC_FILES := \
202    recovery-persist.cpp \
203    rotate_logs.cpp
204LOCAL_MODULE := recovery-persist
205LOCAL_SHARED_LIBRARIES := liblog libbase
206LOCAL_CFLAGS := -Werror
207LOCAL_INIT_RC := recovery-persist.rc
208include $(BUILD_EXECUTABLE)
209
210# recovery-refresh (system partition dynamic executable run at init)
211# ===============================
212include $(CLEAR_VARS)
213LOCAL_SRC_FILES := \
214    recovery-refresh.cpp \
215    rotate_logs.cpp
216LOCAL_MODULE := recovery-refresh
217LOCAL_SHARED_LIBRARIES := liblog libbase
218LOCAL_CFLAGS := -Werror
219LOCAL_INIT_RC := recovery-refresh.rc
220include $(BUILD_EXECUTABLE)
221
222# libverifier (static library)
223# ===============================
224include $(CLEAR_VARS)
225LOCAL_MODULE := libverifier
226LOCAL_SRC_FILES := \
227    asn1_decoder.cpp \
228    verifier.cpp
229LOCAL_STATIC_LIBRARIES := \
230    libcrypto_utils \
231    libcrypto \
232    libbase
233LOCAL_CFLAGS := -Werror
234include $(BUILD_STATIC_LIBRARY)
235
236# Wear default device
237# ===============================
238include $(CLEAR_VARS)
239LOCAL_SRC_FILES := wear_device.cpp
240
241# Should match TARGET_RECOVERY_UI_LIB in BoardConfig.mk.
242LOCAL_MODULE := librecovery_ui_wear
243
244include $(BUILD_STATIC_LIBRARY)
245
246# vr headset default device
247# ===============================
248include $(CLEAR_VARS)
249
250LOCAL_SRC_FILES := vr_device.cpp
251
252# should match TARGET_RECOVERY_UI_LIB set in BoardConfig.mk
253LOCAL_MODULE := librecovery_ui_vr
254
255include $(BUILD_STATIC_LIBRARY)
256
257include \
258    $(LOCAL_PATH)/applypatch/Android.mk \
259    $(LOCAL_PATH)/boot_control/Android.mk \
260    $(LOCAL_PATH)/edify/Android.mk \
261    $(LOCAL_PATH)/minadbd/Android.mk \
262    $(LOCAL_PATH)/minui/Android.mk \
263    $(LOCAL_PATH)/otafault/Android.mk \
264    $(LOCAL_PATH)/tests/Android.mk \
265    $(LOCAL_PATH)/tools/Android.mk \
266    $(LOCAL_PATH)/uncrypt/Android.mk \
267    $(LOCAL_PATH)/updater/Android.mk \
268    $(LOCAL_PATH)/update_verifier/Android.mk \
269