1# Copyright (C) 2021 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) 16include $(CLEAR_VARS) 17 18soc_ver := $(TARGET_BOARD_PLATFORM) 19LOCAL_MODULE := android.hardware.composer.hwc3-service.pixel 20 21LOCAL_LICENSE_KINDS := SPDX-license-identifier-Apache-2.0 22LOCAL_LICENSE_CONDITIONS := notice 23LOCAL_NOTICE_FILE := $(LOCAL_PATH)/NOTICE 24 25LOCAL_MODULE_TAGS := optional 26LOCAL_MODULE_RELATIVE_PATH := hw 27LOCAL_PROPRIETARY_MODULE := true 28 29LOCAL_CFLAGS += \ 30 -DSOC_VERSION=$(soc_ver) \ 31 -DLOG_TAG=\"hwc-3\" \ 32 -Wthread-safety 33 34# hwc3 re-uses hwc2.2 ComposerResource and libexynosdisplay 35LOCAL_SHARED_LIBRARIES := android.hardware.graphics.composer3-V4-ndk \ 36 android.hardware.graphics.composer@2.1-resources \ 37 android.hardware.graphics.composer@2.2-resources \ 38 android.hardware.graphics.composer@2.4 \ 39 android.hardware.drm-V1-ndk \ 40 com.google.hardware.pixel.display-V13-ndk \ 41 android.frameworks.stats-V2-ndk \ 42 libpixelatoms_defs \ 43 pixelatoms-cpp \ 44 libbase \ 45 libbinder \ 46 libbinder_ndk \ 47 libcutils \ 48 libexynosdisplay \ 49 libfmq \ 50 libhardware \ 51 libhardware_legacy \ 52 liblog \ 53 libsync \ 54 libutils 55 56LOCAL_STATIC_LIBRARIES := libaidlcommonsupport 57 58LOCAL_HEADER_LIBRARIES := \ 59 android.hardware.graphics.composer3-command-buffer \ 60 google_hal_headers \ 61 libgralloc_headers 62 63LOCAL_C_INCLUDES := \ 64 $(TOP)/hardware/google/graphics/common/include \ 65 $(TOP)/hardware/google/graphics/common/libhwc2.1 \ 66 $(TOP)/hardware/google/graphics/common/libhwc2.1/libdevice \ 67 $(TOP)/hardware/google/graphics/common/libhwc2.1/libdisplayinterface \ 68 $(TOP)/hardware/google/graphics/common/libhwc2.1/libdrmresource/include \ 69 $(TOP)/hardware/google/graphics/common/libhwc2.1/libhwchelper \ 70 $(TOP)/hardware/google/graphics/common/libhwc2.1/libhwcService \ 71 $(TOP)/hardware/google/graphics/common/libhwc2.1/libresource \ 72 $(TOP)/hardware/google/graphics/$(soc_ver)/include \ 73 $(TOP)/hardware/google/graphics/$(soc_ver)/libhwc2.1 \ 74 $(TOP)/hardware/google/graphics/$(soc_ver)/libhwc2.1/libcolormanager \ 75 $(TOP)/hardware/google/graphics/$(soc_ver)/libhwc2.1/libdevice \ 76 $(TOP)/hardware/google/graphics/$(soc_ver)/libhwc2.1/libmaindisplay \ 77 $(TOP)/hardware/google/graphics/$(soc_ver)/libhwc2.1/libresource 78 79LOCAL_SRC_FILES := \ 80 Composer.cpp \ 81 ComposerClient.cpp \ 82 ComposerCommandEngine.cpp \ 83 impl/HalImpl.cpp \ 84 impl/ResourceManager.cpp \ 85 service.cpp 86 87ifeq ($(BOARD_USES_HWC_SERVICES),true) 88LOCAL_CFLAGS += -DUSES_HWC_SERVICES 89LOCAL_SHARED_LIBRARIES += libExynosHWCService 90LOCAL_HEADER_LIBRARIES += libbinder_headers 91endif 92 93ifeq ($(CLANG_COVERAGE),true) 94# enable code coverage (these flags are copied from build/soong/cc/coverage.go) 95LOCAL_CFLAGS += -fprofile-instr-generate -fcoverage-mapping 96LOCAL_CFLAGS += -Wno-frame-larger-than= 97LOCAL_WHOLE_STATIC_LIBRARIES += libprofile-clang-extras_ndk 98LOCAL_LDFLAGS += -fprofile-instr-generate 99LOCAL_LDFLAGS += -Wl,--wrap,open 100 101ifeq ($(CLANG_COVERAGE_CONTINUOUS_MODE),true) 102LOCAL_CFLAGS += -mllvm -runtime-counter-relocation 103LOCAL_LDFLAGS += -Wl,-mllvm=-runtime-counter-relocation 104endif 105endif 106 107LOCAL_VINTF_FRAGMENTS = hwc3-default.xml 108LOCAL_INIT_RC := hwc3-pixel.rc 109 110include $(BUILD_EXECUTABLE) 111