driver/egis: Update Makefile to make the building compatible

motorola/kernel/modules/drivers/input/misc/rbs_fod_mmi/Makefile: update
the option M with predefined value if possible

Kernel 5.10 already defines the value of option M before the module
building, and module building should use that predefined value.
Refer: gerrit commit: https://gerrit.mot.com/#/c/1992052/

Change-Id: I9e1f6f0985e95c8bde448d97342c613c1cf169df
Signed-off-by: chengql2 <chengql2@motorola.com>
Reviewed-on: https://gerrit.mot.com/2220453
SME-Granted: SME Approvals Granted
SLTApproved: Slta Waiver
Tested-by: Jira Key
Reviewed-by: Yan Zhang <zhangy26@motorola.com>
Reviewed-by: Tao Sun <suntao2@motorola.com>
Submit-Approved: Jira Key
This commit is contained in:
chengql2 2022-03-18 21:45:21 +08:00 • committed by Qiuliang Cheng
commit c735ea755d

View file

@ -1,10 +1,14 @@
KERNEL_SRC ?= /lib/modules/$(shell uname -r)/build
all: modules
all:
$(MAKE) -C $(KERNEL_SRC) M=$(shell pwd) modules $(KBUILD_OPTIONS)
modules:
$(MAKE) -C $(KERNEL_SRC) M=$(M) modules $(KBUILD_OPTIONS)
modules_install:
$(MAKE) INSTALL_MOD_STRIP=1 -C $(KERNEL_SRC) M=$(shell pwd) modules_install
$(MAKE) INSTALL_MOD_STRIP=1 -C $(KERNEL_SRC) M=$(M) modules_install
%:
$(MAKE) -C $(KERNEL_SRC) M=$(M) $@ $(KBUILD_OPTIONS)
clean:
$(MAKE) -C $(KERNEL_SRC) M=$(PWD) clean
rm -f *.o *.ko *.mod.c *.mod.o *~ .*.cmd Module.symvers
rm -rf .tmp_versions