Merge 6996743e658d6bd5347bb0d706c104c7298fb6f1 into caa2dd11a0db42e5d6130f627dd15ef404b7597d

This commit is contained in:
Erich Ritz 2024-07-12 11:15:46 -07:00 committed by GitHub
commit e9e1861691
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -28,7 +28,7 @@ else
else
KERNEL_UNAME ?= $(shell uname -r)
KERNEL_MODLIB := /lib/modules/$(KERNEL_UNAME)
KERNEL_SOURCES := $(shell test -d $(KERNEL_MODLIB)/source && echo $(KERNEL_MODLIB)/source || echo $(KERNEL_MODLIB)/build)
KERNEL_SOURCES := $(shell test -d $(KERNEL_MODLIB)/source && echo $(KERNEL_MODLIB)/source || $(shell test -d $(KERNEL_MODLIB)/build/source && echo $(KERNEL_MODLIB)/build/source || echo $(KERNEL_MODLIB)/build)
endif
KERNEL_OUTPUT := $(KERNEL_SOURCES)
@ -46,6 +46,10 @@ else
KERNEL_OUTPUT := $(KERNEL_MODLIB)/build
KBUILD_PARAMS := KBUILD_OUTPUT=$(KERNEL_OUTPUT)
endif
ifeq ($(KERNEL_SOURCES), $(KERNEL_MODLIB)/build/source)
KERNEL_OUTPUT := $(KERNEL_MODLIB)/build
KBUILD_PARAMS := KBUILD_OUTPUT=$(KERNEL_OUTPUT)
endif
endif
CC ?= cc