wlan: Add support to build wearable targets for msm-4.9 kernel
When upgrading wearable targets to support msm-4.9 kernel, if
WLAN_BLD_DIR is a relative path then build is failing with the error
unable to de-refer header files defined locally.
To avoid this, use absolute path for WLAN_BLD_DIR based on
ANDROID_BUILD_TOP.
Change-Id: Ia3e5691d83dbc6a2bbe84e63cea48e2267b64503
CRs-Fixed: 2225760
diff --git a/Android.mk b/Android.mk
index e43af06..e582b54 100644
--- a/Android.mk
+++ b/Android.mk
@@ -58,9 +58,13 @@
WLAN_BLD_DIR := vendor/qcom/opensource/wlan
endif
else
+ifneq ($(ANDROID_BUILD_TOP),)
+ WLAN_BLD_DIR := $(ANDROID_BUILD_TOP)/device/qcom/msm8909w/opensource/wlan
+else
WLAN_BLD_DIR := device/qcom/msm8909w/opensource/wlan
endif
endif
+endif
# DLKM_DIR was moved for JELLY_BEAN (PLATFORM_SDK 16)
ifeq (1,$(filter 1,$(shell echo "$$(( $(PLATFORM_SDK_VERSION) >= 16 ))" )))
@@ -124,11 +128,9 @@
# This is set once per LOCAL_PATH, not per (kernel) module
-ifneq ($(TARGET_SUPPORTS_WEARABLES),true)
ifneq ($(ANDROID_BUILD_TOP),)
KBUILD_OPTIONS := WLAN_ROOT=$(WLAN_BLD_DIR)/prima
endif
-endif
ifeq ($(KBUILD_OPTIONS),)
KBUILD_OPTIONS := WLAN_ROOT=$(KERNEL_TO_BUILD_ROOT_OFFSET)$(WLAN_BLD_DIR)/prima