blob: 01225c32e8d70c349c7e33681d4be6cd38d13620 [file] [log] [blame]
Dees_Troy51a0e822012-09-05 15:24:24 -04001LOCAL_PATH := $(call my-dir)
Dees_Troy2673cec2013-04-02 20:22:16 +00002
Dees_Troy51a0e822012-09-05 15:24:24 -04003include $(CLEAR_VARS)
4
Ethan Yonker88037f42015-10-04 22:09:08 -05005LOCAL_SRC_FILES := events.c resources.c graphics_overlay.c graphics_utils.c truetype.c
Dees_Troy86382ca2013-01-15 16:54:59 +00006
7ifneq ($(TW_BOARD_CUSTOM_GRAPHICS),)
8 LOCAL_SRC_FILES += $(TW_BOARD_CUSTOM_GRAPHICS)
9else
10 LOCAL_SRC_FILES += graphics.c
11endif
Dees_Troy51a0e822012-09-05 15:24:24 -040012
Ethan Yonker4ee5ad72014-02-18 18:41:17 -060013ifeq ($(TW_TARGET_USES_QCOM_BSP), true)
14 LOCAL_CFLAGS += -DMSM_BSP
15 ifeq ($(TARGET_PREBUILT_KERNEL),)
16 LOCAL_ADDITIONAL_DEPENDENCIES := $(TARGET_OUT_INTERMEDIATES)/KERNEL_OBJ/usr
17 LOCAL_C_INCLUDES += $(TARGET_OUT_INTERMEDIATES)/KERNEL_OBJ/usr/include
18 else
Kra1o50024e382014-12-17 01:49:00 +010019 ifeq ($(TARGET_CUSTOM_KERNEL_HEADERS),)
20 LOCAL_C_INCLUDES += $(commands_recovery_local_path)/minuitwrp/include
21 else
22 LOCAL_C_INCLUDES += $(TARGET_CUSTOM_KERNEL_HEADERS)
23 endif
Ethan Yonker4ee5ad72014-02-18 18:41:17 -060024 endif
25else
Matt Mower55c75ca2014-08-31 11:30:15 -050026 LOCAL_C_INCLUDES += $(commands_recovery_local_path)/minuitwrp/include
Ethan Yonker4ee5ad72014-02-18 18:41:17 -060027endif
28
Kra1o5de50c5f2015-04-23 21:46:36 +020029ifeq ($(TW_NEW_ION_HEAP), true)
30 LOCAL_CFLAGS += -DNEW_ION_HEAP
31endif
32
Dees_Troy2673cec2013-04-02 20:22:16 +000033LOCAL_C_INCLUDES += \
34 external/libpng \
35 external/zlib \
Dees_Troy930bf012013-08-10 22:19:03 +000036 system/core/include \
Ethan Yonker88037f42015-10-04 22:09:08 -050037 external/jpeg \
38 external/freetype/include
Dees_Troy51a0e822012-09-05 15:24:24 -040039
Dees_Troy51a0e822012-09-05 15:24:24 -040040ifeq ($(RECOVERY_TOUCHSCREEN_SWAP_XY), true)
41LOCAL_CFLAGS += -DRECOVERY_TOUCHSCREEN_SWAP_XY
42endif
43
44ifeq ($(RECOVERY_TOUCHSCREEN_FLIP_X), true)
45LOCAL_CFLAGS += -DRECOVERY_TOUCHSCREEN_FLIP_X
46endif
47
48ifeq ($(RECOVERY_TOUCHSCREEN_FLIP_Y), true)
49LOCAL_CFLAGS += -DRECOVERY_TOUCHSCREEN_FLIP_Y
50endif
51
52ifeq ($(RECOVERY_GRAPHICS_USE_LINELENGTH), true)
53LOCAL_CFLAGS += -DRECOVERY_GRAPHICS_USE_LINELENGTH
54endif
55
Kra1o5c9556cc2015-06-24 12:19:09 +020056ifeq ($(TW_DISABLE_DOUBLE_BUFFERING), true)
57LOCAL_CFLAGS += -DTW_DISABLE_DOUBLE_BUFFERING
58endif
59
Dees_Troy51a0e822012-09-05 15:24:24 -040060#Remove the # from the line below to enable event logging
61#TWRP_EVENT_LOGGING := true
62ifeq ($(TWRP_EVENT_LOGGING), true)
63LOCAL_CFLAGS += -D_EVENT_LOGGING
64endif
65
Kra1o577568592015-10-14 18:09:54 +020066ifeq ($(subst ",,$(TARGET_RECOVERY_PIXEL_FORMAT)),RGBA_8888)
67 LOCAL_CFLAGS += -DRECOVERY_RGBA
68endif
Ethan Yonker4ee5ad72014-02-18 18:41:17 -060069ifeq ($(subst ",,$(TARGET_RECOVERY_PIXEL_FORMAT)),RGBX_8888)
70 LOCAL_CFLAGS += -DRECOVERY_RGBX
71endif
72ifeq ($(subst ",,$(TARGET_RECOVERY_PIXEL_FORMAT)),BGRA_8888)
73 LOCAL_CFLAGS += -DRECOVERY_BGRA
74endif
75ifeq ($(subst ",,$(TARGET_RECOVERY_PIXEL_FORMAT)),RGB_565)
76 LOCAL_CFLAGS += -DRECOVERY_RGB_565
77endif
78
Dees_Troy51a0e822012-09-05 15:24:24 -040079ifeq ($(TARGET_RECOVERY_PIXEL_FORMAT),"RGBX_8888")
80 LOCAL_CFLAGS += -DRECOVERY_RGBX
81endif
82ifeq ($(TARGET_RECOVERY_PIXEL_FORMAT),"BGRA_8888")
83 LOCAL_CFLAGS += -DRECOVERY_BGRA
84endif
85ifeq ($(TARGET_RECOVERY_PIXEL_FORMAT),"RGB_565")
86 LOCAL_CFLAGS += -DRECOVERY_RGB_565
87endif
xNUTxcd56f8c2014-07-23 01:30:20 +020088ifeq ($(TW_SCREEN_BLANK_ON_BOOT), true)
89 LOCAL_CFLAGS += -DTW_SCREEN_BLANK_ON_BOOT
90endif
Dees_Troy51a0e822012-09-05 15:24:24 -040091
92ifeq ($(BOARD_HAS_FLIPPED_SCREEN), true)
93LOCAL_CFLAGS += -DBOARD_HAS_FLIPPED_SCREEN
94endif
95
Ibrahim Awwal2e9cb012014-01-04 12:38:26 -080096ifeq ($(TW_IGNORE_MAJOR_AXIS_0), true)
97LOCAL_CFLAGS += -DTW_IGNORE_MAJOR_AXIS_0
98endif
99
Ethan Yonker32f68a32014-12-29 08:13:23 -0600100ifeq ($(TW_IGNORE_MT_POSITION_0), true)
101LOCAL_CFLAGS += -DTW_IGNORE_MT_POSITION_0
102endif
103
Ethan Yonkerd6821a12015-08-26 15:29:23 -0500104ifeq ($(TW_IGNORE_ABS_MT_TRACKING_ID), true)
105LOCAL_CFLAGS += -DTW_IGNORE_ABS_MT_TRACKING_ID
106endif
107
Ethan Yonker5742a402014-08-12 14:52:49 -0500108ifneq ($(TW_INPUT_BLACKLIST),)
109 LOCAL_CFLAGS += -DTW_INPUT_BLACKLIST=$(TW_INPUT_BLACKLIST)
110endif
111
Flemmardf4674612014-01-10 09:14:44 +0100112ifneq ($(TW_WHITELIST_INPUT),)
113 LOCAL_CFLAGS += -DWHITELIST_INPUT=$(TW_WHITELIST_INPUT)
114endif
115
Vojtech Bocek76ee9032014-09-07 15:01:56 +0200116ifeq ($(TW_DISABLE_TTF), true)
Ethan Yonker88037f42015-10-04 22:09:08 -0500117 $(warning ****************************************************************************)
118 $(warning * TW_DISABLE_TTF support has been deprecated in TWRP. *)
119 $(warning ****************************************************************************)
120 $(error stopping)
Vojtech Bocek76ee9032014-09-07 15:01:56 +0200121endif
122
Dees Troy3454ade2015-01-20 19:21:04 +0000123LOCAL_CFLAGS += -DTWRES=\"$(TWRES_PATH)\"
Ethan Yonker2c80efa2015-11-07 07:57:36 -0600124LOCAL_SHARED_LIBRARIES += libft2 libz libc libcutils libjpeg libpng libutils
Ethan Yonkerc798c9c2015-10-09 11:15:26 -0500125LOCAL_STATIC_LIBRARIES += libpixelflinger_twrp
Dees_Troy2673cec2013-04-02 20:22:16 +0000126LOCAL_MODULE_TAGS := eng
Dees_Troy51a0e822012-09-05 15:24:24 -0400127LOCAL_MODULE := libminuitwrp
128
Dees_Troy930bf012013-08-10 22:19:03 +0000129include $(BUILD_SHARED_LIBRARY)