blob: 4ee59d040cc65c3c40750878c4636c9be5ef152b [file] [log] [blame]
Dees_Troy51a0e822012-09-05 15:24:24 -04001LOCAL_PATH := $(call my-dir)
Dees_Troy2673cec2013-04-02 20:22:16 +00002
Dees_Troy51a0e822012-09-05 15:24:24 -04003include $(CLEAR_VARS)
4
Ethan Yonker4ee5ad72014-02-18 18:41:17 -06005LOCAL_SRC_FILES := events.c resources.c graphics_overlay.c
Dees_Troy86382ca2013-01-15 16:54:59 +00006
7ifneq ($(TW_BOARD_CUSTOM_GRAPHICS),)
8 LOCAL_SRC_FILES += $(TW_BOARD_CUSTOM_GRAPHICS)
9else
10 LOCAL_SRC_FILES += graphics.c
11endif
Dees_Troy51a0e822012-09-05 15:24:24 -040012
Ethan Yonker4ee5ad72014-02-18 18:41:17 -060013ifeq ($(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
19 LOCAL_C_INCLUDES += bootable/recovery/minuitwrp/include
20 endif
21else
22 LOCAL_C_INCLUDES += bootable/recovery/minuitwrp/include
23endif
24
Dees_Troy2673cec2013-04-02 20:22:16 +000025LOCAL_C_INCLUDES += \
26 external/libpng \
27 external/zlib \
Dees_Troy930bf012013-08-10 22:19:03 +000028 system/core/include \
29 external/jpeg
Dees_Troy51a0e822012-09-05 15:24:24 -040030
Dees_Troy51a0e822012-09-05 15:24:24 -040031ifeq ($(RECOVERY_TOUCHSCREEN_SWAP_XY), true)
32LOCAL_CFLAGS += -DRECOVERY_TOUCHSCREEN_SWAP_XY
33endif
34
35ifeq ($(RECOVERY_TOUCHSCREEN_FLIP_X), true)
36LOCAL_CFLAGS += -DRECOVERY_TOUCHSCREEN_FLIP_X
37endif
38
39ifeq ($(RECOVERY_TOUCHSCREEN_FLIP_Y), true)
40LOCAL_CFLAGS += -DRECOVERY_TOUCHSCREEN_FLIP_Y
41endif
42
43ifeq ($(RECOVERY_GRAPHICS_USE_LINELENGTH), true)
44LOCAL_CFLAGS += -DRECOVERY_GRAPHICS_USE_LINELENGTH
45endif
46
47#Remove the # from the line below to enable event logging
48#TWRP_EVENT_LOGGING := true
49ifeq ($(TWRP_EVENT_LOGGING), true)
50LOCAL_CFLAGS += -D_EVENT_LOGGING
51endif
52
Ethan Yonker4ee5ad72014-02-18 18:41:17 -060053ifeq ($(subst ",,$(TARGET_RECOVERY_PIXEL_FORMAT)),RGBX_8888)
54 LOCAL_CFLAGS += -DRECOVERY_RGBX
55endif
56ifeq ($(subst ",,$(TARGET_RECOVERY_PIXEL_FORMAT)),BGRA_8888)
57 LOCAL_CFLAGS += -DRECOVERY_BGRA
58endif
59ifeq ($(subst ",,$(TARGET_RECOVERY_PIXEL_FORMAT)),RGB_565)
60 LOCAL_CFLAGS += -DRECOVERY_RGB_565
61endif
62
Dees_Troy51a0e822012-09-05 15:24:24 -040063ifeq ($(TARGET_RECOVERY_PIXEL_FORMAT),"RGBX_8888")
64 LOCAL_CFLAGS += -DRECOVERY_RGBX
65endif
66ifeq ($(TARGET_RECOVERY_PIXEL_FORMAT),"BGRA_8888")
67 LOCAL_CFLAGS += -DRECOVERY_BGRA
68endif
69ifeq ($(TARGET_RECOVERY_PIXEL_FORMAT),"RGB_565")
70 LOCAL_CFLAGS += -DRECOVERY_RGB_565
71endif
72
73ifeq ($(BOARD_HAS_FLIPPED_SCREEN), true)
74LOCAL_CFLAGS += -DBOARD_HAS_FLIPPED_SCREEN
75endif
76
Ibrahim Awwal2e9cb012014-01-04 12:38:26 -080077ifeq ($(TW_IGNORE_MAJOR_AXIS_0), true)
78LOCAL_CFLAGS += -DTW_IGNORE_MAJOR_AXIS_0
79endif
80
Dees_Troy51a0e822012-09-05 15:24:24 -040081ifneq ($(BOARD_USE_CUSTOM_RECOVERY_FONT),)
82 LOCAL_CFLAGS += -DBOARD_USE_CUSTOM_RECOVERY_FONT=$(BOARD_USE_CUSTOM_RECOVERY_FONT)
83endif
Dees_Troy930bf012013-08-10 22:19:03 +000084LOCAL_SHARED_LIBRARIES += libz libc libcutils libjpeg
85LOCAL_STATIC_LIBRARIES += libpng libpixelflinger_static
Dees_Troy2673cec2013-04-02 20:22:16 +000086LOCAL_MODULE_TAGS := eng
Dees_Troy51a0e822012-09-05 15:24:24 -040087LOCAL_MODULE := libminuitwrp
88
Dees_Troy930bf012013-08-10 22:19:03 +000089include $(BUILD_SHARED_LIBRARY)