Dees_Troy | 51a0e82 | 2012-09-05 15:24:24 -0400 | [diff] [blame] | 1 | LOCAL_PATH := $(call my-dir) |
| 2 | include $(CLEAR_VARS) |
| 3 | |
Motorhead1991 | c7f2e12 | 2014-06-12 15:57:36 -0700 | [diff] [blame] | 4 | LOCAL_CFLAGS := -fno-strict-aliasing |
| 5 | |
Dees_Troy | 51a0e82 | 2012-09-05 15:24:24 -0400 | [diff] [blame] | 6 | LOCAL_SRC_FILES := \ |
| 7 | gui.cpp \ |
| 8 | resources.cpp \ |
| 9 | pages.cpp \ |
| 10 | text.cpp \ |
| 11 | image.cpp \ |
| 12 | action.cpp \ |
| 13 | console.cpp \ |
| 14 | fill.cpp \ |
| 15 | button.cpp \ |
| 16 | checkbox.cpp \ |
| 17 | fileselector.cpp \ |
| 18 | progressbar.cpp \ |
| 19 | animation.cpp \ |
Vojtech Bocek | ede51c5 | 2014-02-07 23:58:09 +0100 | [diff] [blame] | 20 | object.cpp \ |
Dees_Troy | 51a0e82 | 2012-09-05 15:24:24 -0400 | [diff] [blame] | 21 | slider.cpp \ |
Vojtech Bocek | 8593234 | 2013-04-01 22:11:33 +0200 | [diff] [blame] | 22 | slidervalue.cpp \ |
Dees_Troy | 51a0e82 | 2012-09-05 15:24:24 -0400 | [diff] [blame] | 23 | listbox.cpp \ |
| 24 | keyboard.cpp \ |
bigbiff bigbiff | 8a68c31 | 2013-02-10 14:28:30 -0500 | [diff] [blame] | 25 | input.cpp \ |
| 26 | blanktimer.cpp \ |
Vojtech Bocek | 1fc30fc | 2014-01-29 18:37:19 +0100 | [diff] [blame] | 27 | partitionlist.cpp \ |
Ethan Yonker | 0a3a98f | 2015-02-05 00:48:28 +0100 | [diff] [blame] | 28 | mousecursor.cpp \ |
| 29 | scrolllist.cpp |
Dees_Troy | 51a0e82 | 2012-09-05 15:24:24 -0400 | [diff] [blame] | 30 | |
| 31 | ifneq ($(TWRP_CUSTOM_KEYBOARD),) |
| 32 | LOCAL_SRC_FILES += $(TWRP_CUSTOM_KEYBOARD) |
| 33 | else |
| 34 | LOCAL_SRC_FILES += hardwarekeyboard.cpp |
| 35 | endif |
| 36 | |
Ethan Yonker | 4b94cfd | 2014-12-11 10:00:45 -0600 | [diff] [blame] | 37 | LOCAL_SHARED_LIBRARIES += libminuitwrp libc libstdc++ libminzip libaosprecovery |
Dees_Troy | 2673cec | 2013-04-02 20:22:16 +0000 | [diff] [blame] | 38 | LOCAL_MODULE := libguitwrp |
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 | #TWRP_EVENT_LOGGING := true |
| 41 | ifeq ($(TWRP_EVENT_LOGGING), true) |
| 42 | LOCAL_CFLAGS += -D_EVENT_LOGGING |
| 43 | endif |
| 44 | |
bigbiff bigbiff | 8794036 | 2013-03-09 09:58:50 -0500 | [diff] [blame] | 45 | ifneq ($(TW_NO_SCREEN_BLANK),) |
| 46 | LOCAL_CFLAGS += -DTW_NO_SCREEN_BLANK |
| 47 | endif |
Ricardo Gomez | c9ecd44 | 2013-07-05 16:13:52 -0700 | [diff] [blame] | 48 | ifneq ($(TW_NO_SCREEN_TIMEOUT),) |
| 49 | LOCAL_CFLAGS += -DTW_NO_SCREEN_TIMEOUT |
| 50 | endif |
Dees Troy | b7ae098 | 2013-09-10 20:47:35 +0000 | [diff] [blame] | 51 | ifeq ($(HAVE_SELINUX), true) |
| 52 | LOCAL_CFLAGS += -DHAVE_SELINUX |
| 53 | endif |
bigbiff bigbiff | c7eee6f | 2014-09-02 18:59:01 -0400 | [diff] [blame] | 54 | ifeq ($(TW_OEM_BUILD), true) |
Ethan Yonker | 83e8257 | 2014-04-04 10:59:28 -0500 | [diff] [blame] | 55 | LOCAL_CFLAGS += -DTW_OEM_BUILD |
| 56 | endif |
Vojtech Bocek | 76ee903 | 2014-09-07 15:01:56 +0200 | [diff] [blame] | 57 | ifeq ($(TW_DISABLE_TTF), true) |
| 58 | LOCAL_CFLAGS += -DTW_DISABLE_TTF |
| 59 | endif |
Ethan Yonker | 751a85e | 2014-12-12 16:59:10 -0600 | [diff] [blame] | 60 | ifneq ($(TW_X_OFFSET),) |
| 61 | LOCAL_CFLAGS += -DTW_X_OFFSET=$(TW_X_OFFSET) |
| 62 | endif |
| 63 | ifneq ($(TW_Y_OFFSET),) |
| 64 | LOCAL_CFLAGS += -DTW_Y_OFFSET=$(TW_Y_OFFSET) |
| 65 | endif |
Ethan Yonker | 63e414f | 2015-02-06 15:44:39 -0600 | [diff] [blame] | 66 | ifeq ($(TW_ROUND_SCREEN), true) |
| 67 | LOCAL_CFLAGS += -DTW_ROUND_SCREEN |
| 68 | endif |
Dees_Troy | 51a0e82 | 2012-09-05 15:24:24 -0400 | [diff] [blame] | 69 | |
bigbiff bigbiff | 163d474 | 2013-11-16 13:25:27 -0500 | [diff] [blame] | 70 | ifeq ($(DEVICE_RESOLUTION),) |
that | c1f5c0f | 2014-12-25 19:57:36 +0100 | [diff] [blame] | 71 | $(warning ********************************************************************************) |
| 72 | $(warning * DEVICE_RESOLUTION is NOT SET in BoardConfig.mk ) |
| 73 | $(warning * Please see http://tinyw.in/50tg for details. ) |
| 74 | $(warning ********************************************************************************) |
| 75 | $(error stopping) |
bigbiff bigbiff | 705f16e | 2013-11-16 09:59:44 -0500 | [diff] [blame] | 76 | endif |
| 77 | |
HandyMenny | 466dc97 | 2014-10-19 20:08:03 +0200 | [diff] [blame] | 78 | ifeq ($(TW_CUSTOM_THEME),) |
that | c1f5c0f | 2014-12-25 19:57:36 +0100 | [diff] [blame] | 79 | ifeq "$(wildcard $(commands_recovery_local_path)/gui/devices/$(DEVICE_RESOLUTION))" "" |
| 80 | $(warning ********************************************************************************) |
| 81 | $(warning * DEVICE_RESOLUTION ($(DEVICE_RESOLUTION)) does NOT EXIST in $(commands_recovery_local_path)/gui/devices ) |
| 82 | $(warning * Please choose an existing theme or create a new one for your device. ) |
| 83 | $(warning ********************************************************************************) |
| 84 | $(error stopping) |
| 85 | endif |
bigbiff bigbiff | 163d474 | 2013-11-16 13:25:27 -0500 | [diff] [blame] | 86 | endif |
| 87 | |
Dees_Troy | 51a0e82 | 2012-09-05 15:24:24 -0400 | [diff] [blame] | 88 | LOCAL_C_INCLUDES += bionic external/stlport/stlport $(commands_recovery_local_path)/gui/devices/$(DEVICE_RESOLUTION) |
Dees Troy | 3454ade | 2015-01-20 19:21:04 +0000 | [diff] [blame] | 89 | LOCAL_CFLAGS += -DTWRES=\"$(TWRES_PATH)\" |
Dees_Troy | 51a0e82 | 2012-09-05 15:24:24 -0400 | [diff] [blame] | 90 | |
| 91 | include $(BUILD_STATIC_LIBRARY) |
| 92 | |
| 93 | # Transfer in the resources for the device |
| 94 | include $(CLEAR_VARS) |
| 95 | LOCAL_MODULE := twrp |
| 96 | LOCAL_MODULE_TAGS := eng |
| 97 | LOCAL_MODULE_CLASS := RECOVERY_EXECUTABLES |
Dees Troy | 3454ade | 2015-01-20 19:21:04 +0000 | [diff] [blame] | 98 | LOCAL_MODULE_PATH := $(TARGET_RECOVERY_ROOT_OUT)$(TWRES_PATH) |
Ethan Yonker | 1ecaca7 | 2014-04-14 09:27:15 -0500 | [diff] [blame] | 99 | TWRP_RES_LOC := $(commands_recovery_local_path)/gui/devices/common/res |
Ethan Yonker | 780cd39 | 2014-07-21 15:24:39 -0500 | [diff] [blame] | 100 | TWRP_COMMON_XML := $(hide) echo "No common TWRP XML resources" |
Dees_Troy | 51a0e82 | 2012-09-05 15:24:24 -0400 | [diff] [blame] | 101 | |
Ethan Yonker | 1ecaca7 | 2014-04-14 09:27:15 -0500 | [diff] [blame] | 102 | ifeq ($(TW_CUSTOM_THEME),) |
big biff | ba535e3 | 2014-07-29 00:44:47 +0000 | [diff] [blame] | 103 | PORTRAIT := 320x480 480x800 480x854 540x960 720x1280 800x1280 1080x1920 1200x1920 1440x2560 1600x2560 |
| 104 | LANDSCAPE := 800x480 1024x600 1024x768 1280x800 1920x1200 2560x1600 |
Ethan Yonker | d9b7200 | 2014-07-30 08:46:28 -0500 | [diff] [blame] | 105 | WATCH := 240x240 280x280 320x320 |
Ethan Yonker | 1ecaca7 | 2014-04-14 09:27:15 -0500 | [diff] [blame] | 106 | TWRP_THEME_LOC := $(commands_recovery_local_path)/gui/devices/$(DEVICE_RESOLUTION)/res |
big biff | ba535e3 | 2014-07-29 00:44:47 +0000 | [diff] [blame] | 107 | ifneq ($(filter $(DEVICE_RESOLUTION), $(PORTRAIT)),) |
Dees Troy | 3454ade | 2015-01-20 19:21:04 +0000 | [diff] [blame] | 108 | TWRP_COMMON_XML := cp -fr $(commands_recovery_local_path)/gui/devices/portrait/res/* $(TARGET_RECOVERY_ROOT_OUT)$(TWRES_PATH) |
big biff | ba535e3 | 2014-07-29 00:44:47 +0000 | [diff] [blame] | 109 | else ifneq ($(filter $(DEVICE_RESOLUTION), $(LANDSCAPE)),) |
Dees Troy | 3454ade | 2015-01-20 19:21:04 +0000 | [diff] [blame] | 110 | TWRP_COMMON_XML := cp -fr $(commands_recovery_local_path)/gui/devices/landscape/res/* $(TARGET_RECOVERY_ROOT_OUT)$(TWRES_PATH) |
Ethan Yonker | d9b7200 | 2014-07-30 08:46:28 -0500 | [diff] [blame] | 111 | else ifneq ($(filter $(DEVICE_RESOLUTION), $(WATCH)),) |
Dees Troy | 3454ade | 2015-01-20 19:21:04 +0000 | [diff] [blame] | 112 | TWRP_COMMON_XML := cp -fr $(commands_recovery_local_path)/gui/devices/watch/res/* $(TARGET_RECOVERY_ROOT_OUT)$(TWRES_PATH) |
Ethan Yonker | 780cd39 | 2014-07-21 15:24:39 -0500 | [diff] [blame] | 113 | endif |
Ethan Yonker | 1ecaca7 | 2014-04-14 09:27:15 -0500 | [diff] [blame] | 114 | else |
| 115 | TWRP_THEME_LOC := $(TW_CUSTOM_THEME) |
| 116 | endif |
Vojtech Bocek | 76ee903 | 2014-09-07 15:01:56 +0200 | [diff] [blame] | 117 | |
| 118 | ifeq ($(TW_DISABLE_TTF), true) |
Dees Troy | 3454ade | 2015-01-20 19:21:04 +0000 | [diff] [blame] | 119 | TWRP_REMOVE_FONT := rm -f $(TARGET_RECOVERY_ROOT_OUT)$(TWRES_PATH)fonts/*.ttf |
Vojtech Bocek | 76ee903 | 2014-09-07 15:01:56 +0200 | [diff] [blame] | 120 | else |
Dees Troy | 3454ade | 2015-01-20 19:21:04 +0000 | [diff] [blame] | 121 | TWRP_REMOVE_FONT := rm -f $(TARGET_RECOVERY_ROOT_OUT)$(TWRES_PATH)fonts/*.dat |
Vojtech Bocek | 76ee903 | 2014-09-07 15:01:56 +0200 | [diff] [blame] | 122 | endif |
| 123 | |
Dees_Troy | 51a0e82 | 2012-09-05 15:24:24 -0400 | [diff] [blame] | 124 | TWRP_RES_GEN := $(intermediates)/twrp |
Ethan Yonker | 5c93369 | 2014-04-04 11:26:32 -0500 | [diff] [blame] | 125 | ifneq ($(TW_USE_TOOLBOX), true) |
Ethan Yonker | 0c9d049 | 2014-04-14 09:10:05 -0500 | [diff] [blame] | 126 | TWRP_SH_TARGET := /sbin/busybox |
Ethan Yonker | 5c93369 | 2014-04-04 11:26:32 -0500 | [diff] [blame] | 127 | else |
Ethan Yonker | 0c9d049 | 2014-04-14 09:10:05 -0500 | [diff] [blame] | 128 | TWRP_SH_TARGET := /sbin/mksh |
| 129 | endif |
| 130 | |
Ethan Yonker | 5c93369 | 2014-04-04 11:26:32 -0500 | [diff] [blame] | 131 | $(TWRP_RES_GEN): |
Dees Troy | 3454ade | 2015-01-20 19:21:04 +0000 | [diff] [blame] | 132 | mkdir -p $(TARGET_RECOVERY_ROOT_OUT)$(TWRES_PATH) |
| 133 | cp -fr $(TWRP_RES_LOC)/* $(TARGET_RECOVERY_ROOT_OUT)$(TWRES_PATH) |
| 134 | cp -fr $(TWRP_THEME_LOC)/* $(TARGET_RECOVERY_ROOT_OUT)$(TWRES_PATH) |
Ethan Yonker | 780cd39 | 2014-07-21 15:24:39 -0500 | [diff] [blame] | 135 | $(TWRP_COMMON_XML) |
Vojtech Bocek | 76ee903 | 2014-09-07 15:01:56 +0200 | [diff] [blame] | 136 | $(TWRP_REMOVE_FONT) |
Ethan Yonker | 5c93369 | 2014-04-04 11:26:32 -0500 | [diff] [blame] | 137 | mkdir -p $(TARGET_RECOVERY_ROOT_OUT)/sbin/ |
Ethan Yonker | bcc502c | 2014-11-10 11:22:10 -0600 | [diff] [blame] | 138 | ifneq ($(TW_USE_TOOLBOX), true) |
Ethan Yonker | 0c9d049 | 2014-04-14 09:10:05 -0500 | [diff] [blame] | 139 | ln -sf $(TWRP_SH_TARGET) $(TARGET_RECOVERY_ROOT_OUT)/sbin/sh |
Ethan Yonker | bcc502c | 2014-11-10 11:22:10 -0600 | [diff] [blame] | 140 | endif |
Ethan Yonker | 5c93369 | 2014-04-04 11:26:32 -0500 | [diff] [blame] | 141 | ln -sf /sbin/pigz $(TARGET_RECOVERY_ROOT_OUT)/sbin/gzip |
| 142 | ln -sf /sbin/unpigz $(TARGET_RECOVERY_ROOT_OUT)/sbin/gunzip |
Ethan Yonker | 0c9d049 | 2014-04-14 09:10:05 -0500 | [diff] [blame] | 143 | |
Dees_Troy | 51a0e82 | 2012-09-05 15:24:24 -0400 | [diff] [blame] | 144 | |
| 145 | LOCAL_GENERATED_SOURCES := $(TWRP_RES_GEN) |
| 146 | LOCAL_SRC_FILES := twrp $(TWRP_RES_GEN) |
Dees_Troy | 7d15c25 | 2012-09-05 20:47:21 -0400 | [diff] [blame] | 147 | include $(BUILD_PREBUILT) |