blob: cff532167b283d6575c12a3f7fcad4e1bdcab50a [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
Dees Troyf171e102014-11-06 22:19:58 +01005LOCAL_SRC_FILES := events.c resources.c graphics_overlay.c graphics_utils.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
Kra1o50024e382014-12-17 01:49:00 +010019 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 Yonker4ee5ad72014-02-18 18:41:17 -060024 endif
25else
Matt Mower55c75ca2014-08-31 11:30:15 -050026 LOCAL_C_INCLUDES += $(commands_recovery_local_path)/minuitwrp/include
Ethan Yonker4ee5ad72014-02-18 18:41:17 -060027endif
28
Dees_Troy2673cec2013-04-02 20:22:16 +000029LOCAL_C_INCLUDES += \
30 external/libpng \
31 external/zlib \
Dees_Troy930bf012013-08-10 22:19:03 +000032 system/core/include \
33 external/jpeg
Dees_Troy51a0e822012-09-05 15:24:24 -040034
Dees_Troy51a0e822012-09-05 15:24:24 -040035ifeq ($(RECOVERY_TOUCHSCREEN_SWAP_XY), true)
36LOCAL_CFLAGS += -DRECOVERY_TOUCHSCREEN_SWAP_XY
37endif
38
39ifeq ($(RECOVERY_TOUCHSCREEN_FLIP_X), true)
40LOCAL_CFLAGS += -DRECOVERY_TOUCHSCREEN_FLIP_X
41endif
42
43ifeq ($(RECOVERY_TOUCHSCREEN_FLIP_Y), true)
44LOCAL_CFLAGS += -DRECOVERY_TOUCHSCREEN_FLIP_Y
45endif
46
47ifeq ($(RECOVERY_GRAPHICS_USE_LINELENGTH), true)
48LOCAL_CFLAGS += -DRECOVERY_GRAPHICS_USE_LINELENGTH
49endif
50
51#Remove the # from the line below to enable event logging
52#TWRP_EVENT_LOGGING := true
53ifeq ($(TWRP_EVENT_LOGGING), true)
54LOCAL_CFLAGS += -D_EVENT_LOGGING
55endif
56
Ethan Yonker4ee5ad72014-02-18 18:41:17 -060057ifeq ($(subst ",,$(TARGET_RECOVERY_PIXEL_FORMAT)),RGBX_8888)
58 LOCAL_CFLAGS += -DRECOVERY_RGBX
59endif
60ifeq ($(subst ",,$(TARGET_RECOVERY_PIXEL_FORMAT)),BGRA_8888)
61 LOCAL_CFLAGS += -DRECOVERY_BGRA
62endif
63ifeq ($(subst ",,$(TARGET_RECOVERY_PIXEL_FORMAT)),RGB_565)
64 LOCAL_CFLAGS += -DRECOVERY_RGB_565
65endif
66
Dees_Troy51a0e822012-09-05 15:24:24 -040067ifeq ($(TARGET_RECOVERY_PIXEL_FORMAT),"RGBX_8888")
68 LOCAL_CFLAGS += -DRECOVERY_RGBX
69endif
70ifeq ($(TARGET_RECOVERY_PIXEL_FORMAT),"BGRA_8888")
71 LOCAL_CFLAGS += -DRECOVERY_BGRA
72endif
73ifeq ($(TARGET_RECOVERY_PIXEL_FORMAT),"RGB_565")
74 LOCAL_CFLAGS += -DRECOVERY_RGB_565
75endif
xNUTxcd56f8c2014-07-23 01:30:20 +020076ifeq ($(TW_SCREEN_BLANK_ON_BOOT), true)
77 LOCAL_CFLAGS += -DTW_SCREEN_BLANK_ON_BOOT
78endif
Dees_Troy51a0e822012-09-05 15:24:24 -040079
80ifeq ($(BOARD_HAS_FLIPPED_SCREEN), true)
81LOCAL_CFLAGS += -DBOARD_HAS_FLIPPED_SCREEN
82endif
83
Ibrahim Awwal2e9cb012014-01-04 12:38:26 -080084ifeq ($(TW_IGNORE_MAJOR_AXIS_0), true)
85LOCAL_CFLAGS += -DTW_IGNORE_MAJOR_AXIS_0
86endif
87
Ethan Yonker32f68a32014-12-29 08:13:23 -060088ifeq ($(TW_IGNORE_MT_POSITION_0), true)
89LOCAL_CFLAGS += -DTW_IGNORE_MT_POSITION_0
90endif
91
Ethan Yonker5742a402014-08-12 14:52:49 -050092ifneq ($(TW_INPUT_BLACKLIST),)
93 LOCAL_CFLAGS += -DTW_INPUT_BLACKLIST=$(TW_INPUT_BLACKLIST)
94endif
95
Dees_Troy51a0e822012-09-05 15:24:24 -040096ifneq ($(BOARD_USE_CUSTOM_RECOVERY_FONT),)
97 LOCAL_CFLAGS += -DBOARD_USE_CUSTOM_RECOVERY_FONT=$(BOARD_USE_CUSTOM_RECOVERY_FONT)
Ethan Yonkerb24caab2014-08-07 09:28:04 -050098else
99 FONT_7x16 := 240x240 280x280 320x320 320x480
100 ROBOTO_10x18 := 480x800 480x854 540x960 800x480 1024x600 1024x768 1280x800
101 ROBOTO_15x24 := 720x1280 800x1280
102 ROBOTO_23x41 := 1080x1920 1200x1920 1440x2560 1600x2560 1920x1200 2560x1600
103 ifneq ($(filter $(DEVICE_RESOLUTION), $(FONT_7x16)),)
104 LOCAL_CFLAGS += -DBOARD_USE_CUSTOM_RECOVERY_FONT=\"font_7x16.h\"
105 else ifneq ($(filter $(DEVICE_RESOLUTION), $(ROBOTO_10x18)),)
106 LOCAL_CFLAGS += -DBOARD_USE_CUSTOM_RECOVERY_FONT=\"roboto_10x18.h\"
107 else ifneq ($(filter $(DEVICE_RESOLUTION), $(ROBOTO_15x24)),)
108 LOCAL_CFLAGS += -DBOARD_USE_CUSTOM_RECOVERY_FONT=\"roboto_15x24.h\"
109 else ifneq ($(filter $(DEVICE_RESOLUTION), $(ROBOTO_23x41)),)
110 LOCAL_CFLAGS += -DBOARD_USE_CUSTOM_RECOVERY_FONT=\"roboto_23x41.h\"
111 endif
Dees_Troy51a0e822012-09-05 15:24:24 -0400112endif
Flemmardf4674612014-01-10 09:14:44 +0100113
114ifneq ($(TW_WHITELIST_INPUT),)
115 LOCAL_CFLAGS += -DWHITELIST_INPUT=$(TW_WHITELIST_INPUT)
116endif
117
Vojtech Bocek76ee9032014-09-07 15:01:56 +0200118ifeq ($(TW_DISABLE_TTF), true)
119 LOCAL_CFLAGS += -DTW_DISABLE_TTF
120else
121 LOCAL_SHARED_LIBRARIES += libft2
122 LOCAL_C_INCLUDES += external/freetype/include
123 LOCAL_SRC_FILES += truetype.c
124endif
125
Dees Troy3454ade2015-01-20 19:21:04 +0000126LOCAL_CFLAGS += -DTWRES=\"$(TWRES_PATH)\"
Vojtech Bocek76ee9032014-09-07 15:01:56 +0200127LOCAL_SHARED_LIBRARIES += libz libc libcutils libjpeg libpng
128LOCAL_STATIC_LIBRARIES += libpixelflinger_static
Dees_Troy2673cec2013-04-02 20:22:16 +0000129LOCAL_MODULE_TAGS := eng
Dees_Troy51a0e822012-09-05 15:24:24 -0400130LOCAL_MODULE := libminuitwrp
131
Dees_Troy930bf012013-08-10 22:19:03 +0000132include $(BUILD_SHARED_LIBRARY)