From 791198a54b1182860e240d57f35cb02b1bcceca3 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Tapani=20P=C3=A4lli?= Date: Tue, 5 Mar 2019 09:24:16 +0200 Subject: [PATCH] android: Build fixes for OMR1 MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit Some of the header file locations are changed between Android versions (when VNDK is used), patch makes sure we get all the required headers. v2: cleanups, put SDK version checks in all places (Tapani) Signed-off-by: Tapani Pälli Signed-off-by: Chen Lin Z Tested-by: Clayton Craft Acked-by: Eric Engestrom --- src/egl/Android.mk | 7 +++++++ src/intel/Android.vulkan.mk | 20 ++++++++++++++++++++ src/vulkan/Android.mk | 8 ++++++++ 3 files changed, 35 insertions(+) diff --git a/src/egl/Android.mk b/src/egl/Android.mk index e78dd48f3ec..a9319f56ae7 100644 --- a/src/egl/Android.mk +++ b/src/egl/Android.mk @@ -59,6 +59,13 @@ LOCAL_SHARED_LIBRARIES := \ libcutils \ libsync +ifeq ($(shell test $(PLATFORM_SDK_VERSION) -ge 27; echo $$?), 0) +LOCAL_C_INCLUDES += \ + frameworks/native/libs/nativewindow/include \ + frameworks/native/libs/arect/include +LOCAL_HEADER_LIBRARIES += libnativebase_headers +endif + ifeq ($(BOARD_USES_DRM_GRALLOC),true) LOCAL_CFLAGS += -DHAVE_DRM_GRALLOC LOCAL_SHARED_LIBRARIES += libgralloc_drm diff --git a/src/intel/Android.vulkan.mk b/src/intel/Android.vulkan.mk index 5b6acbe8412..f38decbf308 100644 --- a/src/intel/Android.vulkan.mk +++ b/src/intel/Android.vulkan.mk @@ -41,6 +41,18 @@ VULKAN_COMMON_INCLUDES := \ $(MESA_TOP)/src/compiler \ frameworks/native/vulkan/include +ifeq ($(shell test $(PLATFORM_SDK_VERSION) -ge 27; echo $$?), 0) +VULKAN_COMMON_INCLUDES += \ + frameworks/native/vulkan/include \ + frameworks/native/libs/nativebase/include \ + frameworks/native/libs/nativewindow/include \ + frameworks/native/libs/arect/include + +VULKAN_COMMON_HEADER_LIBRARIES := \ + libcutils_headers \ + libhardware_headers +endif + # libmesa_anv_entrypoints with header and dummy.c # # This static library is built to pull entrypoints header @@ -110,6 +122,7 @@ LOCAL_C_INCLUDES := $(ANV_INCLUDES) LOCAL_WHOLE_STATIC_LIBRARIES := libmesa_anv_entrypoints libmesa_genxml LOCAL_SHARED_LIBRARIES := $(ANV_SHARED_LIBRARIES) +LOCAL_HEADER_LIBRARIES += $(VULKAN_COMMON_HEADER_LIBRARIES) include $(MESA_COMMON_MK) include $(BUILD_STATIC_LIBRARY) @@ -130,6 +143,7 @@ LOCAL_C_INCLUDES := $(ANV_INCLUDES) LOCAL_WHOLE_STATIC_LIBRARIES := libmesa_anv_entrypoints libmesa_genxml LOCAL_SHARED_LIBRARIES := $(ANV_SHARED_LIBRARIES) +LOCAL_HEADER_LIBRARIES += $(VULKAN_COMMON_HEADER_LIBRARIES) include $(MESA_COMMON_MK) include $(BUILD_STATIC_LIBRARY) @@ -150,6 +164,7 @@ LOCAL_C_INCLUDES := $(ANV_INCLUDES) LOCAL_WHOLE_STATIC_LIBRARIES := libmesa_anv_entrypoints libmesa_genxml LOCAL_SHARED_LIBRARIES := $(ANV_SHARED_LIBRARIES) +LOCAL_HEADER_LIBRARIES += $(VULKAN_COMMON_HEADER_LIBRARIES) include $(MESA_COMMON_MK) include $(BUILD_STATIC_LIBRARY) @@ -170,6 +185,7 @@ LOCAL_C_INCLUDES := $(ANV_INCLUDES) LOCAL_WHOLE_STATIC_LIBRARIES := libmesa_anv_entrypoints libmesa_genxml LOCAL_SHARED_LIBRARIES := $(ANV_SHARED_LIBRARIES) +LOCAL_HEADER_LIBRARIES += $(VULKAN_COMMON_HEADER_LIBRARIES) include $(MESA_COMMON_MK) include $(BUILD_STATIC_LIBRARY) @@ -190,6 +206,7 @@ LOCAL_C_INCLUDES := $(ANV_INCLUDES) LOCAL_WHOLE_STATIC_LIBRARIES := libmesa_anv_entrypoints libmesa_genxml LOCAL_SHARED_LIBRARIES := $(ANV_SHARED_LIBRARIES) +LOCAL_HEADER_LIBRARIES += $(VULKAN_COMMON_HEADER_LIBRARIES) include $(MESA_COMMON_MK) include $(BUILD_STATIC_LIBRARY) @@ -210,6 +227,7 @@ LOCAL_C_INCLUDES := $(ANV_INCLUDES) LOCAL_WHOLE_STATIC_LIBRARIES := libmesa_anv_entrypoints libmesa_genxml LOCAL_SHARED_LIBRARIES := $(ANV_SHARED_LIBRARIES) +LOCAL_HEADER_LIBRARIES += $(VULKAN_COMMON_HEADER_LIBRARIES) include $(MESA_COMMON_MK) include $(BUILD_STATIC_LIBRARY) @@ -270,6 +288,7 @@ $(intermediates)/vulkan/anv_extensions.h: $(ANV_EXTENSIONS_GEN_SCRIPT) \ --out-h $@ LOCAL_SHARED_LIBRARIES := $(ANV_SHARED_LIBRARIES) +LOCAL_HEADER_LIBRARIES += $(VULKAN_COMMON_HEADER_LIBRARIES) include $(MESA_COMMON_MK) include $(BUILD_STATIC_LIBRARY) @@ -319,6 +338,7 @@ LOCAL_WHOLE_STATIC_LIBRARIES := \ libmesa_anv_entrypoints LOCAL_SHARED_LIBRARIES := $(ANV_SHARED_LIBRARIES) libexpat libz libsync liblog +LOCAL_HEADER_LIBRARIES += $(VULKAN_COMMON_HEADER_LIBRARIES) include $(MESA_COMMON_MK) include $(BUILD_SHARED_LIBRARY) diff --git a/src/vulkan/Android.mk b/src/vulkan/Android.mk index 6253f1c3be9..99dd3f56313 100644 --- a/src/vulkan/Android.mk +++ b/src/vulkan/Android.mk @@ -39,6 +39,14 @@ LOCAL_C_INCLUDES := \ $(MESA_TOP)/include/vulkan \ $(MESA_TOP)/src/vulkan/util +ifeq ($(shell test $(PLATFORM_SDK_VERSION) -ge 27; echo $$?), 0) +LOCAL_C_INCLUDES += \ + frameworks/native/libs/nativebase/include \ + frameworks/native/libs/nativewindow/include \ + frameworks/native/libs/arect/include +LOCAL_HEADER_LIBRARIES += libcutils_headers libsystem_headers +endif + LOCAL_GENERATED_SOURCES := $(addprefix $(intermediates)/, \ $(VULKAN_UTIL_GENERATED_FILES)) -- 2.30.2