Dees_Troy | 51a0e82 | 2012-09-05 15:24:24 -0400 | [diff] [blame] | 1 | LOCAL_PATH := $(call my-dir) |
| 2 | include $(CLEAR_VARS) |
| 3 | |
| 4 | LOCAL_SRC_FILES := \ |
| 5 | gui.cpp \ |
| 6 | resources.cpp \ |
| 7 | pages.cpp \ |
| 8 | text.cpp \ |
| 9 | image.cpp \ |
| 10 | action.cpp \ |
| 11 | console.cpp \ |
| 12 | fill.cpp \ |
| 13 | button.cpp \ |
| 14 | checkbox.cpp \ |
| 15 | fileselector.cpp \ |
| 16 | progressbar.cpp \ |
| 17 | animation.cpp \ |
Vojtech Bocek | ede51c5 | 2014-02-07 23:58:09 +0100 | [diff] [blame] | 18 | object.cpp \ |
Dees_Troy | 51a0e82 | 2012-09-05 15:24:24 -0400 | [diff] [blame] | 19 | slider.cpp \ |
Vojtech Bocek | 8593234 | 2013-04-01 22:11:33 +0200 | [diff] [blame] | 20 | slidervalue.cpp \ |
Dees_Troy | 51a0e82 | 2012-09-05 15:24:24 -0400 | [diff] [blame] | 21 | listbox.cpp \ |
| 22 | keyboard.cpp \ |
bigbiff bigbiff | 8a68c31 | 2013-02-10 14:28:30 -0500 | [diff] [blame] | 23 | input.cpp \ |
| 24 | blanktimer.cpp \ |
Vojtech Bocek | 1fc30fc | 2014-01-29 18:37:19 +0100 | [diff] [blame] | 25 | partitionlist.cpp \ |
| 26 | mousecursor.cpp |
Dees_Troy | 51a0e82 | 2012-09-05 15:24:24 -0400 | [diff] [blame] | 27 | |
| 28 | ifneq ($(TWRP_CUSTOM_KEYBOARD),) |
| 29 | LOCAL_SRC_FILES += $(TWRP_CUSTOM_KEYBOARD) |
| 30 | else |
| 31 | LOCAL_SRC_FILES += hardwarekeyboard.cpp |
| 32 | endif |
| 33 | |
Dees_Troy | 94e2a46 | 2013-08-22 12:25:14 +0000 | [diff] [blame] | 34 | LOCAL_SHARED_LIBRARIES += libminuitwrp libc libstdc++ |
Dees_Troy | 2673cec | 2013-04-02 20:22:16 +0000 | [diff] [blame] | 35 | LOCAL_MODULE := libguitwrp |
Dees_Troy | 51a0e82 | 2012-09-05 15:24:24 -0400 | [diff] [blame] | 36 | |
| 37 | # Use this flag to create a build that simulates threaded actions like installing zips, backups, restores, and wipes for theme testing |
| 38 | #TWRP_SIMULATE_ACTIONS := true |
| 39 | ifeq ($(TWRP_SIMULATE_ACTIONS), true) |
| 40 | LOCAL_CFLAGS += -D_SIMULATE_ACTIONS |
| 41 | endif |
| 42 | |
| 43 | #TWRP_EVENT_LOGGING := true |
| 44 | ifeq ($(TWRP_EVENT_LOGGING), true) |
| 45 | LOCAL_CFLAGS += -D_EVENT_LOGGING |
| 46 | endif |
| 47 | |
| 48 | ifneq ($(RECOVERY_SDCARD_ON_DATA),) |
| 49 | LOCAL_CFLAGS += -DRECOVERY_SDCARD_ON_DATA |
| 50 | endif |
Dees_Troy | e2920fa | 2012-09-19 16:18:00 -0400 | [diff] [blame] | 51 | ifneq ($(TW_EXTERNAL_STORAGE_PATH),) |
| 52 | LOCAL_CFLAGS += -DTW_EXTERNAL_STORAGE_PATH=$(TW_EXTERNAL_STORAGE_PATH) |
| 53 | endif |
bigbiff bigbiff | 8794036 | 2013-03-09 09:58:50 -0500 | [diff] [blame] | 54 | ifneq ($(TW_NO_SCREEN_BLANK),) |
| 55 | LOCAL_CFLAGS += -DTW_NO_SCREEN_BLANK |
| 56 | endif |
Ricardo Gomez | c9ecd44 | 2013-07-05 16:13:52 -0700 | [diff] [blame] | 57 | ifneq ($(TW_NO_SCREEN_TIMEOUT),) |
| 58 | LOCAL_CFLAGS += -DTW_NO_SCREEN_TIMEOUT |
| 59 | endif |
Dees Troy | b7ae098 | 2013-09-10 20:47:35 +0000 | [diff] [blame] | 60 | ifeq ($(HAVE_SELINUX), true) |
| 61 | LOCAL_CFLAGS += -DHAVE_SELINUX |
| 62 | endif |
Ethan Yonker | 83e8257 | 2014-04-04 10:59:28 -0500 | [diff] [blame] | 63 | ifeq ($(TW_OEM_BUILD),true) |
| 64 | LOCAL_CFLAGS += -DTW_OEM_BUILD |
| 65 | endif |
Dees_Troy | 51a0e82 | 2012-09-05 15:24:24 -0400 | [diff] [blame] | 66 | |
bigbiff bigbiff | 163d474 | 2013-11-16 13:25:27 -0500 | [diff] [blame] | 67 | ifeq ($(DEVICE_RESOLUTION),) |
bigbiff bigbiff | 705f16e | 2013-11-16 09:59:44 -0500 | [diff] [blame] | 68 | $(warning ********************************************************************************) |
| 69 | $(warning * DEVICE_RESOLUTION is NOT SET in BoardConfig.mk ) |
| 70 | $(warning * Please see http://tinyw.in/nP7d for details ) |
| 71 | $(warning ********************************************************************************) |
| 72 | $(error stopping) |
| 73 | endif |
| 74 | |
bigbiff bigbiff | 163d474 | 2013-11-16 13:25:27 -0500 | [diff] [blame] | 75 | ifeq "$(wildcard bootable/recovery/gui/devices/$(DEVICE_RESOLUTION))" "" |
| 76 | $(warning ********************************************************************************) |
| 77 | $(warning * DEVICE_RESOLUTION ($(DEVICE_RESOLUTION)) does NOT EXIST in bootable/recovery/gui/devices ) |
| 78 | $(warning * Please choose an existing theme or create a new one for your device ) |
| 79 | $(warning ********************************************************************************) |
| 80 | $(error stopping) |
| 81 | endif |
| 82 | |
Dees_Troy | 51a0e82 | 2012-09-05 15:24:24 -0400 | [diff] [blame] | 83 | LOCAL_C_INCLUDES += bionic external/stlport/stlport $(commands_recovery_local_path)/gui/devices/$(DEVICE_RESOLUTION) |
| 84 | |
| 85 | include $(BUILD_STATIC_LIBRARY) |
| 86 | |
| 87 | # Transfer in the resources for the device |
| 88 | include $(CLEAR_VARS) |
| 89 | LOCAL_MODULE := twrp |
| 90 | LOCAL_MODULE_TAGS := eng |
| 91 | LOCAL_MODULE_CLASS := RECOVERY_EXECUTABLES |
| 92 | LOCAL_MODULE_PATH := $(TARGET_RECOVERY_ROOT_OUT)/res |
Ethan Yonker | 1ecaca7 | 2014-04-14 09:27:15 -0500 | [diff] [blame] | 93 | TWRP_RES_LOC := $(commands_recovery_local_path)/gui/devices/common/res |
Dees_Troy | 51a0e82 | 2012-09-05 15:24:24 -0400 | [diff] [blame] | 94 | |
Ethan Yonker | 1ecaca7 | 2014-04-14 09:27:15 -0500 | [diff] [blame] | 95 | ifeq ($(TW_CUSTOM_THEME),) |
| 96 | TWRP_THEME_LOC := $(commands_recovery_local_path)/gui/devices/$(DEVICE_RESOLUTION)/res |
| 97 | else |
| 98 | TWRP_THEME_LOC := $(TW_CUSTOM_THEME) |
| 99 | endif |
Dees_Troy | 51a0e82 | 2012-09-05 15:24:24 -0400 | [diff] [blame] | 100 | TWRP_RES_GEN := $(intermediates)/twrp |
Ethan Yonker | 5c93369 | 2014-04-04 11:26:32 -0500 | [diff] [blame] | 101 | ifneq ($(TW_USE_TOOLBOX), true) |
Ethan Yonker | 0c9d049 | 2014-04-14 09:10:05 -0500 | [diff] [blame] | 102 | TWRP_SH_TARGET := /sbin/busybox |
Ethan Yonker | 5c93369 | 2014-04-04 11:26:32 -0500 | [diff] [blame] | 103 | else |
Ethan Yonker | 0c9d049 | 2014-04-14 09:10:05 -0500 | [diff] [blame] | 104 | TWRP_SH_TARGET := /sbin/mksh |
| 105 | endif |
| 106 | |
Ethan Yonker | 5c93369 | 2014-04-04 11:26:32 -0500 | [diff] [blame] | 107 | $(TWRP_RES_GEN): |
| 108 | mkdir -p $(TARGET_RECOVERY_ROOT_OUT)/res/ |
Ethan Yonker | 1ecaca7 | 2014-04-14 09:27:15 -0500 | [diff] [blame] | 109 | cp -fr $(TWRP_RES_LOC)/* $(TARGET_RECOVERY_ROOT_OUT)/res/ |
| 110 | cp -fr $(TWRP_THEME_LOC)/* $(TARGET_RECOVERY_ROOT_OUT)/res/ |
Ethan Yonker | 5c93369 | 2014-04-04 11:26:32 -0500 | [diff] [blame] | 111 | mkdir -p $(TARGET_RECOVERY_ROOT_OUT)/sbin/ |
Ethan Yonker | 0c9d049 | 2014-04-14 09:10:05 -0500 | [diff] [blame] | 112 | ln -sf $(TWRP_SH_TARGET) $(TARGET_RECOVERY_ROOT_OUT)/sbin/sh |
Ethan Yonker | 5c93369 | 2014-04-04 11:26:32 -0500 | [diff] [blame] | 113 | ln -sf /sbin/pigz $(TARGET_RECOVERY_ROOT_OUT)/sbin/gzip |
| 114 | ln -sf /sbin/unpigz $(TARGET_RECOVERY_ROOT_OUT)/sbin/gunzip |
Ethan Yonker | 0c9d049 | 2014-04-14 09:10:05 -0500 | [diff] [blame] | 115 | |
Dees_Troy | 51a0e82 | 2012-09-05 15:24:24 -0400 | [diff] [blame] | 116 | |
| 117 | LOCAL_GENERATED_SOURCES := $(TWRP_RES_GEN) |
| 118 | LOCAL_SRC_FILES := twrp $(TWRP_RES_GEN) |
Dees_Troy | 7d15c25 | 2012-09-05 20:47:21 -0400 | [diff] [blame] | 119 | include $(BUILD_PREBUILT) |