blob: 6191448b75f08476c39a415b18cb6e485c373922 [file] [log] [blame]
Ethan Yonkerc798c9c2015-10-09 11:15:26 -05001LOCAL_PATH := $(call my-dir)
2include $(CLEAR_VARS)
3
4LOCAL_SRC_FILES := graphics_overlay.c events.c resources.c
5ifneq ($(BOARD_CUSTOM_GRAPHICS),)
6 LOCAL_SRC_FILES += $(BOARD_CUSTOM_GRAPHICS)
7else
8 LOCAL_SRC_FILES += graphics.c
9endif
10
11LOCAL_C_INCLUDES +=\
12 external/libpng \
13 external/zlib \
14 system/core/include/pixelflinger
15
16ifeq ($(TW_TARGET_USES_QCOM_BSP), true)
17 LOCAL_CFLAGS += -DMSM_BSP
18 ifeq ($(TARGET_PREBUILT_KERNEL),)
19 LOCAL_ADDITIONAL_DEPENDENCIES := $(TARGET_OUT_INTERMEDIATES)/KERNEL_OBJ/usr
20 LOCAL_C_INCLUDES += $(TARGET_OUT_INTERMEDIATES)/KERNEL_OBJ/usr/include
21 else
22 ifeq ($(TARGET_CUSTOM_KERNEL_HEADERS),)
23 LOCAL_C_INCLUDES += $(commands_recovery_local_path)/minui/include
24 else
25 LOCAL_C_INCLUDES += $(TARGET_CUSTOM_KERNEL_HEADERS)
26 endif
27 endif
28else
29 LOCAL_C_INCLUDES += $(commands_recovery_local_path)/minui/include
30endif
31
32ifeq ($(TW_NEW_ION_HEAP), true)
33 LOCAL_CFLAGS += -DNEW_ION_HEAP
34endif
35
36LOCAL_STATIC_LIBRARY := libpng
37LOCAL_WHOLE_STATIC_LIBRARIES := libpixelflinger_static
38LOCAL_MODULE := libminui
39
40# This used to compare against values in double-quotes (which are just
41# ordinary characters in this context). Strip double-quotes from the
42# value so that either will work.
43
Kra1o577568592015-10-14 18:09:54 +020044ifeq ($(subst ",,$(TARGET_RECOVERY_PIXEL_FORMAT)),RGBA_8888)
45 LOCAL_CFLAGS += -DRECOVERY_RGBA
46endif
Ethan Yonkerc798c9c2015-10-09 11:15:26 -050047ifeq ($(subst ",,$(TARGET_RECOVERY_PIXEL_FORMAT)),RGBX_8888)
48 LOCAL_CFLAGS += -DRECOVERY_RGBX
49endif
50ifeq ($(subst ",,$(TARGET_RECOVERY_PIXEL_FORMAT)),BGRA_8888)
51 LOCAL_CFLAGS += -DRECOVERY_BGRA
52endif
53
54ifneq ($(TARGET_RECOVERY_OVERSCAN_PERCENT),)
55 LOCAL_CFLAGS += -DOVERSCAN_PERCENT=$(TARGET_RECOVERY_OVERSCAN_PERCENT)
56else
57 LOCAL_CFLAGS += -DOVERSCAN_PERCENT=0
58endif
59
60ifneq ($(TW_BRIGHTNESS_PATH),)
61 LOCAL_CFLAGS += -DTW_BRIGHTNESS_PATH=\"$(TW_BRIGHTNESS_PATH)\"
62endif
63ifneq ($(TW_MAX_BRIGHTNESS),)
64 LOCAL_CFLAGS += -DTW_MAX_BRIGHTNESS=$(TW_MAX_BRIGHTNESS)
65else
66 LOCAL_CFLAGS += -DTW_MAX_BRIGHTNESS=255
67endif
68ifneq ($(TW_NO_SCREEN_BLANK),)
69 LOCAL_CFLAGS += -DTW_NO_SCREEN_BLANK
70endif
71ifneq ($(BOARD_USE_CUSTOM_RECOVERY_FONT),)
72 LOCAL_CFLAGS += -DBOARD_USE_CUSTOM_RECOVERY_FONT=$(BOARD_USE_CUSTOM_RECOVERY_FONT)
73endif
74include $(BUILD_STATIC_LIBRARY)
75
76include $(CLEAR_VARS)
77
78LOCAL_SRC_FILES := graphics_overlay.c events.c resources.c
79ifneq ($(BOARD_CUSTOM_GRAPHICS),)
80 LOCAL_SRC_FILES += $(BOARD_CUSTOM_GRAPHICS)
81else
82 LOCAL_SRC_FILES += graphics.c
83endif
84
85ifeq ($(TW_TARGET_USES_QCOM_BSP), true)
86 LOCAL_CFLAGS += -DMSM_BSP
87 ifeq ($(TARGET_PREBUILT_KERNEL),)
88 LOCAL_ADDITIONAL_DEPENDENCIES := $(TARGET_OUT_INTERMEDIATES)/KERNEL_OBJ/usr
89 LOCAL_C_INCLUDES += $(TARGET_OUT_INTERMEDIATES)/KERNEL_OBJ/usr/include
90 else
91 ifeq ($(TARGET_CUSTOM_KERNEL_HEADERS),)
92 LOCAL_C_INCLUDES += $(commands_recovery_local_path)/minui/include
93 else
94 LOCAL_C_INCLUDES += $(TARGET_CUSTOM_KERNEL_HEADERS)
95 endif
96 endif
97else
98 LOCAL_C_INCLUDES += $(commands_recovery_local_path)/minui/include
99endif
100
101LOCAL_C_INCLUDES +=\
102 external/libpng\
103 external/zlib
104
105LOCAL_MODULE := libminui
106
107LOCAL_ARM_MODE:= arm
108LOCAL_SHARED_LIBRARIES := libpng libpixelflinger
109# This used to compare against values in double-quotes (which are just
110# ordinary characters in this context). Strip double-quotes from the
111# value so that either will work.
112
113ifeq ($(subst ",,$(TARGET_RECOVERY_PIXEL_FORMAT)),RGBX_8888)
114 LOCAL_CFLAGS += -DRECOVERY_RGBX
115endif
116ifeq ($(subst ",,$(TARGET_RECOVERY_PIXEL_FORMAT)),BGRA_8888)
117 LOCAL_CFLAGS += -DRECOVERY_BGRA
118endif
119
120ifneq ($(TARGET_RECOVERY_OVERSCAN_PERCENT),)
121 LOCAL_CFLAGS += -DOVERSCAN_PERCENT=$(TARGET_RECOVERY_OVERSCAN_PERCENT)
122else
123 LOCAL_CFLAGS += -DOVERSCAN_PERCENT=0
124endif
125
126ifneq ($(TW_BRIGHTNESS_PATH),)
127 LOCAL_CFLAGS += -DTW_BRIGHTNESS_PATH=\"$(TW_BRIGHTNESS_PATH)\"
128endif
129ifneq ($(TW_MAX_BRIGHTNESS),)
130 LOCAL_CFLAGS += -DTW_MAX_BRIGHTNESS=$(TW_MAX_BRIGHTNESS)
131else
132 LOCAL_CFLAGS += -DTW_MAX_BRIGHTNESS=255
133endif
134ifneq ($(TW_NO_SCREEN_BLANK),)
135 LOCAL_CFLAGS += -DTW_NO_SCREEN_BLANK
136endif
137ifneq ($(BOARD_USE_CUSTOM_RECOVERY_FONT),)
138 LOCAL_CFLAGS += -DBOARD_USE_CUSTOM_RECOVERY_FONT=$(BOARD_USE_CUSTOM_RECOVERY_FONT)
139endif
140
141LOCAL_CFLAGS += -DFASTMMI_FEATURE
142
143include $(BUILD_SHARED_LIBRARY)