blob: 5f3a8a45de311666a1751af736bd4df995db18ac [file] [log] [blame]
Joe Onorato6396e702012-05-31 23:21:46 -07001# 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.
The Android Open Source Projectc24a8e62009-03-03 19:28:42 -080014
Joe Onorato6396e702012-05-31 23:21:46 -070015LOCAL_PATH := $(call my-dir)
16
Tao Bao1d866052017-04-10 16:55:57 -070017# Needed by build/make/core/Makefile.
18RECOVERY_API_VERSION := 3
19RECOVERY_FSTAB_VERSION := 2
20
Tao Baod80a9982016-03-03 11:43:47 -080021# libfusesideload (static library)
22# ===============================
Joe Onorato6396e702012-05-31 23:21:46 -070023include $(CLEAR_VARS)
Tao Bao0d4e0022015-07-19 08:40:37 -070024LOCAL_SRC_FILES := fuse_sideload.cpp
Tao Bao20126e12017-04-26 12:30:46 -070025LOCAL_CFLAGS := -Wall -Werror
Doug Zongker18a78e02014-07-10 07:31:46 -070026LOCAL_CFLAGS += -D_XOPEN_SOURCE -D_GNU_SOURCE
Doug Zongker18a78e02014-07-10 07:31:46 -070027LOCAL_MODULE := libfusesideload
Tao Baoed138192017-05-01 22:30:39 -070028LOCAL_STATIC_LIBRARIES := \
29 libcrypto \
30 libbase
Doug Zongker18a78e02014-07-10 07:31:46 -070031include $(BUILD_STATIC_LIBRARY)
32
Elliott Hughes63a31922016-06-09 17:41:22 -070033# libmounts (static library)
34# ===============================
35include $(CLEAR_VARS)
36LOCAL_SRC_FILES := mounts.cpp
Tao Bao5f85d1f2017-03-28 21:12:36 -070037LOCAL_CFLAGS := \
38 -Wall \
39 -Werror
Elliott Hughes63a31922016-06-09 17:41:22 -070040LOCAL_MODULE := libmounts
Tao Bao5f85d1f2017-03-28 21:12:36 -070041LOCAL_STATIC_LIBRARIES := libbase
Elliott Hughes63a31922016-06-09 17:41:22 -070042include $(BUILD_STATIC_LIBRARY)
43
Tao Bao1d866052017-04-10 16:55:57 -070044# librecovery (static library)
45# ===============================
46include $(CLEAR_VARS)
47LOCAL_SRC_FILES := \
48 install.cpp
Tao Baob24510c2017-04-20 17:54:27 -070049LOCAL_CFLAGS := -Wall -Werror
Tao Bao1d866052017-04-10 16:55:57 -070050LOCAL_CFLAGS += -DRECOVERY_API_VERSION=$(RECOVERY_API_VERSION)
Tao Bao7fdcb192017-04-12 23:52:20 -070051
52ifeq ($(AB_OTA_UPDATER),true)
53 LOCAL_CFLAGS += -DAB_OTA_UPDATER=1
54endif
55
Tao Bao1d866052017-04-10 16:55:57 -070056LOCAL_MODULE := librecovery
57LOCAL_STATIC_LIBRARIES := \
58 libminui \
Tao Bao919d2c92017-04-10 16:55:57 -070059 libvintf_recovery \
Tao Bao1d866052017-04-10 16:55:57 -070060 libcrypto_utils \
61 libcrypto \
62 libbase
63
64include $(BUILD_STATIC_LIBRARY)
65
Tao Baod80a9982016-03-03 11:43:47 -080066# recovery (static executable)
67# ===============================
Doug Zongker18a78e02014-07-10 07:31:46 -070068include $(CLEAR_VARS)
69
The Android Open Source Projectc24a8e62009-03-03 19:28:42 -080070LOCAL_SRC_FILES := \
Doug Zongker945fc682014-07-10 10:50:39 -070071 adb_install.cpp \
Elliott Hughes9e7ae8a2015-04-09 13:40:31 -070072 device.cpp \
Tao Bao0d4e0022015-07-19 08:40:37 -070073 fuse_sdcard_provider.cpp \
Elliott Hughes9e7ae8a2015-04-09 13:40:31 -070074 recovery.cpp \
75 roots.cpp \
Tianjie Xue113e4d2016-10-21 17:46:13 -070076 rotate_logs.cpp \
Elliott Hughes9e7ae8a2015-04-09 13:40:31 -070077 screen_ui.cpp \
78 ui.cpp \
Tao Bao337db142015-08-20 14:52:57 -070079 wear_ui.cpp \
Prashant Malani9020e0f2016-03-11 11:57:10 -080080 wear_touch.cpp \
The Android Open Source Projectc24a8e62009-03-03 19:28:42 -080081
The Android Open Source Projectc24a8e62009-03-03 19:28:42 -080082LOCAL_MODULE := recovery
83
84LOCAL_FORCE_STATIC_EXECUTABLE := true
85
Tao Baof6835122015-10-27 21:53:18 -070086ifeq ($(TARGET_USERIMAGES_USE_F2FS),true)
Ji-Hwan Leeb9afc2b2014-06-19 02:02:50 +090087ifeq ($(HOST_OS),linux)
88LOCAL_REQUIRED_MODULES := mkfs.f2fs
89endif
Tao Baof6835122015-10-27 21:53:18 -070090endif
JP Abgrall37aedb32014-06-16 19:07:39 -070091
Doug Zongkerfb2e3af2009-06-17 17:29:40 -070092LOCAL_CFLAGS += -DRECOVERY_API_VERSION=$(RECOVERY_API_VERSION)
Tianjie Xu17e316c2016-09-28 11:42:17 -070093LOCAL_CFLAGS += -Wno-unused-parameter -Werror
Doug Zongkerfb2e3af2009-06-17 17:29:40 -070094
Tao Bao855eaff2017-06-20 18:11:21 -070095ifneq ($(TARGET_RECOVERY_UI_MARGIN_HEIGHT),)
96LOCAL_CFLAGS += -DRECOVERY_UI_MARGIN_HEIGHT=$(TARGET_RECOVERY_UI_MARGIN_HEIGHT)
97else
98LOCAL_CFLAGS += -DRECOVERY_UI_MARGIN_HEIGHT=0
99endif
100
101ifneq ($(TARGET_RECOVERY_UI_MARGIN_WIDTH),)
102LOCAL_CFLAGS += -DRECOVERY_UI_MARGIN_WIDTH=$(TARGET_RECOVERY_UI_MARGIN_WIDTH)
103else
104LOCAL_CFLAGS += -DRECOVERY_UI_MARGIN_WIDTH=0
105endif
106
Dan Albert1ddd3502015-02-18 15:58:15 -0800107LOCAL_C_INCLUDES += \
108 system/vold \
Adrien Grassein3cd669f2014-11-06 14:53:50 +0100109
Joe Onorato6396e702012-05-31 23:21:46 -0700110LOCAL_STATIC_LIBRARIES := \
Tao Bao1d866052017-04-10 16:55:57 -0700111 librecovery \
Tao Baob168f5f2017-04-16 15:22:13 -0700112 libverifier \
Yabin Cui53e7a062016-02-17 12:21:52 -0800113 libbatterymonitor \
Yabin Cui2f272c02016-06-24 18:22:02 -0700114 libbootloader_message \
Alex Deymo31653662017-01-11 14:02:13 -0800115 libext4_utils \
Alex Deymo67f3aa82017-01-11 14:38:20 -0800116 libsparse \
Tianjie Xu8cf5c8f2016-09-08 20:10:11 -0700117 libziparchive \
118 libotautil \
Elliott Hughes63a31922016-06-09 17:41:22 -0700119 libmounts \
Joe Onorato6396e702012-05-31 23:21:46 -0700120 libz \
Joe Onorato6396e702012-05-31 23:21:46 -0700121 libminadbd \
Doug Zongker18a78e02014-07-10 07:31:46 -0700122 libfusesideload \
Joe Onorato6396e702012-05-31 23:21:46 -0700123 libminui \
Joe Onorato6396e702012-05-31 23:21:46 -0700124 libpng \
Ken Sumrallf35d1ce2013-02-13 12:59:35 -0800125 libfs_mgr \
Josh Gao073164f2016-08-05 15:59:05 -0700126 libcrypto_utils \
127 libcrypto \
Tao Bao919d2c92017-04-10 16:55:57 -0700128 libvintf_recovery \
129 libvintf \
130 libtinyxml2 \
Elliott Hughes8fd86d72015-04-13 14:36:02 -0700131 libbase \
Joe Onorato6396e702012-05-31 23:21:46 -0700132 libcutils \
Yabin Cui53e7a062016-02-17 12:21:52 -0800133 libutils \
Ying Wang4e214822013-04-09 21:41:29 -0700134 liblog \
Kenny Root7eb75672012-10-16 10:47:27 -0700135 libselinux \
Stephen Hines91eb7212012-08-23 15:20:16 -0700136 libm \
Joe Onorato6396e702012-05-31 23:21:46 -0700137 libc
Doug Zongker49c73a72010-06-29 17:36:28 -0700138
Yabin Cui53e7a062016-02-17 12:21:52 -0800139LOCAL_HAL_STATIC_LIBRARIES := libhealthd
140
Elliott Hughes01fcbe12016-05-23 17:43:41 -0700141ifeq ($(AB_OTA_UPDATER),true)
142 LOCAL_CFLAGS += -DAB_OTA_UPDATER=1
143endif
144
Ying Wang5a50b1b2015-03-10 11:56:56 -0700145LOCAL_MODULE_PATH := $(TARGET_RECOVERY_ROOT_OUT)/sbin
The Android Open Source Projectc24a8e62009-03-03 19:28:42 -0800146
Doug Zongkerddd6a282009-06-09 12:22:33 -0700147ifeq ($(TARGET_RECOVERY_UI_LIB),)
Doug Zongkerdaefc1d2011-10-31 09:34:15 -0700148 LOCAL_SRC_FILES += default_device.cpp
Doug Zongkerddd6a282009-06-09 12:22:33 -0700149else
150 LOCAL_STATIC_LIBRARIES += $(TARGET_RECOVERY_UI_LIB)
151endif
The Android Open Source Projectc24a8e62009-03-03 19:28:42 -0800152
Mark Salyzyna4f701a2016-03-09 14:58:16 -0800153ifeq ($(BOARD_CACHEIMAGE_PARTITION_SIZE),)
154LOCAL_REQUIRED_MODULES := recovery-persist recovery-refresh
155endif
156
157include $(BUILD_EXECUTABLE)
158
159# recovery-persist (system partition dynamic executable run after /data mounts)
160# ===============================
161include $(CLEAR_VARS)
Tianjie Xue113e4d2016-10-21 17:46:13 -0700162LOCAL_SRC_FILES := \
163 recovery-persist.cpp \
164 rotate_logs.cpp
Mark Salyzyna4f701a2016-03-09 14:58:16 -0800165LOCAL_MODULE := recovery-persist
166LOCAL_SHARED_LIBRARIES := liblog libbase
167LOCAL_CFLAGS := -Werror
168LOCAL_INIT_RC := recovery-persist.rc
169include $(BUILD_EXECUTABLE)
170
171# recovery-refresh (system partition dynamic executable run at init)
172# ===============================
173include $(CLEAR_VARS)
Tianjie Xue113e4d2016-10-21 17:46:13 -0700174LOCAL_SRC_FILES := \
175 recovery-refresh.cpp \
176 rotate_logs.cpp
Mark Salyzyna4f701a2016-03-09 14:58:16 -0800177LOCAL_MODULE := recovery-refresh
Tianjie Xue113e4d2016-10-21 17:46:13 -0700178LOCAL_SHARED_LIBRARIES := liblog libbase
Mark Salyzyna4f701a2016-03-09 14:58:16 -0800179LOCAL_CFLAGS := -Werror
180LOCAL_INIT_RC := recovery-refresh.rc
The Android Open Source Projectc24a8e62009-03-03 19:28:42 -0800181include $(BUILD_EXECUTABLE)
182
Tao Baod80a9982016-03-03 11:43:47 -0800183# libverifier (static library)
184# ===============================
Kenny Root7a4adb52013-10-09 10:14:35 -0700185include $(CLEAR_VARS)
186LOCAL_MODULE := libverifier
Kenny Root7a4adb52013-10-09 10:14:35 -0700187LOCAL_SRC_FILES := \
Kenny Root7a4adb52013-10-09 10:14:35 -0700188 asn1_decoder.cpp \
Tao Baod7bf82e2017-03-18 09:24:11 -0700189 verifier.cpp
Tao Bao0ecbd762017-01-16 21:16:58 -0800190LOCAL_STATIC_LIBRARIES := \
Tao Bao0ecbd762017-01-16 21:16:58 -0800191 libcrypto_utils \
192 libcrypto \
193 libbase
Tianjie Xu17e316c2016-09-28 11:42:17 -0700194LOCAL_CFLAGS := -Werror
Jed Estep43291862016-02-03 17:02:09 -0800195include $(BUILD_STATIC_LIBRARY)
Doug Zongker73ae31c2009-12-09 17:01:45 -0800196
Yabin Cui2f272c02016-06-24 18:22:02 -0700197include \
198 $(LOCAL_PATH)/applypatch/Android.mk \
Alex Deymofb00d822016-11-08 15:46:07 -0800199 $(LOCAL_PATH)/boot_control/Android.mk \
Yabin Cui2f272c02016-06-24 18:22:02 -0700200 $(LOCAL_PATH)/edify/Android.mk \
Joe Onorato6396e702012-05-31 23:21:46 -0700201 $(LOCAL_PATH)/minadbd/Android.mk \
Yabin Cui2f272c02016-06-24 18:22:02 -0700202 $(LOCAL_PATH)/minui/Android.mk \
Yabin Cui2f272c02016-06-24 18:22:02 -0700203 $(LOCAL_PATH)/otafault/Android.mk \
Kenny Root7a4adb52013-10-09 10:14:35 -0700204 $(LOCAL_PATH)/tests/Android.mk \
Joe Onorato6396e702012-05-31 23:21:46 -0700205 $(LOCAL_PATH)/tools/Android.mk \
Doug Zongker76adfc52014-01-13 10:04:25 -0800206 $(LOCAL_PATH)/uncrypt/Android.mk \
Joe Onorato6396e702012-05-31 23:21:46 -0700207 $(LOCAL_PATH)/updater/Android.mk \
Tao Bao7197ee02015-12-05 21:21:27 -0800208 $(LOCAL_PATH)/update_verifier/Android.mk \