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
15LOCAL_PATH := $(call my-dir)
16
17# libminui (static library)
18# ===============================
19include $(CLEAR_VARS)
20
21LOCAL_SRC_FILES := \
22    events.cpp \
23    graphics.cpp \
24    graphics_adf.cpp \
25    graphics_drm.cpp \
26    graphics_fbdev.cpp \
27    resources.cpp \
28
29LOCAL_WHOLE_STATIC_LIBRARIES := \
30    libadf \
31    libdrm \
32    libsync_recovery
33
34LOCAL_STATIC_LIBRARIES := \
35    libpng \
36    libbase
37
38LOCAL_CFLAGS := -Wall -Werror
39LOCAL_C_INCLUDES := $(LOCAL_PATH)/include
40LOCAL_EXPORT_C_INCLUDE_DIRS := $(LOCAL_PATH)/include
41
42LOCAL_MODULE := libminui
43
44# This used to compare against values in double-quotes (which are just
45# ordinary characters in this context).  Strip double-quotes from the
46# value so that either will work.
47
48ifeq ($(subst ",,$(TARGET_RECOVERY_PIXEL_FORMAT)),ABGR_8888)
49  LOCAL_CFLAGS += -DRECOVERY_ABGR
50endif
51ifeq ($(subst ",,$(TARGET_RECOVERY_PIXEL_FORMAT)),RGBX_8888)
52  LOCAL_CFLAGS += -DRECOVERY_RGBX
53endif
54ifeq ($(subst ",,$(TARGET_RECOVERY_PIXEL_FORMAT)),BGRA_8888)
55  LOCAL_CFLAGS += -DRECOVERY_BGRA
56endif
57
58ifneq ($(TARGET_RECOVERY_OVERSCAN_PERCENT),)
59  LOCAL_CFLAGS += -DOVERSCAN_PERCENT=$(TARGET_RECOVERY_OVERSCAN_PERCENT)
60else
61  LOCAL_CFLAGS += -DOVERSCAN_PERCENT=0
62endif
63
64ifneq ($(TARGET_RECOVERY_DEFAULT_ROTATION),)
65  LOCAL_CFLAGS += -DDEFAULT_ROTATION=$(TARGET_RECOVERY_DEFAULT_ROTATION)
66else
67  LOCAL_CFLAGS += -DDEFAULT_ROTATION=ROTATION_NONE
68endif
69
70include $(BUILD_STATIC_LIBRARY)
71
72# libminui (shared library)
73# ===============================
74# Used by OEMs for factory test images.
75include $(CLEAR_VARS)
76LOCAL_MODULE := libminui
77LOCAL_WHOLE_STATIC_LIBRARIES += libminui
78LOCAL_SHARED_LIBRARIES := \
79    libpng \
80    libbase
81
82LOCAL_CFLAGS := -Wall -Werror
83LOCAL_C_INCLUDES := $(LOCAL_PATH)/include
84LOCAL_EXPORT_C_INCLUDE_DIRS := $(LOCAL_PATH)/include
85include $(BUILD_SHARED_LIBRARY)
86