Minor makefile tweak to compile with elfutils-0.138

Explicitly specify that this module is only built on linux-x86 and
darwin-x86

Change-Id: I2dba02b25c655af114417fc222a697e4d5294602
diff --git a/tools/elftree/Android.mk b/tools/elftree/Android.mk
index 0bba0f2..c2199aa 100644
--- a/tools/elftree/Android.mk
+++ b/tools/elftree/Android.mk
@@ -14,6 +14,10 @@
 
 LOCAL_PATH := $(call my-dir)
 
+supported_platforms := linux-x86 darwin-x86
+cur_platform := $(filter $(HOST_OS)-$(HOST_ARCH),$(supported_platforms))
+
+ifdef cur_platform
 
 # Target executable
 # TODO: Requires libelf for target
@@ -35,5 +39,10 @@
 LOCAL_MODULE := elftree
 LOCAL_SRC_FILES := elftree.c
 LOCAL_C_INCLUDES := external/elfutils/libelf
+# to fix compatibility issues in elf headers across different platforms
+LOCAL_CFLAGS += \
+	-include external/elfutils/host-$(HOST_OS)-fixup/AndroidFixup.h
 LOCAL_STATIC_LIBRARIES := libelf
 include $(BUILD_HOST_EXECUTABLE)
+
+endif #cur_platform