android: Build fixes for OMR1
authorTapani Pälli <tapani.palli@intel.com>
Tue, 5 Mar 2019 07:24:16 +0000 (09:24 +0200)
committerTapani Pälli <tapani.palli@intel.com>
Mon, 18 Mar 2019 09:53:59 +0000 (11:53 +0200)
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 <tapani.palli@intel.com>
Signed-off-by: Chen Lin Z <lin.z.chen@intel.com>
Tested-by: Clayton Craft <clayton.a.craft@intel.com>
Acked-by: Eric Engestrom <eric.engestrom@intel.com>
src/egl/Android.mk
src/intel/Android.vulkan.mk
src/vulkan/Android.mk

index e78dd48f3ec60e24352e3d6719c115c5fc87bcf9..a9319f56ae710c46dd315276b7fd910eba47111a 100644 (file)
@@ -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
index 5b6acbe8412515e60bca54b549ab884e9fcf288f..f38decbf3084d9a073f646351a768b1f48668a54 100644 (file)
@@ -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)
index 6253f1c3be9faa17badef784a1ac4c056af1ea36..99dd3f56313f719be1a2b5d6af723039b3090d17 100644 (file)
@@ -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))