From c735ea755dcd48a2c64e0b6834c0b55c9ec3af49 Mon Sep 17 00:00:00 2001 From: chengql2 Date: Fri, 18 Mar 2022 21:45:21 +0800 Subject: [PATCH] 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 Reviewed-on: https://gerrit.mot.com/2220453 SME-Granted: SME Approvals Granted SLTApproved: Slta Waiver Tested-by: Jira Key Reviewed-by: Yan Zhang Reviewed-by: Tao Sun Submit-Approved: Jira Key --- drivers/input/misc/rbs_fod_mmi/Makefile | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) diff --git a/drivers/input/misc/rbs_fod_mmi/Makefile b/drivers/input/misc/rbs_fod_mmi/Makefile index 4191dea22679..bfbdc14740ef 100644 --- a/drivers/input/misc/rbs_fod_mmi/Makefile +++ b/drivers/input/misc/rbs_fod_mmi/Makefile @@ -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