wlan: Update makefile to build wearable projects

Previously Makefile was supposed to compile the DLKM projects
present in vendor/qcom path.
Wearable projects are present in device/qcom path,
This change is to add build support for WEARABLE projects on
pronto and also to maintain the backward compatibility for
older build paths.

Change-Id: Ie1cbe9f667d577640f226218e9b63568812b4631
CRs-fixed: 2069733
diff --git a/Android.mk b/Android.mk
index ad25367..d97d93a 100644
--- a/Android.mk
+++ b/Android.mk
@@ -20,8 +20,22 @@
 
 LOCAL_PATH := $(call my-dir)
 
-# This makefile is only for DLKM
+ifeq ($(TARGET_SUPPORTS_WEARABLES),true)
+ifneq ($(findstring device,$(LOCAL_PATH)),)
+    WLAN_DLKM := 1
+else
+    WLAN_DLKM := 0
+endif # findstring device
+else
 ifneq ($(findstring vendor,$(LOCAL_PATH)),)
+    WLAN_DLKM := 1
+else
+    WLAN_DLKM := 0
+endif # findstring vendor
+endif # TARGET_SUPPORTS_WEARABLES
+
+# This makefile is only for DLKM
+ifeq ($(WLAN_DLKM),1)
 
 # Determine if we are Proprietary or Open Source
 ifneq ($(findstring opensource,$(LOCAL_PATH)),)
@@ -33,13 +47,21 @@
 ifeq ($(WLAN_PROPRIETARY),1)
     WLAN_BLD_DIR := vendor/qcom/proprietary/wlan
 else
+ifneq ($(TARGET_SUPPORTS_WEARABLES),true)
     WLAN_BLD_DIR := vendor/qcom/opensource/wlan
+else
+    WLAN_BLD_DIR := device/qcom/msm8909w/opensource/wlan
+endif
 endif
 
 # DLKM_DIR was moved for JELLY_BEAN (PLATFORM_SDK 16)
 ifeq (1,$(filter 1,$(shell echo "$$(( $(PLATFORM_SDK_VERSION) >= 16 ))" )))
+ifneq ($(TARGET_SUPPORTS_WEARABLES),true)
        DLKM_DIR := $(TOP)/device/qcom/common/dlkm
 else
+       DLKM_DIR := $(BOARD_DLKM_DIR)
+endif
+else
        DLKM_DIR := build/dlkm
 endif