qcacld-3.0: Kbuild: Refine add-wlan-objs

The current implementation of add-wlan-objs does not work correctly
with GNU Make 3.81 which is widely in use. So refine the function in a
manner that works with 3.81 as well as newer versions of Make.

Change-Id: Ic689367cccc16cf6ab23eeeb58665d84c5db3a26
CRs-Fixed: 2903606
This commit is contained in:
Paul Zhang 2021-04-02 15:17:20 +08:00 committed by snandini
parent 95f8f86e54
commit eca38e5722

18
Kbuild
View File

@ -51,17 +51,19 @@ OBJS :=
OBJS_DIRS :=
define add-wlan-objs
$(eval
ifneq ($$(2),)
ifeq ($$(KERNEL_SUPPORTS_NESTED_COMPOSITES),y)
OBJS_DIRS += $$(dir $$(2))
OBJS += $$(1).o
$$(1)-y := $$(2)
$(eval $(_add-wlan-objs))
endef
define _add-wlan-objs
ifneq ($(2),)
ifeq ($(KERNEL_SUPPORTS_NESTED_COMPOSITES),y)
OBJS_DIRS += $(dir $(2))
OBJS += $(1).o
$(1)-y := $(2)
else
OBJS += $$(2)
OBJS += $(2)
endif
endif
)
endef
############ UAPI ############