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 | |
Dees Troy | f171e10 | 2014-11-06 22:19:58 +0100 | [diff] [blame] | 5 | LOCAL_SRC_FILES := events.c resources.c graphics_overlay.c graphics_utils.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 \ |
| 37 | external/jpeg |
Dees_Troy | 51a0e82 | 2012-09-05 15:24:24 -0400 | [diff] [blame] | 38 | |
Dees_Troy | 51a0e82 | 2012-09-05 15:24:24 -0400 | [diff] [blame] | 39 | ifeq ($(RECOVERY_TOUCHSCREEN_SWAP_XY), true) |
| 40 | LOCAL_CFLAGS += -DRECOVERY_TOUCHSCREEN_SWAP_XY |
| 41 | endif |
| 42 | |
| 43 | ifeq ($(RECOVERY_TOUCHSCREEN_FLIP_X), true) |
| 44 | LOCAL_CFLAGS += -DRECOVERY_TOUCHSCREEN_FLIP_X |
| 45 | endif |
| 46 | |
| 47 | ifeq ($(RECOVERY_TOUCHSCREEN_FLIP_Y), true) |
| 48 | LOCAL_CFLAGS += -DRECOVERY_TOUCHSCREEN_FLIP_Y |
| 49 | endif |
| 50 | |
| 51 | ifeq ($(RECOVERY_GRAPHICS_USE_LINELENGTH), true) |
| 52 | LOCAL_CFLAGS += -DRECOVERY_GRAPHICS_USE_LINELENGTH |
| 53 | endif |
| 54 | |
| 55 | #Remove the # from the line below to enable event logging |
| 56 | #TWRP_EVENT_LOGGING := true |
| 57 | ifeq ($(TWRP_EVENT_LOGGING), true) |
| 58 | LOCAL_CFLAGS += -D_EVENT_LOGGING |
| 59 | endif |
| 60 | |
Ethan Yonker | 4ee5ad7 | 2014-02-18 18:41:17 -0600 | [diff] [blame] | 61 | ifeq ($(subst ",,$(TARGET_RECOVERY_PIXEL_FORMAT)),RGBX_8888) |
| 62 | LOCAL_CFLAGS += -DRECOVERY_RGBX |
| 63 | endif |
| 64 | ifeq ($(subst ",,$(TARGET_RECOVERY_PIXEL_FORMAT)),BGRA_8888) |
| 65 | LOCAL_CFLAGS += -DRECOVERY_BGRA |
| 66 | endif |
| 67 | ifeq ($(subst ",,$(TARGET_RECOVERY_PIXEL_FORMAT)),RGB_565) |
| 68 | LOCAL_CFLAGS += -DRECOVERY_RGB_565 |
| 69 | endif |
| 70 | |
Dees_Troy | 51a0e82 | 2012-09-05 15:24:24 -0400 | [diff] [blame] | 71 | ifeq ($(TARGET_RECOVERY_PIXEL_FORMAT),"RGBX_8888") |
| 72 | LOCAL_CFLAGS += -DRECOVERY_RGBX |
| 73 | endif |
| 74 | ifeq ($(TARGET_RECOVERY_PIXEL_FORMAT),"BGRA_8888") |
| 75 | LOCAL_CFLAGS += -DRECOVERY_BGRA |
| 76 | endif |
| 77 | ifeq ($(TARGET_RECOVERY_PIXEL_FORMAT),"RGB_565") |
| 78 | LOCAL_CFLAGS += -DRECOVERY_RGB_565 |
| 79 | endif |
xNUTx | cd56f8c | 2014-07-23 01:30:20 +0200 | [diff] [blame] | 80 | ifeq ($(TW_SCREEN_BLANK_ON_BOOT), true) |
| 81 | LOCAL_CFLAGS += -DTW_SCREEN_BLANK_ON_BOOT |
| 82 | endif |
Dees_Troy | 51a0e82 | 2012-09-05 15:24:24 -0400 | [diff] [blame] | 83 | |
| 84 | ifeq ($(BOARD_HAS_FLIPPED_SCREEN), true) |
| 85 | LOCAL_CFLAGS += -DBOARD_HAS_FLIPPED_SCREEN |
| 86 | endif |
| 87 | |
Ibrahim Awwal | 2e9cb01 | 2014-01-04 12:38:26 -0800 | [diff] [blame] | 88 | ifeq ($(TW_IGNORE_MAJOR_AXIS_0), true) |
| 89 | LOCAL_CFLAGS += -DTW_IGNORE_MAJOR_AXIS_0 |
| 90 | endif |
| 91 | |
Ethan Yonker | 32f68a3 | 2014-12-29 08:13:23 -0600 | [diff] [blame] | 92 | ifeq ($(TW_IGNORE_MT_POSITION_0), true) |
| 93 | LOCAL_CFLAGS += -DTW_IGNORE_MT_POSITION_0 |
| 94 | endif |
| 95 | |
Ethan Yonker | 5742a40 | 2014-08-12 14:52:49 -0500 | [diff] [blame] | 96 | ifneq ($(TW_INPUT_BLACKLIST),) |
| 97 | LOCAL_CFLAGS += -DTW_INPUT_BLACKLIST=$(TW_INPUT_BLACKLIST) |
| 98 | endif |
| 99 | |
Dees_Troy | 51a0e82 | 2012-09-05 15:24:24 -0400 | [diff] [blame] | 100 | ifneq ($(BOARD_USE_CUSTOM_RECOVERY_FONT),) |
| 101 | LOCAL_CFLAGS += -DBOARD_USE_CUSTOM_RECOVERY_FONT=$(BOARD_USE_CUSTOM_RECOVERY_FONT) |
Ethan Yonker | b24caab | 2014-08-07 09:28:04 -0500 | [diff] [blame] | 102 | else |
Ethan Yonker | 591b920 | 2015-03-11 11:17:15 -0500 | [diff] [blame] | 103 | ifeq ($(TW_THEME),) |
| 104 | # This converts the old DEVICE_RESOLUTION flag to the new TW_THEME flag |
| 105 | PORTRAIT_MDPI := 320x480 480x800 480x854 540x960 |
| 106 | PORTRAIT_HDPI := 720x1280 800x1280 1080x1920 1200x1920 1440x2560 1600x2560 |
| 107 | WATCH_MDPI := 240x240 280x280 320x320 |
| 108 | LANDSCAPE_MDPI := 800x480 1024x600 1024x768 |
| 109 | LANDSCAPE_HDPI := 1280x800 1920x1200 2560x1600 |
| 110 | ifneq ($(filter $(DEVICE_RESOLUTION), $(PORTRAIT_MDPI)),) |
| 111 | TW_THEME := portrait_mdpi |
| 112 | else ifneq ($(filter $(DEVICE_RESOLUTION), $(PORTRAIT_HDPI)),) |
| 113 | TW_THEME := portrait_hdpi |
| 114 | else ifneq ($(filter $(DEVICE_RESOLUTION), $(WATCH_MDPI)),) |
| 115 | TW_THEME := watch_mdpi |
| 116 | else ifneq ($(filter $(DEVICE_RESOLUTION), $(LANDSCAPE_MDPI)),) |
| 117 | TW_THEME := landscape_mdpi |
| 118 | else ifneq ($(filter $(DEVICE_RESOLUTION), $(LANDSCAPE_HDPI)),) |
| 119 | TW_THEME := landscape_hdpi |
| 120 | endif |
| 121 | endif |
| 122 | ifeq ($(TW_THEME), portrait_mdpi) |
| 123 | LOCAL_CFLAGS += -DBOARD_USE_CUSTOM_RECOVERY_FONT=\"roboto_10x18.h\" |
| 124 | else ifeq ($(TW_THEME), portrait_hdpi) |
| 125 | LOCAL_CFLAGS += -DBOARD_USE_CUSTOM_RECOVERY_FONT=\"roboto_15x24.h\" |
| 126 | else ifeq ($(TW_THEME), watch_mdpi) |
| 127 | LOCAL_CFLAGS += -DBOARD_USE_CUSTOM_RECOVERY_FONT=\"font_7x16.h\" |
| 128 | else ifeq ($(TW_THEME), landscape_mdpi) |
| 129 | LOCAL_CFLAGS += -DBOARD_USE_CUSTOM_RECOVERY_FONT=\"roboto_10x18.h\" |
| 130 | else ifeq ($(TW_THEME), landscape_hdpi) |
| 131 | LOCAL_CFLAGS += -DBOARD_USE_CUSTOM_RECOVERY_FONT=\"roboto_15x24.h\" |
| 132 | endif |
Dees_Troy | 51a0e82 | 2012-09-05 15:24:24 -0400 | [diff] [blame] | 133 | endif |
Flemmard | f467461 | 2014-01-10 09:14:44 +0100 | [diff] [blame] | 134 | |
| 135 | ifneq ($(TW_WHITELIST_INPUT),) |
| 136 | LOCAL_CFLAGS += -DWHITELIST_INPUT=$(TW_WHITELIST_INPUT) |
| 137 | endif |
| 138 | |
Vojtech Bocek | 76ee903 | 2014-09-07 15:01:56 +0200 | [diff] [blame] | 139 | ifeq ($(TW_DISABLE_TTF), true) |
| 140 | LOCAL_CFLAGS += -DTW_DISABLE_TTF |
| 141 | else |
| 142 | LOCAL_SHARED_LIBRARIES += libft2 |
| 143 | LOCAL_C_INCLUDES += external/freetype/include |
| 144 | LOCAL_SRC_FILES += truetype.c |
| 145 | endif |
| 146 | |
Dees Troy | 3454ade | 2015-01-20 19:21:04 +0000 | [diff] [blame] | 147 | LOCAL_CFLAGS += -DTWRES=\"$(TWRES_PATH)\" |
Vojtech Bocek | 76ee903 | 2014-09-07 15:01:56 +0200 | [diff] [blame] | 148 | LOCAL_SHARED_LIBRARIES += libz libc libcutils libjpeg libpng |
| 149 | LOCAL_STATIC_LIBRARIES += libpixelflinger_static |
Dees_Troy | 2673cec | 2013-04-02 20:22:16 +0000 | [diff] [blame] | 150 | LOCAL_MODULE_TAGS := eng |
Dees_Troy | 51a0e82 | 2012-09-05 15:24:24 -0400 | [diff] [blame] | 151 | LOCAL_MODULE := libminuitwrp |
| 152 | |
Dees_Troy | 930bf01 | 2013-08-10 22:19:03 +0000 | [diff] [blame] | 153 | include $(BUILD_SHARED_LIBRARY) |