android: radeonsi: prepare for driver-specific driconf options
authorMauro Rossi <issor.oruam@gmail.com>
Thu, 3 Aug 2017 00:55:48 +0000 (02:55 +0200)
committerEmil Velikov <emil.l.velikov@gmail.com>
Thu, 3 Aug 2017 09:55:29 +0000 (10:55 +0100)
Android build changes to avoid the following building error:

In file included from external/mesa/src/gallium/targets/dri/target.c:1:
external/mesa/src/gallium/auxiliary/target-helpers/drm_helper.h:185:10:
fatal error: 'radeonsi/si_driinfo.h' file not found
         ^
1 error generated.

Fixes: 0f8c5de869 "radeonsi: prepare for driver-specific driconf options"
Reviewed-by: Emil Velikov <emil.velikov@collabora.com>
src/gallium/auxiliary/pipe-loader/Android.mk
src/gallium/drivers/radeonsi/Android.mk

index 1e1bb11153fc7a23093d86eaf37a2e6ab6b1e907..ab844143c304d0270dec7a0161d63a4bd0404937 100644 (file)
@@ -39,7 +39,7 @@ LOCAL_SRC_FILES := \
 
 LOCAL_MODULE := libmesa_pipe_loader
 
-LOCAL_STATIC_LIBRARIES := libmesa_loader
+LOCAL_STATIC_LIBRARIES := libmesa_loader libmesa_util
 
 include $(GALLIUM_COMMON_MK)
 include $(BUILD_STATIC_LIBRARY)
index 6fff91f6f75498e6e8c5f538cf04e66414096481..4a5df5b01d844ea55ffdd95d0eb887ab87506ac1 100644 (file)
@@ -43,6 +43,23 @@ LOCAL_STATIC_LIBRARIES := libmesa_amd_common
 LOCAL_SHARED_LIBRARIES := libdrm_radeon libLLVM
 LOCAL_MODULE := libmesa_pipe_radeonsi
 
+intermediates := $(call local-generated-sources-dir)
+
+LOCAL_GENERATED_SOURCES += $(addprefix $(intermediates)/radeonsi/,$(GENERATED_SOURCES))
+
+GEN_DRIINFO_INPUTS := \
+       $(MESA_TOP)/src/gallium/auxiliary/pipe-loader/driinfo_gallium.h \
+       $(LOCAL_PATH)/driinfo_radeonsi.h
+
+MERGE_DRIINFO := $(MESA_TOP)/src/util/merge_driinfo.py
+
+$(intermediates)/radeonsi/si_driinfo.h: $(MERGE_DRIINFO) $(GEN_DRIINFO_INPUTS)
+       @mkdir -p $(dir $@)
+       @echo "Gen Header: $(PRIVATE_MODULE) <= $(notdir $(@))"
+       $(hide) $(MESA_PYTHON2) $(MERGE_DRIINFO) $(GEN_DRIINFO_INPUTS) > $@ || ($(RM) $@; false)
+
+LOCAL_EXPORT_C_INCLUDE_DIRS := $(intermediates)
+
 $(call mesa-build-with-llvm)
 
 include $(GALLIUM_COMMON_MK)