diff --git a/Android.mk b/Android.mk index e862f324585d..c327725b9564 100644 --- a/Android.mk +++ b/Android.mk @@ -23,9 +23,8 @@ ifneq ($(findstring opensource,$(LOCAL_PATH)),) endif # opensource # Multi-ko check -LOCAL_DEV_NAME := $(lastword $(strip \ - $(subst ~, , \ - $(subst /, ,$(LOCAL_PATH))))) +LOCAL_DEV_NAME := $(patsubst .%,%,\ + $(lastword $(strip $(subst /, ,$(LOCAL_PATH))))) ifeq (1, $(strip $(shell expr $(words $(strip $(TARGET_WLAN_CHIP))) \>= 2))) @@ -40,21 +39,22 @@ endif ifeq ($(LOCAL_MULTI_KO), true) LOCAL_ANDROID_ROOT := $(shell pwd) LOCAL_WLAN_BLD_DIR := $(LOCAL_ANDROID_ROOT)/$(WLAN_BLD_DIR) -$(shell rm -rf $(LOCAL_WLAN_BLD_DIR)/qcacld-3.0/~*) +$(shell find $(LOCAL_WLAN_BLD_DIR)/qcacld-3.0/ -maxdepth 1 \ + -name '.*' ! -name '.git' -exec rm -rf {} +) $(foreach chip, $(TARGET_WLAN_CHIP), \ - $($(shell mkdir -p $(LOCAL_WLAN_BLD_DIR)/qcacld-3.0/~$(chip); \ + $($(shell mkdir -p $(LOCAL_WLAN_BLD_DIR)/qcacld-3.0/.$(chip); \ ln -sf $(LOCAL_WLAN_BLD_DIR)/qca-wifi-host-cmn \ - $(LOCAL_WLAN_BLD_DIR)/qcacld-3.0/~$(chip)/qca-wifi-host-cmn); \ + $(LOCAL_WLAN_BLD_DIR)/qcacld-3.0/.$(chip)/qca-wifi-host-cmn); \ $(foreach node, \ $(shell find $(LOCAL_WLAN_BLD_DIR)/qcacld-3.0/ -maxdepth 1 \ - ! -name '.*' ! -name '~*' ! -name '*~' \ + ! -name '.*' ! -name '*~' \ ! -name '.' ! -name 'qcacld-3.0'), \ $(shell ln -sf $(node) \ - $(LOCAL_WLAN_BLD_DIR)/qcacld-3.0/~$(chip)/$(lastword $(strip $(subst /, ,$(node)))) \ + $(LOCAL_WLAN_BLD_DIR)/qcacld-3.0/.$(chip)/$(lastword $(strip $(subst /, ,$(node)))) \ )))) -include $(foreach chip, $(TARGET_WLAN_CHIP), $(LOCAL_PATH)/~$(chip)/Android.mk) +include $(foreach chip, $(TARGET_WLAN_CHIP), $(LOCAL_PATH)/.$(chip)/Android.mk) else # Multi-ok check @@ -71,7 +71,7 @@ TARGET_MAC_BIN_PATH := /mnt/vendor/persist else -LOCAL_SRC_DIR := ~$(LOCAL_DEV_NAME) +LOCAL_SRC_DIR := .$(LOCAL_DEV_NAME) CMN_OFFSET := . WLAN_PROFILE := $(LOCAL_DEV_NAME) TARGET_FW_DIR := firmware/wlan/qca_cld/$(LOCAL_DEV_NAME)