blob: 1faaf6dcc08a45da54fccdc0d4c31fa40341944d [file] [log] [blame]
The Android Open Source Projectc24a8e62009-03-03 19:28:42 -08001LOCAL_PATH := $(call my-dir)
2include $(CLEAR_VARS)
3
Elliott Hughes07138192015-04-10 09:40:53 -07004LOCAL_SRC_FILES := \
5 events.cpp \
Elliott Hughes07cfb8f2015-04-10 13:12:05 -07006 graphics.cpp \
Stéphane Marchesin1a92c442015-06-29 20:05:48 -07007 graphics_drm.cpp \
Elliott Hughes07cfb8f2015-04-10 13:12:05 -07008 graphics_fbdev.cpp \
9 resources.cpp \
Ethan Yonkera59da092015-10-13 19:35:05 -050010 graphics_overlay.cpp
11
12LOCAL_C_INCLUDES := external/libcxx/include external/libpng
Dees Troy62b75ab2014-05-02 13:20:33 +000013
14ifeq ($(TW_TARGET_USES_QCOM_BSP), true)
15 LOCAL_CFLAGS += -DMSM_BSP
16 ifeq ($(TARGET_PREBUILT_KERNEL),)
17 LOCAL_ADDITIONAL_DEPENDENCIES := $(TARGET_OUT_INTERMEDIATES)/KERNEL_OBJ/usr
18 LOCAL_C_INCLUDES += $(TARGET_OUT_INTERMEDIATES)/KERNEL_OBJ/usr/include
19 else
Kra1o50024e382014-12-17 01:49:00 +010020 ifeq ($(TARGET_CUSTOM_KERNEL_HEADERS),)
21 LOCAL_C_INCLUDES += $(commands_recovery_local_path)/minui/include
22 else
23 LOCAL_C_INCLUDES += $(TARGET_CUSTOM_KERNEL_HEADERS)
24 endif
Dees Troy62b75ab2014-05-02 13:20:33 +000025 endif
26else
Matt Mower55c75ca2014-08-31 11:30:15 -050027 LOCAL_C_INCLUDES += $(commands_recovery_local_path)/minui/include
Ethan Yonkera59da092015-10-13 19:35:05 -050028 # The header files required for adf graphics can cause compile errors
29 # with adf graphics.
30 LOCAL_SRC_FILES += graphics_adf.cpp
31 LOCAL_WHOLE_STATIC_LIBRARIES += libadf
Dees Troy62b75ab2014-05-02 13:20:33 +000032endif
33
Kra1o5de50c5f2015-04-23 21:46:36 +020034ifeq ($(TW_NEW_ION_HEAP), true)
35 LOCAL_CFLAGS += -DNEW_ION_HEAP
36endif
37
Stéphane Marchesin1a92c442015-06-29 20:05:48 -070038LOCAL_WHOLE_STATIC_LIBRARIES += libdrm
Trevor Drakefee324f2015-02-26 15:57:58 +000039LOCAL_STATIC_LIBRARIES += libpng
Greg Hackmann41909dd2014-04-25 10:39:50 -070040
The Android Open Source Projectc24a8e62009-03-03 19:28:42 -080041LOCAL_MODULE := libminui
42
Elliott Hughes07138192015-04-10 09:40:53 -070043LOCAL_CLANG := true
Elliott Hughes01a4d082015-03-24 15:21:48 -070044
Doug Zongker9c5efe62012-07-11 13:21:02 -070045# This used to compare against values in double-quotes (which are just
46# ordinary characters in this context). Strip double-quotes from the
47# value so that either will work.
48
Tony Kuofd778e32015-02-05 21:25:56 +080049ifeq ($(subst ",,$(TARGET_RECOVERY_PIXEL_FORMAT)),ABGR_8888)
50 LOCAL_CFLAGS += -DRECOVERY_ABGR
51endif
Kra1o577568592015-10-14 18:09:54 +020052ifeq ($(subst ",,$(TARGET_RECOVERY_PIXEL_FORMAT)),RGBA_8888)
53 LOCAL_CFLAGS += -DRECOVERY_RGBA
54endif
Doug Zongker9c5efe62012-07-11 13:21:02 -070055ifeq ($(subst ",,$(TARGET_RECOVERY_PIXEL_FORMAT)),RGBX_8888)
Michael Ward9d1bcdf2011-06-22 14:30:34 -070056 LOCAL_CFLAGS += -DRECOVERY_RGBX
57endif
Doug Zongker9c5efe62012-07-11 13:21:02 -070058ifeq ($(subst ",,$(TARGET_RECOVERY_PIXEL_FORMAT)),BGRA_8888)
Michael Ward9d1bcdf2011-06-22 14:30:34 -070059 LOCAL_CFLAGS += -DRECOVERY_BGRA
Doug Zongkerbe3e6f12011-01-13 16:43:44 -080060endif
61
Doug Zongkerc560a672012-12-18 16:31:27 -080062ifneq ($(TARGET_RECOVERY_OVERSCAN_PERCENT),)
63 LOCAL_CFLAGS += -DOVERSCAN_PERCENT=$(TARGET_RECOVERY_OVERSCAN_PERCENT)
64else
65 LOCAL_CFLAGS += -DOVERSCAN_PERCENT=0
66endif
67
Matt Mower4a5db2d2014-01-20 16:14:25 -060068ifneq ($(TW_BRIGHTNESS_PATH),)
69 LOCAL_CFLAGS += -DTW_BRIGHTNESS_PATH=\"$(TW_BRIGHTNESS_PATH)\"
70endif
71ifneq ($(TW_MAX_BRIGHTNESS),)
72 LOCAL_CFLAGS += -DTW_MAX_BRIGHTNESS=$(TW_MAX_BRIGHTNESS)
73else
74 LOCAL_CFLAGS += -DTW_MAX_BRIGHTNESS=255
75endif
76ifneq ($(TW_NO_SCREEN_BLANK),)
77 LOCAL_CFLAGS += -DTW_NO_SCREEN_BLANK
Ethan Chen0940e412013-10-22 13:48:50 -070078endif
maxwen39624d42015-12-01 22:02:07 +010079ifneq ($(BOARD_USE_CUSTOM_RECOVERY_FONT),)
80 LOCAL_CFLAGS += -DBOARD_USE_CUSTOM_RECOVERY_FONT=$(BOARD_USE_CUSTOM_RECOVERY_FONT)
81endif
The Android Open Source Projectc24a8e62009-03-03 19:28:42 -080082include $(BUILD_STATIC_LIBRARY)
Dees Troy62b75ab2014-05-02 13:20:33 +000083
Ajay Dudani9905f3a2015-02-04 16:49:44 -080084# Used by OEMs for factory test images.
Dees Troy62b75ab2014-05-02 13:20:33 +000085include $(CLEAR_VARS)
Tao Bao80e46e02015-06-03 10:49:29 -070086LOCAL_CLANG := true
Dees Troy62b75ab2014-05-02 13:20:33 +000087LOCAL_MODULE := libminui
Ajay Dudani9905f3a2015-02-04 16:49:44 -080088LOCAL_WHOLE_STATIC_LIBRARIES += libminui
89LOCAL_SHARED_LIBRARIES := libpng
Dees Troy62b75ab2014-05-02 13:20:33 +000090include $(BUILD_SHARED_LIBRARY)
Ethan Yonkera59da092015-10-13 19:35:05 -050091
92include $(CLEAR_VARS)
93LOCAL_MODULE := minuitest
94LOCAL_MODULE_TAGS := optional
95LOCAL_MODULE_PATH := $(TARGET_ROOT_OUT_SBIN)
96LOCAL_SRC_FILES := main.cpp
97LOCAL_STATIC_LIBRARIES := libbinder libminui libpng libz libutils libstdc++ libcutils liblog libm libc
98LOCAL_C_INCLUDES := external/libcxx/include external/libpng
99LOCAL_FORCE_STATIC_EXECUTABLE := true
100include $(BUILD_EXECUTABLE)