blob: 5ccdf4fab090a0f116140b7d1008660f4c6ff5cb [file] [log] [blame]
Tao Bao0ecbd762017-01-16 21:16:58 -08001# 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 Projectc24a8e62009-03-03 19:28:42 -080015LOCAL_PATH := $(call my-dir)
Tao Bao99f0d9e2016-10-13 12:46:38 -070016
17# libminui (static library)
18# ===============================
bigbiffd58ba182020-03-23 10:02:29 -040019# include $(CLEAR_VARS)
The Android Open Source Projectc24a8e62009-03-03 19:28:42 -080020
bigbiffd58ba182020-03-23 10:02:29 -040021# LOCAL_SRC_FILES := \
22# events.cpp \
23# graphics.cpp \
24# graphics_drm.cpp \
25# graphics_fbdev.cpp \
26# graphics_overlay.cpp \
27# resources.cpp
Ethan Yonkera59da092015-10-13 19:35:05 -050028
bigbiffd58ba182020-03-23 10:02:29 -040029# LOCAL_C_INCLUDES := external/libcxx/include external/libpng
Dees Troy62b75ab2014-05-02 13:20:33 +000030
bigbiffd58ba182020-03-23 10:02:29 -040031# ifeq ($(TW_TARGET_USES_QCOM_BSP), true)
32# LOCAL_CFLAGS += -DMSM_BSP
33# LOCAL_SRC_FILES += graphics_overlay.cpp
34# ifeq ($(TARGET_PREBUILT_KERNEL),)
35# ifeq ($(shell test $(PLATFORM_SDK_VERSION) -ge 28; echo $$?),0)
36# LOCAL_REQUIRED_MODULES := $(TARGET_OUT_INTERMEDIATES)/KERNEL_OBJ/usr
37# else
38# LOCAL_ADDITIONAL_DEPENDENCIES := $(TARGET_OUT_INTERMEDIATES)/KERNEL_OBJ/usr
39# endif
40# LOCAL_C_INCLUDES += $(TARGET_OUT_INTERMEDIATES)/KERNEL_OBJ/usr/include
41# else
42# ifeq ($(TARGET_CUSTOM_KERNEL_HEADERS),)
43# LOCAL_C_INCLUDES += $(LOCAL_PATH)/include
44# else
45# LOCAL_C_INCLUDES += $(TARGET_CUSTOM_KERNEL_HEADERS)
46# endif
47# endif
48# else
49# LOCAL_C_INCLUDES += $(LOCAL_PATH)/include
50# # The header files required for adf graphics can cause compile errors
51# # with adf graphics.
52# LOCAL_SRC_FILES += graphics_adf.cpp
53# LOCAL_WHOLE_STATIC_LIBRARIES += libadf
54# endif
Dees Troy62b75ab2014-05-02 13:20:33 +000055
bigbiffd58ba182020-03-23 10:02:29 -040056# ifeq ($(TW_NEW_ION_HEAP), true)
57# LOCAL_CFLAGS += -DNEW_ION_HEAP
58# endif
Kra1o5de50c5f2015-04-23 21:46:36 +020059
bigbiffd58ba182020-03-23 10:02:29 -040060# LOCAL_STATIC_LIBRARIES += libpng libbase
61# ifneq ($(wildcard external/libdrm/Android.common.mk),)
62# LOCAL_WHOLE_STATIC_LIBRARIES += libdrm_platform
63# else
64# LOCAL_WHOLE_STATIC_LIBRARIES += libdrm
65# endif
66# ifeq ($(shell test $(PLATFORM_SDK_VERSION) -ge 26; echo $$?),0)
67# LOCAL_CFLAGS += -DHAS_LIBSYNC
68# LOCAL_WHOLE_STATIC_LIBRARIES += libsync_recovery
69# endif
Tao Bao0ecbd762017-01-16 21:16:58 -080070
bigbiffd58ba182020-03-23 10:02:29 -040071# LOCAL_CFLAGS += -Wall -Werror -std=c++14 -Wno-unused-private-field
72# LOCAL_C_INCLUDES += $(LOCAL_PATH)/include
73# LOCAL_EXPORT_C_INCLUDE_DIRS := $(LOCAL_PATH)/include
Greg Hackmann41909dd2014-04-25 10:39:50 -070074
bigbiffd58ba182020-03-23 10:02:29 -040075# LOCAL_MODULE := libminui
The Android Open Source Projectc24a8e62009-03-03 19:28:42 -080076
bigbiffd58ba182020-03-23 10:02:29 -040077# LOCAL_CLANG := true
Elliott Hughes01a4d082015-03-24 15:21:48 -070078
bigbiffd58ba182020-03-23 10:02:29 -040079# # This used to compare against values in double-quotes (which are just
80# # ordinary characters in this context). Strip double-quotes from the
81# # value so that either will work.
Doug Zongker9c5efe62012-07-11 13:21:02 -070082
bigbiffd58ba182020-03-23 10:02:29 -040083# ifeq ($(subst ",,$(TARGET_RECOVERY_PIXEL_FORMAT)),ABGR_8888)
84# LOCAL_CFLAGS += -DRECOVERY_ABGR
85# endif
86# ifeq ($(subst ",,$(TARGET_RECOVERY_PIXEL_FORMAT)),RGBA_8888)
87# LOCAL_CFLAGS += -DRECOVERY_RGBA
88# endif
89# ifeq ($(subst ",,$(TARGET_RECOVERY_PIXEL_FORMAT)),RGBX_8888)
90# LOCAL_CFLAGS += -DRECOVERY_RGBX
91# endif
92# ifeq ($(subst ",,$(TARGET_RECOVERY_PIXEL_FORMAT)),BGRA_8888)
93# LOCAL_CFLAGS += -DRECOVERY_BGRA
94# endif
Doug Zongkerbe3e6f12011-01-13 16:43:44 -080095
bigbiffd58ba182020-03-23 10:02:29 -040096# ifneq ($(TARGET_RECOVERY_OVERSCAN_PERCENT),)
97# LOCAL_CFLAGS += -DOVERSCAN_PERCENT=$(TARGET_RECOVERY_OVERSCAN_PERCENT)
98# else
99# LOCAL_CFLAGS += -DOVERSCAN_PERCENT=0
100# endif
Doug Zongkerc560a672012-12-18 16:31:27 -0800101
bigbiffd58ba182020-03-23 10:02:29 -0400102# ifneq ($(TW_BRIGHTNESS_PATH),)
103# LOCAL_CFLAGS += -DTW_BRIGHTNESS_PATH=\"$(TW_BRIGHTNESS_PATH)\"
104# endif
105# ifneq ($(TW_MAX_BRIGHTNESS),)
106# LOCAL_CFLAGS += -DTW_MAX_BRIGHTNESS=$(TW_MAX_BRIGHTNESS)
107# else
108# LOCAL_CFLAGS += -DTW_MAX_BRIGHTNESS=255
109# endif
110# ifneq ($(TW_NO_SCREEN_BLANK),)
111# LOCAL_CFLAGS += -DTW_NO_SCREEN_BLANK
112# endif
113# ifneq ($(BOARD_USE_CUSTOM_RECOVERY_FONT),)
114# LOCAL_CFLAGS += -DBOARD_USE_CUSTOM_RECOVERY_FONT=$(BOARD_USE_CUSTOM_RECOVERY_FONT)
115# endif
116# ifeq ($(wildcard system/core/healthd/animation.h),)
117# TARGET_GLOBAL_CFLAGS += -DTW_NO_MINUI_CUSTOM_FONTS
118# CLANG_TARGET_GLOBAL_CFLAGS += -DTW_NO_MINUI_CUSTOM_FONTS
119# endif
120# ifneq ($(TARGET_RECOVERY_DEFAULT_ROTATION),)
121# LOCAL_CFLAGS += -DDEFAULT_ROTATION=$(TARGET_RECOVERY_DEFAULT_ROTATION)
122# else
123# LOCAL_CFLAGS += -DDEFAULT_ROTATION=ROTATION_NONE
124# endif
Luke Song846012f2017-09-13 15:56:16 -0700125
bigbiffd58ba182020-03-23 10:02:29 -0400126# include $(BUILD_STATIC_LIBRARY)
Dees Troy62b75ab2014-05-02 13:20:33 +0000127
Tao Bao99f0d9e2016-10-13 12:46:38 -0700128# libminui (shared library)
129# ===============================
Ajay Dudani9905f3a2015-02-04 16:49:44 -0800130# Used by OEMs for factory test images.
bigbiffd58ba182020-03-23 10:02:29 -0400131# include $(CLEAR_VARS)
132# LOCAL_CLANG := true
133# LOCAL_MODULE := libminui
134# LOCAL_WHOLE_STATIC_LIBRARIES += libminui
135# LOCAL_SHARED_LIBRARIES := \
136# libpng \
137# libbase
Tianjie Xu0a599562017-03-28 20:11:15 +0000138
bigbiffd58ba182020-03-23 10:02:29 -0400139# LOCAL_CFLAGS := -Wall -Werror -std=c++14 -Wno-unused-private-field
140# LOCAL_C_INCLUDES := $(LOCAL_PATH)/include
141# LOCAL_EXPORT_C_INCLUDE_DIRS := $(LOCAL_PATH)/include
142# include $(BUILD_SHARED_LIBRARY)
Ethan Yonkera59da092015-10-13 19:35:05 -0500143
bigbiffd58ba182020-03-23 10:02:29 -0400144# include $(CLEAR_VARS)
145# LOCAL_MODULE := minuitest
146# LOCAL_MODULE_TAGS := optional
147# LOCAL_MODULE_PATH := $(TARGET_ROOT_OUT_SBIN)
148# LOCAL_SRC_FILES := main.cpp
149# LOCAL_SHARED_LIBRARIES := libbinder libminui libpng libz libutils libstdc++ libcutils liblog libm libc
150# LOCAL_C_INCLUDES := external/libcxx/include external/libpng
151# ifneq ($(TARGET_ARCH), arm64)
152# ifneq ($(TARGET_ARCH), x86_64)
153# LOCAL_LDFLAGS += -Wl,-dynamic-linker,/sbin/linker
154# else
155# LOCAL_LDFLAGS += -Wl,-dynamic-linker,/sbin/linker64
156# endif
157# else
158# LOCAL_LDFLAGS += -Wl,-dynamic-linker,/sbin/linker64
159# endif
160# include $(BUILD_EXECUTABLE)