diff options
author | Alistair Strachan <astrachan@google.com> | 2019-03-27 07:51:40 +0000 |
---|---|---|
committer | Gerrit Code Review <noreply-gerritcodereview@google.com> | 2019-03-27 07:51:40 +0000 |
commit | 02f1096918113a3ac16b3768aa0bfd24900c01d6 (patch) | |
tree | 2fcdc63557081c5d026b2fdf9a89d1429a977825 | |
parent | 077ac9bc3856cf7a775e5daa1e41ca60517c3ae1 (diff) | |
parent | 57f97357b5283f6cc74849b09a46c3aa2ee79463 (diff) | |
download | drm_hwcomposer-linaro-pie.tar.gz |
Merge "Convert external/drm_hwcomposer to Android.bp"linaro-pie
-rw-r--r-- | Android.bp | 112 | ||||
-rw-r--r-- | Android.mk | 114 | ||||
-rw-r--r-- | tests/Android.bp | 13 | ||||
-rw-r--r-- | tests/Android.mk | 15 |
4 files changed, 125 insertions, 129 deletions
diff --git a/Android.bp b/Android.bp new file mode 100644 index 0000000..b8de984 --- /dev/null +++ b/Android.bp @@ -0,0 +1,112 @@ +// Copyright (C) 2015 The Android Open Source Project +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +// ===================== +// libdrmhwc_utils.a +// ===================== +cc_library_static { + name: "libdrmhwc_utils", + + srcs: ["worker.cpp"], + + cflags: [ + "-Wall", + "-Werror", + ], + + vendor: true, + +} + +// ===================== +// hwcomposer.drm.so +// ===================== +cc_defaults { + name: "hwcomposer.drm_defaults", + + shared_libs: [ + "libcutils", + "libdrm", + "libhardware", + "liblog", + "libsync", + "libui", + "libutils", + ], + + static_libs: ["libdrmhwc_utils"], + + srcs: [ + "autolock.cpp", + "resourcemanager.cpp", + "drmdevice.cpp", + "drmconnector.cpp", + "drmcrtc.cpp", + "drmdisplaycomposition.cpp", + "drmdisplaycompositor.cpp", + "drmencoder.cpp", + "drmeventlistener.cpp", + "drmhwctwo.cpp", + "drmmode.cpp", + "drmplane.cpp", + "drmproperty.cpp", + "hwcutils.cpp", + "platform.cpp", + "platformdrmgeneric.cpp", + "vsyncworker.cpp", + ], + cflags: [ + "-Wall", + "-Werror", + ], + + cppflags: [ + "-DHWC2_USE_CPP11", + "-DHWC2_INCLUDE_STRINGIFICATION", + ], + + relative_install_path: "hw", + vendor: true, +} + +cc_library_shared { + name: "hwcomposer.drm", + defaults: ["hwcomposer.drm_defaults"], + cppflags: ["-DUSE_DRM_GENERIC_IMPORTER"], +} + +cc_library_shared { + name: "hwcomposer.drm_hikey", + defaults: ["hwcomposer.drm_defaults"], + cppflags: ["-DUSE_HISI_IMPORTER"], + srcs: ["platformhisi.cpp"], + include_dirs: ["device/linaro/hikey/gralloc"], +} + +cc_library_shared { + name: "hwcomposer.drm_hikey960", + defaults: ["hwcomposer.drm_defaults"], + cppflags: ["-DUSE_HISI_IMPORTER"], + srcs: ["platformhisi.cpp"], + include_dirs: ["device/linaro/hikey/gralloc960"], +} + + +cc_library_shared { + name: "hwcomposer.drm_minigbm", + defaults: ["hwcomposer.drm_defaults"], + srcs: ["platformminigbm.cpp"], + include_dirs: ["external/minigbm/cros_gralloc"], +} + diff --git a/Android.mk b/Android.mk deleted file mode 100644 index d5ee200..0000000 --- a/Android.mk +++ /dev/null @@ -1,114 +0,0 @@ -# Copyright (C) 2015 The Android Open Source Project -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -ifeq ($(strip $(BOARD_USES_DRM_HWCOMPOSER)),true) - -DRM_HWC_ANDROID_MAJOR_VERSION := $(word 1, $(subst ., , $(PLATFORM_VERSION))) - -LOCAL_PATH := $(call my-dir) - -common_drm_hwcomposer_cflags := \ - -Wall \ - -Werror \ - -# ===================== -# libdrmhwc_utils.a -# ===================== -include $(CLEAR_VARS) - -LOCAL_SRC_FILES := \ - worker.cpp - -LOCAL_CFLAGS := $(common_drm_hwcomposer_cflags) - -LOCAL_MODULE := libdrmhwc_utils -LOCAL_VENDOR_MODULE := true - -include $(BUILD_STATIC_LIBRARY) - -# ===================== -# hwcomposer.drm.so -# ===================== -include $(CLEAR_VARS) - -LOCAL_SHARED_LIBRARIES := \ - libcutils \ - libdrm \ - libhardware \ - liblog \ - libsync \ - libui \ - libutils - -LOCAL_STATIC_LIBRARIES := libdrmhwc_utils - -LOCAL_C_INCLUDES := \ - system/core/libsync - -LOCAL_SRC_FILES := \ - autolock.cpp \ - resourcemanager.cpp \ - drmdevice.cpp \ - drmconnector.cpp \ - drmcrtc.cpp \ - drmdisplaycomposition.cpp \ - drmdisplaycompositor.cpp \ - drmencoder.cpp \ - drmeventlistener.cpp \ - drmhwctwo.cpp \ - drmmode.cpp \ - drmplane.cpp \ - drmproperty.cpp \ - hwcutils.cpp \ - platform.cpp \ - platformdrmgeneric.cpp \ - vsyncworker.cpp - -LOCAL_CFLAGS := $(common_drm_hwcomposer_cflags) - -LOCAL_CPPFLAGS += \ - -DHWC2_USE_CPP11 \ - -DHWC2_INCLUDE_STRINGIFICATION - -ifneq ($(filter 2 3 4 5 6 7 8, $(DRM_HWC_ANDROID_MAJOR_VERSION)),) -LOCAL_CPPFLAGS += -DHWC2_USE_OLD_GB_IMPORT -endif - - -ifeq ($(TARGET_PRODUCT),hikey960) -LOCAL_CPPFLAGS += -DUSE_HISI_IMPORTER -LOCAL_SRC_FILES += platformhisi.cpp -LOCAL_C_INCLUDES += device/linaro/hikey/gralloc960/ -else ifeq ($(TARGET_PRODUCT),hikey) -LOCAL_CPPFLAGS += -DUSE_HISI_IMPORTER -LOCAL_SRC_FILES += platformhisi.cpp -LOCAL_C_INCLUDES += device/linaro/hikey/gralloc/ -else ifeq ($(strip $(BOARD_DRM_HWCOMPOSER_BUFFER_IMPORTER)),minigbm) -LOCAL_SRC_FILES += platformminigbm.cpp -LOCAL_C_INCLUDES += external/minigbm/cros_gralloc/ -else -LOCAL_CPPFLAGS += -DUSE_DRM_GENERIC_IMPORTER -endif - -LOCAL_MODULE := hwcomposer.drm -LOCAL_MODULE_TAGS := optional -LOCAL_MODULE_RELATIVE_PATH := hw -LOCAL_MODULE_CLASS := SHARED_LIBRARIES -LOCAL_MODULE_SUFFIX := $(TARGET_SHLIB_SUFFIX) -LOCAL_VENDOR_MODULE := true - -include $(BUILD_SHARED_LIBRARY) - -include $(call all-makefiles-under,$(LOCAL_PATH)) -endif diff --git a/tests/Android.bp b/tests/Android.bp new file mode 100644 index 0000000..058faa0 --- /dev/null +++ b/tests/Android.bp @@ -0,0 +1,13 @@ + + +cc_test { + name: "hwc-drm-tests", + + srcs: ["worker_test.cpp"], + + vendor: true, + header_libs: ["libhardware_headers"], + static_libs: ["libdrmhwc_utils"], + shared_libs: ["hwcomposer.drm"], + include_dirs: ["external/drm_hwcomposer"], +} diff --git a/tests/Android.mk b/tests/Android.mk deleted file mode 100644 index b498d62..0000000 --- a/tests/Android.mk +++ /dev/null @@ -1,15 +0,0 @@ -LOCAL_PATH := $(call my-dir) - -include $(CLEAR_VARS) - -LOCAL_SRC_FILES := \ - worker_test.cpp - -LOCAL_MODULE := hwc-drm-tests -LOCAL_VENDOR_MODULE := true -LOCAL_HEADER_LIBRARIES := libhardware_headers -LOCAL_STATIC_LIBRARIES := libdrmhwc_utils -LOCAL_SHARED_LIBRARIES := hwcomposer.drm -LOCAL_C_INCLUDES := external/drm_hwcomposer - -include $(BUILD_NATIVE_TEST) |