[i-g-t,v2] tools/Android.mk: Fix compile error in intel_reg.c
diff mbox

Message ID 1441817495-7145-1-git-send-email-derek.j.morton@intel.com
State New
Headers show

Commit Message

Derek Morton Sept. 9, 2015, 4:51 p.m. UTC
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@intel.com>
---
 tools/Android.mk | 12 ++++++++++++
 1 file changed, 12 insertions(+)

Patch
diff mbox

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 \