[Intel-gfx] [PATCH i-g-t v2] tools/Android.mk: Fix compile error in intel_reg.c

Derek Morton derek.j.morton at intel.com
Wed Sep 9 09:51:35 PDT 2015


The patch "tools: install the register definition files" caused
a build error on android as it added 'PKGDATADIR' which was not
defined in the Android build environment. This patch adds that
define to tools/Android.mk. It also copies the files it points
to so they are actually in the target file system.

v2: Added local variable for tool path

Signed-off-by: Derek Morton <derek.j.morton at intel.com>
---
 tools/Android.mk | 12 ++++++++++++
 1 file changed, 12 insertions(+)

diff --git a/tools/Android.mk b/tools/Android.mk
index 0a196e4..934d3a1 100644
--- a/tools/Android.mk
+++ b/tools/Android.mk
@@ -2,6 +2,8 @@ LOCAL_PATH := $(call my-dir)
 
 include $(LOCAL_PATH)/Makefile.sources
 
+LOCAL_TOOLS_DIR := intel/validation/core/igt/tools
+
 #================#
 
 define add_tool
@@ -34,11 +36,21 @@ define add_tool
                               libdrm        \
                               libdrm_intel
 
+    # Tools dir on host
+    LOCAL_MODULE_PATH := $(TARGET_OUT_VENDOR)/$(LOCAL_TOOLS_DIR)
+    # Tools dir on target.
+    LOCAL_CFLAGS += -DPKGDATADIR=\"/system/vendor/$(LOCAL_TOOLS_DIR)\"
+
     include $(BUILD_EXECUTABLE)
 endef
 
 #================#
 
+# Copy the register files
+$(shell mkdir -p $(TARGET_OUT_VENDOR)/$(LOCAL_TOOLS_DIR)/registers)
+$(shell cp $(LOCAL_PATH)/registers/* $(TARGET_OUT_VENDOR)/$(LOCAL_TOOLS_DIR)/registers)
+
+
 skip_tools_list := \
     intel_framebuffer_dump \
     intel_reg_dumper \
-- 
1.9.1



More information about the Intel-gfx mailing list