Tao Bao | 0ecbd76 | 2017-01-16 21:16:58 -0800 | [diff] [blame] | 1 | # Copyright (C) 2007 The Android Open Source Project |
| 2 | # |
| 3 | # Licensed under the Apache License, Version 2.0 (the "License"); |
| 4 | # you may not use this file except in compliance with the License. |
| 5 | # You may obtain a copy of the License at |
| 6 | # |
| 7 | # http://www.apache.org/licenses/LICENSE-2.0 |
| 8 | # |
| 9 | # Unless required by applicable law or agreed to in writing, software |
| 10 | # distributed under the License is distributed on an "AS IS" BASIS, |
| 11 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
| 12 | # See the License for the specific language governing permissions and |
| 13 | # limitations under the License. |
| 14 | |
The Android Open Source Project | c24a8e6 | 2009-03-03 19:28:42 -0800 | [diff] [blame] | 15 | LOCAL_PATH := $(call my-dir) |
Tao Bao | 99f0d9e | 2016-10-13 12:46:38 -0700 | [diff] [blame] | 16 | |
| 17 | # libminui (static library) |
| 18 | # =============================== |
The Android Open Source Project | c24a8e6 | 2009-03-03 19:28:42 -0800 | [diff] [blame] | 19 | include $(CLEAR_VARS) |
| 20 | |
Elliott Hughes | 0713819 | 2015-04-10 09:40:53 -0700 | [diff] [blame] | 21 | LOCAL_SRC_FILES := \ |
| 22 | events.cpp \ |
Elliott Hughes | 07cfb8f | 2015-04-10 13:12:05 -0700 | [diff] [blame] | 23 | graphics.cpp \ |
Stéphane Marchesin | 1a92c44 | 2015-06-29 20:05:48 -0700 | [diff] [blame] | 24 | graphics_drm.cpp \ |
Elliott Hughes | 07cfb8f | 2015-04-10 13:12:05 -0700 | [diff] [blame] | 25 | graphics_fbdev.cpp \ |
Ethan Yonker | 8373cfe | 2017-09-08 06:50:54 -0500 | [diff] [blame] | 26 | graphics_overlay.cpp \ |
Ethan Yonker | b386f71 | 2017-01-20 14:30:28 -0600 | [diff] [blame] | 27 | resources.cpp |
Ethan Yonker | a59da09 | 2015-10-13 19:35:05 -0500 | [diff] [blame] | 28 | |
| 29 | LOCAL_C_INCLUDES := external/libcxx/include external/libpng |
Dees Troy | 62b75ab | 2014-05-02 13:20:33 +0000 | [diff] [blame] | 30 | |
| 31 | ifeq ($(TW_TARGET_USES_QCOM_BSP), true) |
| 32 | LOCAL_CFLAGS += -DMSM_BSP |
Ethan Yonker | b386f71 | 2017-01-20 14:30:28 -0600 | [diff] [blame] | 33 | LOCAL_SRC_FILES += graphics_overlay.cpp |
Dees Troy | 62b75ab | 2014-05-02 13:20:33 +0000 | [diff] [blame] | 34 | ifeq ($(TARGET_PREBUILT_KERNEL),) |
| 35 | LOCAL_ADDITIONAL_DEPENDENCIES := $(TARGET_OUT_INTERMEDIATES)/KERNEL_OBJ/usr |
| 36 | LOCAL_C_INCLUDES += $(TARGET_OUT_INTERMEDIATES)/KERNEL_OBJ/usr/include |
| 37 | else |
Kra1o5 | 0024e38 | 2014-12-17 01:49:00 +0100 | [diff] [blame] | 38 | ifeq ($(TARGET_CUSTOM_KERNEL_HEADERS),) |
Ethan Yonker | 58f2132 | 2018-08-24 11:17:36 -0500 | [diff] [blame] | 39 | LOCAL_C_INCLUDES += $(LOCAL_PATH)/include |
Kra1o5 | 0024e38 | 2014-12-17 01:49:00 +0100 | [diff] [blame] | 40 | else |
| 41 | LOCAL_C_INCLUDES += $(TARGET_CUSTOM_KERNEL_HEADERS) |
| 42 | endif |
Dees Troy | 62b75ab | 2014-05-02 13:20:33 +0000 | [diff] [blame] | 43 | endif |
| 44 | else |
Ethan Yonker | 58f2132 | 2018-08-24 11:17:36 -0500 | [diff] [blame] | 45 | LOCAL_C_INCLUDES += $(LOCAL_PATH)/include |
Ethan Yonker | a59da09 | 2015-10-13 19:35:05 -0500 | [diff] [blame] | 46 | # The header files required for adf graphics can cause compile errors |
| 47 | # with adf graphics. |
| 48 | LOCAL_SRC_FILES += graphics_adf.cpp |
| 49 | LOCAL_WHOLE_STATIC_LIBRARIES += libadf |
Dees Troy | 62b75ab | 2014-05-02 13:20:33 +0000 | [diff] [blame] | 50 | endif |
| 51 | |
Kra1o5 | de50c5f | 2015-04-23 21:46:36 +0200 | [diff] [blame] | 52 | ifeq ($(TW_NEW_ION_HEAP), true) |
| 53 | LOCAL_CFLAGS += -DNEW_ION_HEAP |
| 54 | endif |
| 55 | |
Ethan Yonker | 58f2132 | 2018-08-24 11:17:36 -0500 | [diff] [blame] | 56 | LOCAL_STATIC_LIBRARIES += libpng libbase |
Ethan Yonker | ecbd3e8 | 2017-12-14 14:43:59 -0600 | [diff] [blame] | 57 | ifneq ($(wildcard external/libdrm/Android.common.mk),) |
| 58 | LOCAL_WHOLE_STATIC_LIBRARIES += libdrm_platform |
| 59 | else |
| 60 | LOCAL_WHOLE_STATIC_LIBRARIES += libdrm |
| 61 | endif |
Ethan Yonker | 8373cfe | 2017-09-08 06:50:54 -0500 | [diff] [blame] | 62 | ifeq ($(shell test $(PLATFORM_SDK_VERSION) -ge 26; echo $$?),0) |
| 63 | LOCAL_CFLAGS += -DHAS_LIBSYNC |
| 64 | LOCAL_WHOLE_STATIC_LIBRARIES += libsync_recovery |
| 65 | endif |
Tao Bao | 0ecbd76 | 2017-01-16 21:16:58 -0800 | [diff] [blame] | 66 | |
Ethan Yonker | 58f2132 | 2018-08-24 11:17:36 -0500 | [diff] [blame] | 67 | LOCAL_CFLAGS += -Wall -Werror -std=c++14 -Wno-unused-private-field |
Andreas Schneider | 75847da | 2017-11-02 17:53:47 +0100 | [diff] [blame] | 68 | LOCAL_C_INCLUDES += $(LOCAL_PATH)/include |
Tao Bao | 0ecbd76 | 2017-01-16 21:16:58 -0800 | [diff] [blame] | 69 | LOCAL_EXPORT_C_INCLUDE_DIRS := $(LOCAL_PATH)/include |
Greg Hackmann | 41909dd | 2014-04-25 10:39:50 -0700 | [diff] [blame] | 70 | |
The Android Open Source Project | c24a8e6 | 2009-03-03 19:28:42 -0800 | [diff] [blame] | 71 | LOCAL_MODULE := libminui |
| 72 | |
Elliott Hughes | 0713819 | 2015-04-10 09:40:53 -0700 | [diff] [blame] | 73 | LOCAL_CLANG := true |
Elliott Hughes | 01a4d08 | 2015-03-24 15:21:48 -0700 | [diff] [blame] | 74 | |
Doug Zongker | 9c5efe6 | 2012-07-11 13:21:02 -0700 | [diff] [blame] | 75 | # This used to compare against values in double-quotes (which are just |
| 76 | # ordinary characters in this context). Strip double-quotes from the |
| 77 | # value so that either will work. |
| 78 | |
Tony Kuo | fd778e3 | 2015-02-05 21:25:56 +0800 | [diff] [blame] | 79 | ifeq ($(subst ",,$(TARGET_RECOVERY_PIXEL_FORMAT)),ABGR_8888) |
| 80 | LOCAL_CFLAGS += -DRECOVERY_ABGR |
| 81 | endif |
Kra1o5 | 7756859 | 2015-10-14 18:09:54 +0200 | [diff] [blame] | 82 | ifeq ($(subst ",,$(TARGET_RECOVERY_PIXEL_FORMAT)),RGBA_8888) |
| 83 | LOCAL_CFLAGS += -DRECOVERY_RGBA |
| 84 | endif |
Doug Zongker | 9c5efe6 | 2012-07-11 13:21:02 -0700 | [diff] [blame] | 85 | ifeq ($(subst ",,$(TARGET_RECOVERY_PIXEL_FORMAT)),RGBX_8888) |
Michael Ward | 9d1bcdf | 2011-06-22 14:30:34 -0700 | [diff] [blame] | 86 | LOCAL_CFLAGS += -DRECOVERY_RGBX |
| 87 | endif |
Doug Zongker | 9c5efe6 | 2012-07-11 13:21:02 -0700 | [diff] [blame] | 88 | ifeq ($(subst ",,$(TARGET_RECOVERY_PIXEL_FORMAT)),BGRA_8888) |
Michael Ward | 9d1bcdf | 2011-06-22 14:30:34 -0700 | [diff] [blame] | 89 | LOCAL_CFLAGS += -DRECOVERY_BGRA |
Doug Zongker | be3e6f1 | 2011-01-13 16:43:44 -0800 | [diff] [blame] | 90 | endif |
| 91 | |
Doug Zongker | c560a67 | 2012-12-18 16:31:27 -0800 | [diff] [blame] | 92 | ifneq ($(TARGET_RECOVERY_OVERSCAN_PERCENT),) |
| 93 | LOCAL_CFLAGS += -DOVERSCAN_PERCENT=$(TARGET_RECOVERY_OVERSCAN_PERCENT) |
| 94 | else |
| 95 | LOCAL_CFLAGS += -DOVERSCAN_PERCENT=0 |
| 96 | endif |
| 97 | |
Matt Mower | 4a5db2d | 2014-01-20 16:14:25 -0600 | [diff] [blame] | 98 | ifneq ($(TW_BRIGHTNESS_PATH),) |
| 99 | LOCAL_CFLAGS += -DTW_BRIGHTNESS_PATH=\"$(TW_BRIGHTNESS_PATH)\" |
| 100 | endif |
| 101 | ifneq ($(TW_MAX_BRIGHTNESS),) |
| 102 | LOCAL_CFLAGS += -DTW_MAX_BRIGHTNESS=$(TW_MAX_BRIGHTNESS) |
| 103 | else |
| 104 | LOCAL_CFLAGS += -DTW_MAX_BRIGHTNESS=255 |
| 105 | endif |
| 106 | ifneq ($(TW_NO_SCREEN_BLANK),) |
| 107 | LOCAL_CFLAGS += -DTW_NO_SCREEN_BLANK |
Ethan Chen | 0940e41 | 2013-10-22 13:48:50 -0700 | [diff] [blame] | 108 | endif |
maxwen | 39624d4 | 2015-12-01 22:02:07 +0100 | [diff] [blame] | 109 | ifneq ($(BOARD_USE_CUSTOM_RECOVERY_FONT),) |
| 110 | LOCAL_CFLAGS += -DBOARD_USE_CUSTOM_RECOVERY_FONT=$(BOARD_USE_CUSTOM_RECOVERY_FONT) |
| 111 | endif |
Ethan Yonker | 39662b2 | 2017-05-23 08:34:02 -0500 | [diff] [blame] | 112 | ifeq ($(wildcard system/core/healthd/animation.h),) |
| 113 | TARGET_GLOBAL_CFLAGS += -DTW_NO_MINUI_CUSTOM_FONTS |
| 114 | CLANG_TARGET_GLOBAL_CFLAGS += -DTW_NO_MINUI_CUSTOM_FONTS |
Ethan Yonker | 84d61ce | 2017-05-10 16:11:35 -0500 | [diff] [blame] | 115 | endif |
Luke Song | 846012f | 2017-09-13 15:56:16 -0700 | [diff] [blame] | 116 | ifneq ($(TARGET_RECOVERY_DEFAULT_ROTATION),) |
| 117 | LOCAL_CFLAGS += -DDEFAULT_ROTATION=$(TARGET_RECOVERY_DEFAULT_ROTATION) |
| 118 | else |
| 119 | LOCAL_CFLAGS += -DDEFAULT_ROTATION=ROTATION_NONE |
| 120 | endif |
| 121 | |
The Android Open Source Project | c24a8e6 | 2009-03-03 19:28:42 -0800 | [diff] [blame] | 122 | include $(BUILD_STATIC_LIBRARY) |
Dees Troy | 62b75ab | 2014-05-02 13:20:33 +0000 | [diff] [blame] | 123 | |
Tao Bao | 99f0d9e | 2016-10-13 12:46:38 -0700 | [diff] [blame] | 124 | # libminui (shared library) |
| 125 | # =============================== |
Ajay Dudani | 9905f3a | 2015-02-04 16:49:44 -0800 | [diff] [blame] | 126 | # Used by OEMs for factory test images. |
Dees Troy | 62b75ab | 2014-05-02 13:20:33 +0000 | [diff] [blame] | 127 | include $(CLEAR_VARS) |
Tao Bao | 80e46e0 | 2015-06-03 10:49:29 -0700 | [diff] [blame] | 128 | LOCAL_CLANG := true |
Dees Troy | 62b75ab | 2014-05-02 13:20:33 +0000 | [diff] [blame] | 129 | LOCAL_MODULE := libminui |
Ajay Dudani | 9905f3a | 2015-02-04 16:49:44 -0800 | [diff] [blame] | 130 | LOCAL_WHOLE_STATIC_LIBRARIES += libminui |
Tianjie Xu | 0a59956 | 2017-03-28 20:11:15 +0000 | [diff] [blame] | 131 | LOCAL_SHARED_LIBRARIES := \ |
| 132 | libpng \ |
| 133 | libbase |
| 134 | |
Ethan Yonker | 58f2132 | 2018-08-24 11:17:36 -0500 | [diff] [blame] | 135 | LOCAL_CFLAGS := -Wall -Werror -std=c++14 -Wno-unused-private-field |
Tao Bao | 0ecbd76 | 2017-01-16 21:16:58 -0800 | [diff] [blame] | 136 | LOCAL_C_INCLUDES := $(LOCAL_PATH)/include |
| 137 | LOCAL_EXPORT_C_INCLUDE_DIRS := $(LOCAL_PATH)/include |
Dees Troy | 62b75ab | 2014-05-02 13:20:33 +0000 | [diff] [blame] | 138 | include $(BUILD_SHARED_LIBRARY) |
Ethan Yonker | a59da09 | 2015-10-13 19:35:05 -0500 | [diff] [blame] | 139 | |
| 140 | include $(CLEAR_VARS) |
| 141 | LOCAL_MODULE := minuitest |
| 142 | LOCAL_MODULE_TAGS := optional |
| 143 | LOCAL_MODULE_PATH := $(TARGET_ROOT_OUT_SBIN) |
| 144 | LOCAL_SRC_FILES := main.cpp |
Ethan Yonker | 8373cfe | 2017-09-08 06:50:54 -0500 | [diff] [blame] | 145 | LOCAL_SHARED_LIBRARIES := libbinder libminui libpng libz libutils libstdc++ libcutils liblog libm libc |
Ethan Yonker | a59da09 | 2015-10-13 19:35:05 -0500 | [diff] [blame] | 146 | LOCAL_C_INCLUDES := external/libcxx/include external/libpng |
Ethan Yonker | 8373cfe | 2017-09-08 06:50:54 -0500 | [diff] [blame] | 147 | ifneq ($(TARGET_ARCH), arm64) |
| 148 | ifneq ($(TARGET_ARCH), x86_64) |
| 149 | LOCAL_LDFLAGS += -Wl,-dynamic-linker,/sbin/linker |
| 150 | else |
| 151 | LOCAL_LDFLAGS += -Wl,-dynamic-linker,/sbin/linker64 |
| 152 | endif |
| 153 | else |
| 154 | LOCAL_LDFLAGS += -Wl,-dynamic-linker,/sbin/linker64 |
| 155 | endif |
Ethan Yonker | a59da09 | 2015-10-13 19:35:05 -0500 | [diff] [blame] | 156 | include $(BUILD_EXECUTABLE) |