blob: 5e42d2fa97b24bf681485026d3967cc1d222a176 [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
Dees_Troy51a0e822012-09-05 15:24:24 -040032LOCAL_STATIC_LIBRARY := libpng
Ethan Yonker304f32f2014-11-07 10:14:05 -060033LOCAL_WHOLE_STATIC_LIBRARIES := libpixelflinger_static
The Android Open Source Projectc24a8e62009-03-03 19:28:42 -080034LOCAL_MODULE := libminui
35
Doug Zongker9c5efe62012-07-11 13:21:02 -070036# This used to compare against values in double-quotes (which are just
37# ordinary characters in this context). Strip double-quotes from the
38# value so that either will work.
39
40ifeq ($(subst ",,$(TARGET_RECOVERY_PIXEL_FORMAT)),RGBX_8888)
Michael Ward9d1bcdf2011-06-22 14:30:34 -070041 LOCAL_CFLAGS += -DRECOVERY_RGBX
42endif
Doug Zongker9c5efe62012-07-11 13:21:02 -070043ifeq ($(subst ",,$(TARGET_RECOVERY_PIXEL_FORMAT)),BGRA_8888)
Michael Ward9d1bcdf2011-06-22 14:30:34 -070044 LOCAL_CFLAGS += -DRECOVERY_BGRA
Doug Zongkerbe3e6f12011-01-13 16:43:44 -080045endif
46
Doug Zongkerc560a672012-12-18 16:31:27 -080047ifneq ($(TARGET_RECOVERY_OVERSCAN_PERCENT),)
48 LOCAL_CFLAGS += -DOVERSCAN_PERCENT=$(TARGET_RECOVERY_OVERSCAN_PERCENT)
49else
50 LOCAL_CFLAGS += -DOVERSCAN_PERCENT=0
51endif
52
Matt Mower4a5db2d2014-01-20 16:14:25 -060053ifneq ($(TW_BRIGHTNESS_PATH),)
54 LOCAL_CFLAGS += -DTW_BRIGHTNESS_PATH=\"$(TW_BRIGHTNESS_PATH)\"
55endif
56ifneq ($(TW_MAX_BRIGHTNESS),)
57 LOCAL_CFLAGS += -DTW_MAX_BRIGHTNESS=$(TW_MAX_BRIGHTNESS)
58else
59 LOCAL_CFLAGS += -DTW_MAX_BRIGHTNESS=255
60endif
61ifneq ($(TW_NO_SCREEN_BLANK),)
62 LOCAL_CFLAGS += -DTW_NO_SCREEN_BLANK
Ethan Chen0940e412013-10-22 13:48:50 -070063endif
64
The Android Open Source Projectc24a8e62009-03-03 19:28:42 -080065include $(BUILD_STATIC_LIBRARY)
Dees Troy62b75ab2014-05-02 13:20:33 +000066
67include $(CLEAR_VARS)
68
Ethan Yonkera33161b2014-11-06 15:11:20 -060069LOCAL_SRC_FILES := graphics_overlay.c events.c resources.c
Dees Troy62b75ab2014-05-02 13:20:33 +000070ifneq ($(BOARD_CUSTOM_GRAPHICS),)
71 LOCAL_SRC_FILES += $(BOARD_CUSTOM_GRAPHICS)
72else
73 LOCAL_SRC_FILES += graphics.c
74endif
75
76ifeq ($(TW_TARGET_USES_QCOM_BSP), true)
77 LOCAL_CFLAGS += -DMSM_BSP
78 ifeq ($(TARGET_PREBUILT_KERNEL),)
79 LOCAL_ADDITIONAL_DEPENDENCIES := $(TARGET_OUT_INTERMEDIATES)/KERNEL_OBJ/usr
80 LOCAL_C_INCLUDES += $(TARGET_OUT_INTERMEDIATES)/KERNEL_OBJ/usr/include
81 else
Kra1o50024e382014-12-17 01:49:00 +010082 ifeq ($(TARGET_CUSTOM_KERNEL_HEADERS),)
83 LOCAL_C_INCLUDES += $(commands_recovery_local_path)/minui/include
84 else
85 LOCAL_C_INCLUDES += $(TARGET_CUSTOM_KERNEL_HEADERS)
86 endif
Dees Troy62b75ab2014-05-02 13:20:33 +000087 endif
88else
Matt Mower55c75ca2014-08-31 11:30:15 -050089 LOCAL_C_INCLUDES += $(commands_recovery_local_path)/minui/include
Dees Troy62b75ab2014-05-02 13:20:33 +000090endif
91
92LOCAL_C_INCLUDES +=\
93 external/libpng\
94 external/zlib
95
96LOCAL_MODULE := libminui
97
98LOCAL_ARM_MODE:= arm
99LOCAL_SHARED_LIBRARIES := libpng libpixelflinger
100# This used to compare against values in double-quotes (which are just
101# ordinary characters in this context). Strip double-quotes from the
102# value so that either will work.
103
104ifeq ($(subst ",,$(TARGET_RECOVERY_PIXEL_FORMAT)),RGBX_8888)
105 LOCAL_CFLAGS += -DRECOVERY_RGBX
106endif
107ifeq ($(subst ",,$(TARGET_RECOVERY_PIXEL_FORMAT)),BGRA_8888)
108 LOCAL_CFLAGS += -DRECOVERY_BGRA
109endif
110
111ifneq ($(TARGET_RECOVERY_OVERSCAN_PERCENT),)
112 LOCAL_CFLAGS += -DOVERSCAN_PERCENT=$(TARGET_RECOVERY_OVERSCAN_PERCENT)
113else
114 LOCAL_CFLAGS += -DOVERSCAN_PERCENT=0
115endif
116
117ifneq ($(TW_BRIGHTNESS_PATH),)
118 LOCAL_CFLAGS += -DTW_BRIGHTNESS_PATH=\"$(TW_BRIGHTNESS_PATH)\"
119endif
120ifneq ($(TW_MAX_BRIGHTNESS),)
121 LOCAL_CFLAGS += -DTW_MAX_BRIGHTNESS=$(TW_MAX_BRIGHTNESS)
122else
123 LOCAL_CFLAGS += -DTW_MAX_BRIGHTNESS=255
124endif
125ifneq ($(TW_NO_SCREEN_BLANK),)
126 LOCAL_CFLAGS += -DTW_NO_SCREEN_BLANK
127endif
128
129LOCAL_CFLAGS += -DFASTMMI_FEATURE
130
131include $(BUILD_SHARED_LIBRARY)