aports/testing/virtualbox/013-Makefile.patch
Díaz Urbaneja Víctor Diego Alejandro (Sodomon) d48dd8be9d testing/virtualbox: new aport
General-purpose full virtualizer for x86 hardware.
https://www.virtualbox.org
2024-06-21 07:04:08 +00:00

42 lines
1.1 KiB
Diff

--- a/src/VBox/HostDrivers/linux/Makefile
+++ b/src/VBox/HostDrivers/linux/Makefile
@@ -23,25 +23,25 @@
# terms and conditions of either the GPL or the CDDL or both.
#
-ifneq ($(KERNELRELEASE),)
+ifneq ($(KBUILD_EXTMOD),)
-# Building from kBuild (make -C <kernel_directory> M=`pwd`),
-# or inside a kernel source tree.
+# Building from kBuild (make -C <kernel_directory> M=`pwd`).
+# KBUILD_EXTMOD is set to $(M) in this case.
obj-m = vboxdrv/
-ifneq ($(wildcard $(CURDIR)/vboxnetflt/Makefile),)
+ifneq ($(wildcard $(KBUILD_EXTMOD)/vboxnetflt/Makefile),)
obj-m += vboxnetflt/
endif
-ifneq ($(wildcard $(CURDIR)/vboxnetadp/Makefile),)
+ifneq ($(wildcard $(KBUILD_EXTMOD)/vboxnetadp/Makefile),)
obj-m += vboxnetadp/
endif
-ifneq ($(wildcard $(CURDIR)/vboxpci/Makefile),)
+ifneq ($(wildcard $(KBUILD_EXTMOD)/vboxpci/Makefile),)
obj-m += vboxpci/
endif
-else # ! KERNELRELEASE
+else # ! KBUILD_EXTMOD
-# convenience Makefile without KERNELRELEASE
+# convenience Makefile without KBUILD_EXTMOD
KBUILD_VERBOSE ?=
KERN_VER ?= $(shell uname -r)
@@ -146,4 +146,4 @@
fi; \
done
-endif # ! KERNELRELEASE
+endif # ! KBUILD_EXTMOD