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
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
|
LOCAL_PATH := $(call my-dir)
include $(CLEAR_VARS)
LOCAL_SRC_FILES := \
graphics.cpp \
graphics_fbdev.cpp \
resources.cpp \
graphics_overlay.cpp \
truetype.cpp \
graphics_utils.cpp \
events.cpp
ifneq ($(TW_BOARD_CUSTOM_GRAPHICS),)
$(warning ****************************************************************************)
$(warning * TW_BOARD_CUSTOM_GRAPHICS support has been deprecated in TWRP. *)
$(warning ****************************************************************************)
$(error stopping)
endif
ifeq ($(TW_TARGET_USES_QCOM_BSP), true)
LOCAL_CFLAGS += -DMSM_BSP
ifeq ($(TARGET_PREBUILT_KERNEL),)
LOCAL_ADDITIONAL_DEPENDENCIES := $(TARGET_OUT_INTERMEDIATES)/KERNEL_OBJ/usr
LOCAL_C_INCLUDES += $(TARGET_OUT_INTERMEDIATES)/KERNEL_OBJ/usr/include
else
ifeq ($(TARGET_CUSTOM_KERNEL_HEADERS),)
LOCAL_C_INCLUDES += $(commands_recovery_local_path)/minuitwrp/include
else
LOCAL_C_INCLUDES += $(TARGET_CUSTOM_KERNEL_HEADERS)
endif
endif
else
LOCAL_C_INCLUDES += $(commands_recovery_local_path)/minuitwrp/include
# The header files required for adf graphics can cause compile errors
# with adf graphics.
ifneq ($(wildcard system/core/adf/Android.mk),)
LOCAL_CFLAGS += -DHAS_ADF
LOCAL_SRC_FILES += graphics_adf.cpp
LOCAL_WHOLE_STATIC_LIBRARIES += libadf
endif
endif
ifeq ($(TW_NEW_ION_HEAP), true)
LOCAL_CFLAGS += -DNEW_ION_HEAP
endif
ifneq ($(wildcard external/libdrm/Android.mk),)
LOCAL_CFLAGS += -DHAS_DRM
LOCAL_SRC_FILES += graphics_drm.cpp
LOCAL_WHOLE_STATIC_LIBRARIES += libdrm
endif
LOCAL_C_INCLUDES += \
external/libpng \
external/zlib \
system/core/include \
external/freetype/include \
external/libcxx/include
#external/jpeg \
ifeq ($(RECOVERY_TOUCHSCREEN_SWAP_XY), true)
LOCAL_CFLAGS += -DRECOVERY_TOUCHSCREEN_SWAP_XY
endif
ifeq ($(RECOVERY_TOUCHSCREEN_FLIP_X), true)
LOCAL_CFLAGS += -DRECOVERY_TOUCHSCREEN_FLIP_X
endif
ifeq ($(RECOVERY_TOUCHSCREEN_FLIP_Y), true)
LOCAL_CFLAGS += -DRECOVERY_TOUCHSCREEN_FLIP_Y
endif
ifeq ($(RECOVERY_GRAPHICS_USE_LINELENGTH), true)
LOCAL_CFLAGS += -DRECOVERY_GRAPHICS_USE_LINELENGTH
endif
ifeq ($(TW_DISABLE_DOUBLE_BUFFERING), true)
LOCAL_CFLAGS += -DTW_DISABLE_DOUBLE_BUFFERING
endif
#Remove the # from the line below to enable event logging
#TWRP_EVENT_LOGGING := true
ifeq ($(TWRP_EVENT_LOGGING), true)
LOCAL_CFLAGS += -D_EVENT_LOGGING
endif
ifeq ($(subst ",,$(TARGET_RECOVERY_PIXEL_FORMAT)),RGBA_8888)
LOCAL_CFLAGS += -DRECOVERY_RGBA
endif
ifeq ($(subst ",,$(TARGET_RECOVERY_PIXEL_FORMAT)),RGBX_8888)
LOCAL_CFLAGS += -DRECOVERY_RGBX
endif
ifeq ($(subst ",,$(TARGET_RECOVERY_PIXEL_FORMAT)),BGRA_8888)
LOCAL_CFLAGS += -DRECOVERY_BGRA
endif
ifeq ($(subst ",,$(TARGET_RECOVERY_PIXEL_FORMAT)),RGB_565)
LOCAL_CFLAGS += -DRECOVERY_RGB_565
endif
ifneq ($(TARGET_RECOVERY_OVERSCAN_PERCENT),)
LOCAL_CFLAGS += -DOVERSCAN_PERCENT=$(TARGET_RECOVERY_OVERSCAN_PERCENT)
else
LOCAL_CFLAGS += -DOVERSCAN_PERCENT=0
endif
ifeq ($(TARGET_RECOVERY_PIXEL_FORMAT),"RGBX_8888")
LOCAL_CFLAGS += -DRECOVERY_RGBX
endif
ifeq ($(TARGET_RECOVERY_PIXEL_FORMAT),"BGRA_8888")
LOCAL_CFLAGS += -DRECOVERY_BGRA
endif
ifeq ($(TARGET_RECOVERY_PIXEL_FORMAT),"RGB_565")
LOCAL_CFLAGS += -DRECOVERY_RGB_565
endif
ifeq ($(TW_SCREEN_BLANK_ON_BOOT), true)
LOCAL_CFLAGS += -DTW_SCREEN_BLANK_ON_BOOT
endif
ifeq ($(BOARD_HAS_FLIPPED_SCREEN), true)
LOCAL_CFLAGS += -DBOARD_HAS_FLIPPED_SCREEN
endif
ifeq ($(TW_IGNORE_MAJOR_AXIS_0), true)
LOCAL_CFLAGS += -DTW_IGNORE_MAJOR_AXIS_0
endif
ifeq ($(TW_IGNORE_MT_POSITION_0), true)
LOCAL_CFLAGS += -DTW_IGNORE_MT_POSITION_0
endif
ifeq ($(TW_IGNORE_ABS_MT_TRACKING_ID), true)
LOCAL_CFLAGS += -DTW_IGNORE_ABS_MT_TRACKING_ID
endif
ifneq ($(TW_INPUT_BLACKLIST),)
LOCAL_CFLAGS += -DTW_INPUT_BLACKLIST=$(TW_INPUT_BLACKLIST)
endif
ifneq ($(TW_WHITELIST_INPUT),)
LOCAL_CFLAGS += -DWHITELIST_INPUT=$(TW_WHITELIST_INPUT)
endif
ifeq ($(TW_DISABLE_TTF), true)
$(warning ****************************************************************************)
$(warning * TW_DISABLE_TTF support has been deprecated in TWRP. *)
$(warning ****************************************************************************)
$(error stopping)
endif
LOCAL_CLANG := true
LOCAL_CFLAGS += -DTWRES=\"$(TWRES_PATH)\"
LOCAL_SHARED_LIBRARIES += libft2 libz libc libcutils libpng libutils
#libjpeg
LOCAL_STATIC_LIBRARIES += libpixelflinger_twrp
LOCAL_MODULE_TAGS := eng
LOCAL_MODULE := libminuitwrp
include $(BUILD_SHARED_LIBRARY)
|