blob: 9e11e5e2d0bf789b44da67cc186fc60e46820522 [file] [log] [blame]
Dees_Troy51a0e822012-09-05 15:24:24 -04001LOCAL_PATH := $(call my-dir)
2include $(CLEAR_VARS)
3
4LOCAL_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 \
18 conditional.cpp \
19 slider.cpp \
20 listbox.cpp \
21 keyboard.cpp \
bigbiff bigbiff8a68c312013-02-10 14:28:30 -050022 input.cpp \
23 blanktimer.cpp \
24 ../minuitwrp/graphics.c
Dees_Troy51a0e822012-09-05 15:24:24 -040025
26ifneq ($(TWRP_CUSTOM_KEYBOARD),)
27 LOCAL_SRC_FILES += $(TWRP_CUSTOM_KEYBOARD)
28else
29 LOCAL_SRC_FILES += hardwarekeyboard.cpp
30endif
31
32LOCAL_MODULE := libgui
33
34# Use this flag to create a build that simulates threaded actions like installing zips, backups, restores, and wipes for theme testing
35#TWRP_SIMULATE_ACTIONS := true
36ifeq ($(TWRP_SIMULATE_ACTIONS), true)
37LOCAL_CFLAGS += -D_SIMULATE_ACTIONS
38endif
39
40#TWRP_EVENT_LOGGING := true
41ifeq ($(TWRP_EVENT_LOGGING), true)
42LOCAL_CFLAGS += -D_EVENT_LOGGING
43endif
44
45ifneq ($(RECOVERY_SDCARD_ON_DATA),)
46 LOCAL_CFLAGS += -DRECOVERY_SDCARD_ON_DATA
47endif
Dees_Troye2920fa2012-09-19 16:18:00 -040048ifneq ($(TW_EXTERNAL_STORAGE_PATH),)
49 LOCAL_CFLAGS += -DTW_EXTERNAL_STORAGE_PATH=$(TW_EXTERNAL_STORAGE_PATH)
50endif
bigbiff bigbiff8a68c312013-02-10 14:28:30 -050051ifneq ($(TW_BRIGHTNESS_PATH),)
52 LOCAL_CFLAGS += -DTW_BRIGHTNESS_PATH=$(TW_BRIGHTNESS_PATH)
53endif
Dees_Troy51a0e822012-09-05 15:24:24 -040054
55LOCAL_C_INCLUDES += bionic external/stlport/stlport $(commands_recovery_local_path)/gui/devices/$(DEVICE_RESOLUTION)
56
57include $(BUILD_STATIC_LIBRARY)
58
59# Transfer in the resources for the device
60include $(CLEAR_VARS)
61LOCAL_MODULE := twrp
62LOCAL_MODULE_TAGS := eng
63LOCAL_MODULE_CLASS := RECOVERY_EXECUTABLES
64LOCAL_MODULE_PATH := $(TARGET_RECOVERY_ROOT_OUT)/res
65
66TWRP_RES_LOC := $(commands_recovery_local_path)/gui/devices
67TWRP_RES_GEN := $(intermediates)/twrp
68
69$(TWRP_RES_GEN):
70 mkdir -p $(TARGET_RECOVERY_ROOT_OUT)/res/
71 cp -fr $(TWRP_RES_LOC)/common/res/* $(TARGET_RECOVERY_ROOT_OUT)/res/
72 cp -fr $(TWRP_RES_LOC)/$(DEVICE_RESOLUTION)/res/* $(TARGET_RECOVERY_ROOT_OUT)/res/
73 mkdir -p $(TARGET_RECOVERY_ROOT_OUT)/sbin/
Dees_Troy3bbb95b2012-09-28 17:15:22 -040074 ln -sf /sbin/busybox $(TARGET_RECOVERY_ROOT_OUT)/sbin/sh
Dees_Troy22ad2cc2012-09-27 15:00:27 -040075 ln -sf /sbin/pigz $(TARGET_RECOVERY_ROOT_OUT)/sbin/gzip
76 ln -sf /sbin/unpigz $(TARGET_RECOVERY_ROOT_OUT)/sbin/gunzip
Dees_Troy51a0e822012-09-05 15:24:24 -040077
78LOCAL_GENERATED_SOURCES := $(TWRP_RES_GEN)
79LOCAL_SRC_FILES := twrp $(TWRP_RES_GEN)
Dees_Troy7d15c252012-09-05 20:47:21 -040080include $(BUILD_PREBUILT)