Dees_Troy | 51a0e82 | 2012-09-05 15:24:24 -0400 | [diff] [blame] | 1 | LOCAL_PATH := $(call my-dir) |
Dees_Troy | 2673cec | 2013-04-02 20:22:16 +0000 | [diff] [blame] | 2 | |
Dees_Troy | 51a0e82 | 2012-09-05 15:24:24 -0400 | [diff] [blame] | 3 | include $(CLEAR_VARS) |
| 4 | |
Ethan Yonker | 88037f4 | 2015-10-04 22:09:08 -0500 | [diff] [blame] | 5 | LOCAL_SRC_FILES := events.c resources.c graphics_overlay.c graphics_utils.c truetype.c |
Dees_Troy | 86382ca | 2013-01-15 16:54:59 +0000 | [diff] [blame] | 6 | |
| 7 | ifneq ($(TW_BOARD_CUSTOM_GRAPHICS),) |
| 8 | LOCAL_SRC_FILES += $(TW_BOARD_CUSTOM_GRAPHICS) |
| 9 | else |
| 10 | LOCAL_SRC_FILES += graphics.c |
| 11 | endif |
Dees_Troy | 51a0e82 | 2012-09-05 15:24:24 -0400 | [diff] [blame] | 12 | |
Ethan Yonker | 4ee5ad7 | 2014-02-18 18:41:17 -0600 | [diff] [blame] | 13 | ifeq ($(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 |
Kra1o5 | 0024e38 | 2014-12-17 01:49:00 +0100 | [diff] [blame] | 19 | 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 Yonker | 4ee5ad7 | 2014-02-18 18:41:17 -0600 | [diff] [blame] | 24 | endif |
| 25 | else |
Matt Mower | 55c75ca | 2014-08-31 11:30:15 -0500 | [diff] [blame] | 26 | LOCAL_C_INCLUDES += $(commands_recovery_local_path)/minuitwrp/include |
Ethan Yonker | 4ee5ad7 | 2014-02-18 18:41:17 -0600 | [diff] [blame] | 27 | endif |
| 28 | |
Kra1o5 | de50c5f | 2015-04-23 21:46:36 +0200 | [diff] [blame] | 29 | ifeq ($(TW_NEW_ION_HEAP), true) |
| 30 | LOCAL_CFLAGS += -DNEW_ION_HEAP |
| 31 | endif |
| 32 | |
Dees_Troy | 2673cec | 2013-04-02 20:22:16 +0000 | [diff] [blame] | 33 | LOCAL_C_INCLUDES += \ |
| 34 | external/libpng \ |
| 35 | external/zlib \ |
Dees_Troy | 930bf01 | 2013-08-10 22:19:03 +0000 | [diff] [blame] | 36 | system/core/include \ |
Ethan Yonker | 88037f4 | 2015-10-04 22:09:08 -0500 | [diff] [blame] | 37 | external/jpeg \ |
| 38 | external/freetype/include |
Dees_Troy | 51a0e82 | 2012-09-05 15:24:24 -0400 | [diff] [blame] | 39 | |
Dees_Troy | 51a0e82 | 2012-09-05 15:24:24 -0400 | [diff] [blame] | 40 | ifeq ($(RECOVERY_TOUCHSCREEN_SWAP_XY), true) |
| 41 | LOCAL_CFLAGS += -DRECOVERY_TOUCHSCREEN_SWAP_XY |
| 42 | endif |
| 43 | |
| 44 | ifeq ($(RECOVERY_TOUCHSCREEN_FLIP_X), true) |
| 45 | LOCAL_CFLAGS += -DRECOVERY_TOUCHSCREEN_FLIP_X |
| 46 | endif |
| 47 | |
| 48 | ifeq ($(RECOVERY_TOUCHSCREEN_FLIP_Y), true) |
| 49 | LOCAL_CFLAGS += -DRECOVERY_TOUCHSCREEN_FLIP_Y |
| 50 | endif |
| 51 | |
| 52 | ifeq ($(RECOVERY_GRAPHICS_USE_LINELENGTH), true) |
| 53 | LOCAL_CFLAGS += -DRECOVERY_GRAPHICS_USE_LINELENGTH |
| 54 | endif |
| 55 | |
Kra1o5 | c9556cc | 2015-06-24 12:19:09 +0200 | [diff] [blame] | 56 | ifeq ($(TW_DISABLE_DOUBLE_BUFFERING), true) |
| 57 | LOCAL_CFLAGS += -DTW_DISABLE_DOUBLE_BUFFERING |
| 58 | endif |
| 59 | |
Dees_Troy | 51a0e82 | 2012-09-05 15:24:24 -0400 | [diff] [blame] | 60 | #Remove the # from the line below to enable event logging |
| 61 | #TWRP_EVENT_LOGGING := true |
| 62 | ifeq ($(TWRP_EVENT_LOGGING), true) |
| 63 | LOCAL_CFLAGS += -D_EVENT_LOGGING |
| 64 | endif |
| 65 | |
Kra1o5 | 7756859 | 2015-10-14 18:09:54 +0200 | [diff] [blame] | 66 | ifeq ($(subst ",,$(TARGET_RECOVERY_PIXEL_FORMAT)),RGBA_8888) |
| 67 | LOCAL_CFLAGS += -DRECOVERY_RGBA |
| 68 | endif |
Ethan Yonker | 4ee5ad7 | 2014-02-18 18:41:17 -0600 | [diff] [blame] | 69 | ifeq ($(subst ",,$(TARGET_RECOVERY_PIXEL_FORMAT)),RGBX_8888) |
| 70 | LOCAL_CFLAGS += -DRECOVERY_RGBX |
| 71 | endif |
| 72 | ifeq ($(subst ",,$(TARGET_RECOVERY_PIXEL_FORMAT)),BGRA_8888) |
| 73 | LOCAL_CFLAGS += -DRECOVERY_BGRA |
| 74 | endif |
| 75 | ifeq ($(subst ",,$(TARGET_RECOVERY_PIXEL_FORMAT)),RGB_565) |
| 76 | LOCAL_CFLAGS += -DRECOVERY_RGB_565 |
| 77 | endif |
| 78 | |
Dees_Troy | 51a0e82 | 2012-09-05 15:24:24 -0400 | [diff] [blame] | 79 | ifeq ($(TARGET_RECOVERY_PIXEL_FORMAT),"RGBX_8888") |
| 80 | LOCAL_CFLAGS += -DRECOVERY_RGBX |
| 81 | endif |
| 82 | ifeq ($(TARGET_RECOVERY_PIXEL_FORMAT),"BGRA_8888") |
| 83 | LOCAL_CFLAGS += -DRECOVERY_BGRA |
| 84 | endif |
| 85 | ifeq ($(TARGET_RECOVERY_PIXEL_FORMAT),"RGB_565") |
| 86 | LOCAL_CFLAGS += -DRECOVERY_RGB_565 |
| 87 | endif |
xNUTx | cd56f8c | 2014-07-23 01:30:20 +0200 | [diff] [blame] | 88 | ifeq ($(TW_SCREEN_BLANK_ON_BOOT), true) |
| 89 | LOCAL_CFLAGS += -DTW_SCREEN_BLANK_ON_BOOT |
| 90 | endif |
Dees_Troy | 51a0e82 | 2012-09-05 15:24:24 -0400 | [diff] [blame] | 91 | |
| 92 | ifeq ($(BOARD_HAS_FLIPPED_SCREEN), true) |
| 93 | LOCAL_CFLAGS += -DBOARD_HAS_FLIPPED_SCREEN |
| 94 | endif |
| 95 | |
Ibrahim Awwal | 2e9cb01 | 2014-01-04 12:38:26 -0800 | [diff] [blame] | 96 | ifeq ($(TW_IGNORE_MAJOR_AXIS_0), true) |
| 97 | LOCAL_CFLAGS += -DTW_IGNORE_MAJOR_AXIS_0 |
| 98 | endif |
| 99 | |
Ethan Yonker | 32f68a3 | 2014-12-29 08:13:23 -0600 | [diff] [blame] | 100 | ifeq ($(TW_IGNORE_MT_POSITION_0), true) |
| 101 | LOCAL_CFLAGS += -DTW_IGNORE_MT_POSITION_0 |
| 102 | endif |
| 103 | |
Ethan Yonker | d6821a1 | 2015-08-26 15:29:23 -0500 | [diff] [blame] | 104 | ifeq ($(TW_IGNORE_ABS_MT_TRACKING_ID), true) |
| 105 | LOCAL_CFLAGS += -DTW_IGNORE_ABS_MT_TRACKING_ID |
| 106 | endif |
| 107 | |
Ethan Yonker | 5742a40 | 2014-08-12 14:52:49 -0500 | [diff] [blame] | 108 | ifneq ($(TW_INPUT_BLACKLIST),) |
| 109 | LOCAL_CFLAGS += -DTW_INPUT_BLACKLIST=$(TW_INPUT_BLACKLIST) |
| 110 | endif |
| 111 | |
Flemmard | f467461 | 2014-01-10 09:14:44 +0100 | [diff] [blame] | 112 | ifneq ($(TW_WHITELIST_INPUT),) |
| 113 | LOCAL_CFLAGS += -DWHITELIST_INPUT=$(TW_WHITELIST_INPUT) |
| 114 | endif |
| 115 | |
Vojtech Bocek | 76ee903 | 2014-09-07 15:01:56 +0200 | [diff] [blame] | 116 | ifeq ($(TW_DISABLE_TTF), true) |
Ethan Yonker | 88037f4 | 2015-10-04 22:09:08 -0500 | [diff] [blame] | 117 | $(warning ****************************************************************************) |
| 118 | $(warning * TW_DISABLE_TTF support has been deprecated in TWRP. *) |
| 119 | $(warning ****************************************************************************) |
| 120 | $(error stopping) |
Vojtech Bocek | 76ee903 | 2014-09-07 15:01:56 +0200 | [diff] [blame] | 121 | endif |
| 122 | |
Dees Troy | 3454ade | 2015-01-20 19:21:04 +0000 | [diff] [blame] | 123 | LOCAL_CFLAGS += -DTWRES=\"$(TWRES_PATH)\" |
Ethan Yonker | 88037f4 | 2015-10-04 22:09:08 -0500 | [diff] [blame] | 124 | LOCAL_SHARED_LIBRARIES += libft2 libz libc libcutils libjpeg libpng |
Ethan Yonker | c798c9c | 2015-10-09 11:15:26 -0500 | [diff] [blame] | 125 | LOCAL_STATIC_LIBRARIES += libpixelflinger_twrp |
Dees_Troy | 2673cec | 2013-04-02 20:22:16 +0000 | [diff] [blame] | 126 | LOCAL_MODULE_TAGS := eng |
Dees_Troy | 51a0e82 | 2012-09-05 15:24:24 -0400 | [diff] [blame] | 127 | LOCAL_MODULE := libminuitwrp |
| 128 | |
Dees_Troy | 930bf01 | 2013-08-10 22:19:03 +0000 | [diff] [blame] | 129 | include $(BUILD_SHARED_LIBRARY) |