blob: 7d8e3a7f33fbdb210613a0650402d7c058b5719b [file] [log] [blame]
The Android Open Source Projectc24a8e62009-03-03 19:28:42 -08001LOCAL_PATH := $(call my-dir)
2include $(CLEAR_VARS)
3
Ethan Yonkera33161b2014-11-06 15:11:20 -06004LOCAL_SRC_FILES := graphics_overlay.c events.c resources.c
Koushik Duttaaac48542011-11-16 16:47:53 -08005ifneq ($(BOARD_CUSTOM_GRAPHICS),)
6 LOCAL_SRC_FILES += $(BOARD_CUSTOM_GRAPHICS)
7else
8 LOCAL_SRC_FILES += graphics.c
9endif
The Android Open Source Projectc24a8e62009-03-03 19:28:42 -080010
11LOCAL_C_INCLUDES +=\
Ethan Yonker304f32f2014-11-07 10:14:05 -060012 external/libpng \
13 external/zlib \
14 system/core/include/pixelflinger
Dees Troy62b75ab2014-05-02 13:20:33 +000015
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
Kra1o50024e382014-12-17 01:49:00 +010022 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
Dees Troy62b75ab2014-05-02 13:20:33 +000027 endif
28else
Matt Mower55c75ca2014-08-31 11:30:15 -050029 LOCAL_C_INCLUDES += $(commands_recovery_local_path)/minui/include
Dees Troy62b75ab2014-05-02 13:20:33 +000030endif
31
Kra1o5de50c5f2015-04-23 21:46:36 +020032ifeq ($(TW_NEW_ION_HEAP), true)
33 LOCAL_CFLAGS += -DNEW_ION_HEAP
34endif
35
Dees_Troy51a0e822012-09-05 15:24:24 -040036LOCAL_STATIC_LIBRARY := libpng
Ethan Yonker304f32f2014-11-07 10:14:05 -060037LOCAL_WHOLE_STATIC_LIBRARIES := libpixelflinger_static
The Android Open Source Projectc24a8e62009-03-03 19:28:42 -080038LOCAL_MODULE := libminui
39
Doug Zongker9c5efe62012-07-11 13:21:02 -070040# 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
44ifeq ($(subst ",,$(TARGET_RECOVERY_PIXEL_FORMAT)),RGBX_8888)
Michael Ward9d1bcdf2011-06-22 14:30:34 -070045 LOCAL_CFLAGS += -DRECOVERY_RGBX
46endif
Doug Zongker9c5efe62012-07-11 13:21:02 -070047ifeq ($(subst ",,$(TARGET_RECOVERY_PIXEL_FORMAT)),BGRA_8888)
Michael Ward9d1bcdf2011-06-22 14:30:34 -070048 LOCAL_CFLAGS += -DRECOVERY_BGRA
Doug Zongkerbe3e6f12011-01-13 16:43:44 -080049endif
50
Doug Zongkerc560a672012-12-18 16:31:27 -080051ifneq ($(TARGET_RECOVERY_OVERSCAN_PERCENT),)
52 LOCAL_CFLAGS += -DOVERSCAN_PERCENT=$(TARGET_RECOVERY_OVERSCAN_PERCENT)
53else
54 LOCAL_CFLAGS += -DOVERSCAN_PERCENT=0
55endif
56
Matt Mower4a5db2d2014-01-20 16:14:25 -060057ifneq ($(TW_BRIGHTNESS_PATH),)
58 LOCAL_CFLAGS += -DTW_BRIGHTNESS_PATH=\"$(TW_BRIGHTNESS_PATH)\"
59endif
60ifneq ($(TW_MAX_BRIGHTNESS),)
61 LOCAL_CFLAGS += -DTW_MAX_BRIGHTNESS=$(TW_MAX_BRIGHTNESS)
62else
63 LOCAL_CFLAGS += -DTW_MAX_BRIGHTNESS=255
64endif
65ifneq ($(TW_NO_SCREEN_BLANK),)
66 LOCAL_CFLAGS += -DTW_NO_SCREEN_BLANK
Ethan Chen0940e412013-10-22 13:48:50 -070067endif
maxwen44d59ea2015-07-14 00:41:14 +020068ifneq ($(BOARD_USE_CUSTOM_RECOVERY_FONT),)
69 LOCAL_CFLAGS += -DBOARD_USE_CUSTOM_RECOVERY_FONT=$(BOARD_USE_CUSTOM_RECOVERY_FONT)
70endif
The Android Open Source Projectc24a8e62009-03-03 19:28:42 -080071include $(BUILD_STATIC_LIBRARY)
Dees Troy62b75ab2014-05-02 13:20:33 +000072
73include $(CLEAR_VARS)
74
Ethan Yonkera33161b2014-11-06 15:11:20 -060075LOCAL_SRC_FILES := graphics_overlay.c events.c resources.c
Dees Troy62b75ab2014-05-02 13:20:33 +000076ifneq ($(BOARD_CUSTOM_GRAPHICS),)
77 LOCAL_SRC_FILES += $(BOARD_CUSTOM_GRAPHICS)
78else
79 LOCAL_SRC_FILES += graphics.c
80endif
81
82ifeq ($(TW_TARGET_USES_QCOM_BSP), true)
83 LOCAL_CFLAGS += -DMSM_BSP
84 ifeq ($(TARGET_PREBUILT_KERNEL),)
85 LOCAL_ADDITIONAL_DEPENDENCIES := $(TARGET_OUT_INTERMEDIATES)/KERNEL_OBJ/usr
86 LOCAL_C_INCLUDES += $(TARGET_OUT_INTERMEDIATES)/KERNEL_OBJ/usr/include
87 else
Kra1o50024e382014-12-17 01:49:00 +010088 ifeq ($(TARGET_CUSTOM_KERNEL_HEADERS),)
89 LOCAL_C_INCLUDES += $(commands_recovery_local_path)/minui/include
90 else
91 LOCAL_C_INCLUDES += $(TARGET_CUSTOM_KERNEL_HEADERS)
92 endif
Dees Troy62b75ab2014-05-02 13:20:33 +000093 endif
94else
Matt Mower55c75ca2014-08-31 11:30:15 -050095 LOCAL_C_INCLUDES += $(commands_recovery_local_path)/minui/include
Dees Troy62b75ab2014-05-02 13:20:33 +000096endif
97
98LOCAL_C_INCLUDES +=\
99 external/libpng\
100 external/zlib
101
102LOCAL_MODULE := libminui
103
104LOCAL_ARM_MODE:= arm
105LOCAL_SHARED_LIBRARIES := libpng libpixelflinger
106# This used to compare against values in double-quotes (which are just
107# ordinary characters in this context). Strip double-quotes from the
108# value so that either will work.
109
110ifeq ($(subst ",,$(TARGET_RECOVERY_PIXEL_FORMAT)),RGBX_8888)
111 LOCAL_CFLAGS += -DRECOVERY_RGBX
112endif
113ifeq ($(subst ",,$(TARGET_RECOVERY_PIXEL_FORMAT)),BGRA_8888)
114 LOCAL_CFLAGS += -DRECOVERY_BGRA
115endif
116
117ifneq ($(TARGET_RECOVERY_OVERSCAN_PERCENT),)
118 LOCAL_CFLAGS += -DOVERSCAN_PERCENT=$(TARGET_RECOVERY_OVERSCAN_PERCENT)
119else
120 LOCAL_CFLAGS += -DOVERSCAN_PERCENT=0
121endif
122
123ifneq ($(TW_BRIGHTNESS_PATH),)
124 LOCAL_CFLAGS += -DTW_BRIGHTNESS_PATH=\"$(TW_BRIGHTNESS_PATH)\"
125endif
126ifneq ($(TW_MAX_BRIGHTNESS),)
127 LOCAL_CFLAGS += -DTW_MAX_BRIGHTNESS=$(TW_MAX_BRIGHTNESS)
128else
129 LOCAL_CFLAGS += -DTW_MAX_BRIGHTNESS=255
130endif
131ifneq ($(TW_NO_SCREEN_BLANK),)
132 LOCAL_CFLAGS += -DTW_NO_SCREEN_BLANK
133endif
maxwen44d59ea2015-07-14 00:41:14 +0200134ifneq ($(BOARD_USE_CUSTOM_RECOVERY_FONT),)
135 LOCAL_CFLAGS += -DBOARD_USE_CUSTOM_RECOVERY_FONT=$(BOARD_USE_CUSTOM_RECOVERY_FONT)
136endif
Dees Troy62b75ab2014-05-02 13:20:33 +0000137
138LOCAL_CFLAGS += -DFASTMMI_FEATURE
139
140include $(BUILD_SHARED_LIBRARY)