OSDN Git Service

fix build error
[android-x86/external-IA-Hardware-Composer.git] / Android.mk
index 8dbabf7..b49afbd 100644 (file)
@@ -1,4 +1,4 @@
-# Copyright (C) 2015 The Android Open Source Project
+# Copyright (c) 2017 Intel Corporation
 #
 # Licensed under the Apache License, Version 2.0 (the "License");
 # you may not use this file except in compliance with the License.
 # See the License for the specific language governing permissions and
 # limitations under the License.
 
-ifeq ($(strip $(BOARD_USES_IA_HWCOMPOSER)),true)
 
-LOCAL_PATH := $(call my-dir)
-include $(CLEAR_VARS)
-
-LOCAL_SHARED_LIBRARIES := \
-       libcutils \
-       libdrm \
-       libEGL \
-       libGLESv2 \
-       libhardware \
-       liblog \
-       libsync \
-       libui \
-       libutils
-
-
-LOCAL_C_INCLUDES := \
-       system/core/include/utils \
-       system/core/libsync \
-       system/core/libsync/include \
-       $(LOCAL_PATH)/public \
-       $(LOCAL_PATH)/common/core \
-       $(LOCAL_PATH)/common/compositor \
-       $(LOCAL_PATH)/common/compositor/gl \
-       $(LOCAL_PATH)/common/display \
-       $(LOCAL_PATH)/common/utils \
-       $(LOCAL_PATH)/common/watchers \
-       $(LOCAL_PATH)/os/android
-
-LOCAL_SRC_FILES := \
-       common/compositor/compositor.cpp \
-       common/compositor/factory.cpp \
-       common/compositor/nativesurface.cpp \
-       common/compositor/renderstate.cpp \
-       common/core/hwclayer.cpp \
-       common/core/gpudevice.cpp \
-       common/core/nativesync.cpp \
-       common/core/overlaybuffer.cpp \
-       common/core/overlaybuffermanager.cpp \
-       common/core/overlaylayer.cpp \
-       common/display/display.cpp \
-       common/display/displayplane.cpp \
-       common/display/displayplanemanager.cpp \
-       common/display/displayqueue.cpp \
-       common/display/headless.cpp \
-       common/display/vblankeventhandler.cpp \
-        common/display/kmsfencehandler.cpp \
-       common/display/virtualdisplay.cpp \
-       common/utils/drmscopedtypes.cpp \
-       common/utils/fdhandler.cpp \
-       common/utils/hwcevent.cpp \
-       common/utils/hwcthread.cpp \
-       common/utils/hwcutils.cpp \
-       common/utils/disjoint_layers.cpp \
-       os/android/grallocbufferhandler.cpp \
-       os/android/drmhwctwo.cpp
-
-LOCAL_CPPFLAGS += \
-       -DHWC2_USE_CPP11 \
-       -DHWC2_INCLUDE_STRINGIFICATION \
-       -DUSE_ANDROID_SYNC \
-       -DUSE_ANDROID_SHIM \
-       -O2 \
-       -D_FORTIFY_SOURCE=2 \
-       -fstack-protector-strong \
-       -Wformat -Wformat-security
-
-ifeq ($(strip $(BOARD_DISABLE_NATIVE_COLOR_MODES)),true)
-LOCAL_CPPFLAGS += -DDISABLE_NATIVE_COLOR_MODES
-endif
-
-ifeq ($(strip $(BOARD_ENABLE_EXPLICIT_SYNC)),false)
-LOCAL_CPPFLAGS += -DDISABLE_EXPLICIT_SYNC
-endif
+ifeq ($(strip $(BOARD_USES_IA_HWCOMPOSER)), true)
 
-ifeq ($(strip $(BOARD_USES_VULKAN)),)
-LOCAL_CPPFLAGS += \
-       -DUSE_GL
+# Obtain root HWC source path
+HWC_PATH := $(call my-dir)
+include $(CLEAR_VARS)
+include $(HWC_PATH)/Android.common.mk
 
-LOCAL_SRC_FILES += \
-       common/compositor/gl/glprogram.cpp \
-       common/compositor/gl/glrenderer.cpp \
-       common/compositor/gl/glsurface.cpp \
-       common/compositor/gl/egloffscreencontext.cpp \
-       common/compositor/gl/nativeglresource.cpp \
-       common/compositor/gl/shim.cpp \
-       common/compositor/scopedrendererstate.cpp
-endif
-
-ifeq ($(strip $(BOARD_USES_MINIGBM)),true)
-LOCAL_CPPFLAGS += -DUSE_MINIGBM
-LOCAL_C_INCLUDES += \
-       $(INTEL_MINIGBM)/cros_gralloc/
-else
-LOCAL_C_INCLUDES += \
-       $(INTEL_DRM_GRALLOC)
-endif
+LOCAL_WHOLE_STATIC_LIBRARIES := \
+       libhwcomposer_common \
+       libhwcomposer_wsi
 
 LOCAL_MODULE := hwcomposer.$(TARGET_BOARD_PLATFORM)
 LOCAL_MODULE_TAGS := optional
-#Preffered paths for all vendor hals /vendor/lib/hw
+# Preffered paths for all vendor hals /vendor/lib/hw
 LOCAL_PROPRIETARY_MODULE := true
 LOCAL_MODULE_RELATIVE_PATH := hw
 LOCAL_MODULE_CLASS := SHARED_LIBRARIES
 LOCAL_MODULE_SUFFIX := $(TARGET_SHLIB_SUFFIX)
 include $(BUILD_SHARED_LIBRARY)
 
+ifeq ($(strip $(TARGET_USES_HWC2)), true)
+# libhwcservice
+HWC_BUILD_DIRS := \
+$(HWC_PATH)/os/android/libhwcservice/Android.mk \
+$(HWC_PATH)/os/android/libhwcservice/test/Android.mk \
+
+# Include tests only if eng build
+ifneq (,$(filter eng,$(TARGET_BUILD_VARIANT)))
+#include $(HWC_PATH)/tests/hwc-val/tests/hwc/Android.mk
+endif
+
+include $(HWC_BUILD_DIRS)
+endif
+
+# Static lib: libhwcomposer_common and libhwcomposer_wsi
+include $(HWC_PATH)/common/Android.mk
+include $(HWC_PATH)/wsi/Android.mk
+
 endif