diff options
Diffstat (limited to 'kernel/Makefile')
| -rw-r--r-- | kernel/Makefile | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/kernel/Makefile b/kernel/Makefile index aef7129..98adfd4 100644 --- a/kernel/Makefile +++ b/kernel/Makefile @@ -25,14 +25,17 @@ KBUILD_MODPOST_WARN := 1 # Use symbols from host nvidia.ko (path resolved relative to this repo) KBUILD_EXTRA_SYMBOLS := $(abspath $(src)/../nvidia-open-gpu-kernel-modules/kernel-open/Module.symvers) +# Use $(CURDIR), NOT $(PWD): when invoked via the top-level Makefile +# (make -C kernel), $(PWD) still points at the caller's directory and kbuild +# silently builds nothing (the "stale .ko" trap). all: - $(MAKE) -C /lib/modules/$(shell uname -r)/build M=$(PWD) modules + $(MAKE) -C /lib/modules/$(shell uname -r)/build M=$(CURDIR) modules clean: - $(MAKE) -C /lib/modules/$(shell uname -r)/build M=$(PWD) clean + $(MAKE) -C /lib/modules/$(shell uname -r)/build M=$(CURDIR) clean install: - $(MAKE) -C /lib/modules/$(shell uname -r)/build M=$(PWD) modules_install + $(MAKE) -C /lib/modules/$(shell uname -r)/build M=$(CURDIR) modules_install depmod -a .PHONY: all clean install
\ No newline at end of file |
