qcacld-3.0: Makefile: Avoid overwriting KBUILD_OPTIONS

The new Android build infrastructure will invoke the Makefile
instead of invoking Kbuild. Update the Makefile logic to not
set KBUILD_OPTIONS if they are already set since this is an
indication that the Makefile is being invoked via Android.mk.

Change-Id: I0442d083be4a9e335d683ab864d5fa8a1f18ac4a
CRs-Fixed: 2852886
This commit is contained in:
Jeff Johnson
2021-01-11 13:40:53 -08:00
committed by snandini
parent d7e399e977
commit 2250571881

View File

@@ -11,6 +11,7 @@ KERNEL_SRC ?= /lib/modules/$(shell uname -r)/build
# module source directory.
M ?= $(shell pwd)
ifeq ($(WLAN_ROOT),)
# WLAN_ROOT must contain an absolute path (i.e. not a relative path)
KBUILD_OPTIONS := WLAN_ROOT=$(shell cd $(KERNEL_SRC); readlink -e $(M))
KBUILD_OPTIONS += MODNAME?=wlan
@@ -21,6 +22,7 @@ KBUILD_OPTIONS += CONFIG_QCA_WIFI_ISOC=0
KBUILD_OPTIONS += CONFIG_QCA_WIFI_2_0=1
KBUILD_OPTIONS += $(WLAN_SELECT)
KBUILD_OPTIONS += $(KBUILD_EXTRA) # Extra config if any
endif
all:
$(MAKE) -C $(KERNEL_SRC) M=$(M) modules $(KBUILD_OPTIONS)