blob: ccf6d3c2aab4bb3481f6a3bf853f236850c7be9d [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
68
The Android Open Source Projectc24a8e62009-03-03 19:28:42 -080069include $(BUILD_STATIC_LIBRARY)
Dees Troy62b75ab2014-05-02 13:20:33 +000070
71include $(CLEAR_VARS)
72
Ethan Yonkera33161b2014-11-06 15:11:20 -060073LOCAL_SRC_FILES := graphics_overlay.c events.c resources.c
Dees Troy62b75ab2014-05-02 13:20:33 +000074ifneq ($(BOARD_CUSTOM_GRAPHICS),)
75 LOCAL_SRC_FILES += $(BOARD_CUSTOM_GRAPHICS)
76else
77 LOCAL_SRC_FILES += graphics.c
78endif
79
80ifeq ($(TW_TARGET_USES_QCOM_BSP), true)
81 LOCAL_CFLAGS += -DMSM_BSP
82 ifeq ($(TARGET_PREBUILT_KERNEL),)
83 LOCAL_ADDITIONAL_DEPENDENCIES := $(TARGET_OUT_INTERMEDIATES)/KERNEL_OBJ/usr
84 LOCAL_C_INCLUDES += $(TARGET_OUT_INTERMEDIATES)/KERNEL_OBJ/usr/include
85 else
Kra1o50024e382014-12-17 01:49:00 +010086 ifeq ($(TARGET_CUSTOM_KERNEL_HEADERS),)
87 LOCAL_C_INCLUDES += $(commands_recovery_local_path)/minui/include
88 else
89 LOCAL_C_INCLUDES += $(TARGET_CUSTOM_KERNEL_HEADERS)
90 endif
Dees Troy62b75ab2014-05-02 13:20:33 +000091 endif
92else
Matt Mower55c75ca2014-08-31 11:30:15 -050093 LOCAL_C_INCLUDES += $(commands_recovery_local_path)/minui/include
Dees Troy62b75ab2014-05-02 13:20:33 +000094endif
95
96LOCAL_C_INCLUDES +=\
97 external/libpng\
98 external/zlib
99
100LOCAL_MODULE := libminui
101
102LOCAL_ARM_MODE:= arm
103LOCAL_SHARED_LIBRARIES := libpng libpixelflinger
104# This used to compare against values in double-quotes (which are just
105# ordinary characters in this context). Strip double-quotes from the
106# value so that either will work.
107
108ifeq ($(subst ",,$(TARGET_RECOVERY_PIXEL_FORMAT)),RGBX_8888)
109 LOCAL_CFLAGS += -DRECOVERY_RGBX
110endif
111ifeq ($(subst ",,$(TARGET_RECOVERY_PIXEL_FORMAT)),BGRA_8888)
112 LOCAL_CFLAGS += -DRECOVERY_BGRA
113endif
114
115ifneq ($(TARGET_RECOVERY_OVERSCAN_PERCENT),)
116 LOCAL_CFLAGS += -DOVERSCAN_PERCENT=$(TARGET_RECOVERY_OVERSCAN_PERCENT)
117else
118 LOCAL_CFLAGS += -DOVERSCAN_PERCENT=0
119endif
120
121ifneq ($(TW_BRIGHTNESS_PATH),)
122 LOCAL_CFLAGS += -DTW_BRIGHTNESS_PATH=\"$(TW_BRIGHTNESS_PATH)\"
123endif
124ifneq ($(TW_MAX_BRIGHTNESS),)
125 LOCAL_CFLAGS += -DTW_MAX_BRIGHTNESS=$(TW_MAX_BRIGHTNESS)
126else
127 LOCAL_CFLAGS += -DTW_MAX_BRIGHTNESS=255
128endif
129ifneq ($(TW_NO_SCREEN_BLANK),)
130 LOCAL_CFLAGS += -DTW_NO_SCREEN_BLANK
131endif
132
133LOCAL_CFLAGS += -DFASTMMI_FEATURE
134
135include $(BUILD_SHARED_LIBRARY)