forked from Tasssadar/multirom
-
Notifications
You must be signed in to change notification settings - Fork 3
/
Android.mk
115 lines (88 loc) · 2.93 KB
/
Android.mk
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
# MultiROM
ifeq ($(TARGET_RECOVERY_IS_MULTIROM),true)
LOCAL_PATH:= $(call my-dir)
include $(CLEAR_VARS)
multirom_local_path := $(LOCAL_PATH)
LOCAL_C_INCLUDES += $(multirom_local_path) \
external/libpng \
external/zlib \
external/freetype/include \
$(multirom_local_path)/lib
LOCAL_SRC_FILES:= \
kexec.c \
main.c \
multirom.c \
multirom_ui.c \
multirom_ui_landscape.c \
multirom_ui_portrait.c \
multirom_ui_themes.c \
pong.c \
rcadditions.c \
rom_quirks.c \
rq_inject_file_contexts.c \
# With these, GCC optimizes aggressively enough so full-screen alpha blending
# is quick enough to be done in an animation
LOCAL_CFLAGS += -O3 -funsafe-math-optimizations
#LOCAL_CFLAGS += -D_FORTIFY_SOURCE=2 -fstack-protector-all -O0 -g -fno-omit-frame-pointer -Wall
LOCAL_MODULE:= multirom
LOCAL_MODULE_TAGS := optional
LOCAL_FORCE_STATIC_EXECUTABLE := true
LOCAL_MODULE_PATH := $(TARGET_ROOT_OUT)
LOCAL_UNSTRIPPED_PATH := $(TARGET_ROOT_OUT_UNSTRIPPED)
LOCAL_STATIC_LIBRARIES := libcutils libc libmultirom_static
LOCAL_WHOLE_STATIC_LIBRARIES := libm libcutils libpng libz libft2_mrom_static
# clone libbootimg to /system/extras/ from
# https://github.com/Tasssadar/libbootimg.git
LOCAL_STATIC_LIBRARIES += libbootimg
LOCAL_C_INCLUDES += system/extras/libbootimg/include
include $(multirom_local_path)/device_defines.mk
MR_NO_KEXEC_MK_OPTIONS := true 1 allowed 2 enabled 3 ui_confirm 4 ui_choice 5 forced
ifneq (,$(filter $(MR_NO_KEXEC), $(MR_NO_KEXEC_MK_OPTIONS)))
LOCAL_SRC_FILES += no_kexec.c
ifeq ($(MR_NO_KEXEC_DT_WORKAROUND),true)
LOCAL_CFLAGS += -DMR_NO_KEXEC_DT_WORKAROUND
endif
endif
ifneq ($(MR_DEVICE_HOOKS),)
ifeq ($(MR_DEVICE_HOOKS_VER),)
$(info MR_DEVICE_HOOKS is set but MR_DEVICE_HOOKS_VER is not specified!)
else
LOCAL_CFLAGS += -DMR_DEVICE_HOOKS=$(MR_DEVICE_HOOKS_VER)
LOCAL_SRC_FILES += ../../../$(MR_DEVICE_HOOKS)
endif
endif
ifeq ($(TARGET_REQUIRES_BUMP),true)
LOCAL_CFLAGS += -DTARGET_REQUIRES_BUMP
LOCAL_SRC_FILES += bump.c
endif
ifeq ($(MR_UNIFIED_TABS),true)
LOCAL_CFLAGS += -DMR_UNIFIED_TABS
endif
ifeq ($(MR_ENCRYPTION),true)
LOCAL_CFLAGS += -DMR_ENCRYPTION
ifeq ($(MR_QSEECOMD_HAX),true)
ifeq (,$(filter $(MR_NO_KEXEC), $(MR_NO_KEXEC_MK_OPTIONS)))
$(error MR_NO_KEXEC is not set; this is needed for MR_QSEECOMD_HAX)
else
LOCAL_CFLAGS += -DMR_QSEECOMD_HAX
endif
endif
endif
include $(BUILD_EXECUTABLE)
# Trampoline
include $(multirom_local_path)/trampoline/Android.mk
# Kernel Inject
include $(multirom_local_path)/kernel_inject/Android.mk
# ZIP installer
include $(multirom_local_path)/install_zip/Android.mk
# Kexec-tools
include $(multirom_local_path)/kexec-tools/Android.mk
# adbd
include $(multirom_local_path)/adbd/Android.mk
# trampoline_encmnt
ifeq ($(MR_ENCRYPTION),true)
include $(multirom_local_path)/trampoline_encmnt/Android.mk
endif
# libmultirom
include $(multirom_local_path)/lib/Android.mk
endif