1 diff --git a/vmblock-only/Makefile b/vmblock-only/Makefile
2 index e7d18b5..02e2cf3 100644
3 --- a/vmblock-only/Makefile
4 +++ b/vmblock-only/Makefile
5 @@ -14,9 +14,9 @@ SRCROOT = .
6 VM_UNAME = $(shell uname -r)
8 # Header directory for the running kernel
9 -HEADER_DIR = /lib/modules/$(VM_UNAME)/build/include
10 +HEADER_DIR = $(KERNEL_DIR)
12 -BUILD_DIR = $(HEADER_DIR)/..
13 +BUILD_DIR = $(KBUILD_OUTPUT)
17 diff --git a/vmmon-only/Makefile b/vmmon-only/Makefile
18 index 1707ffc..165da0a 100644
19 --- a/vmmon-only/Makefile
20 +++ b/vmmon-only/Makefile
21 @@ -14,9 +14,9 @@ SRCROOT = .
22 VM_UNAME = $(shell uname -r)
24 # Header directory for the running kernel
25 -HEADER_DIR = /lib/modules/$(VM_UNAME)/build/include
26 +HEADER_DIR = $(KERNEL_DIR)
28 -BUILD_DIR = $(HEADER_DIR)/..
29 +BUILD_DIR = $(KBUILD_OUTPUT)
33 diff --git a/vmnet-only/Makefile b/vmnet-only/Makefile
34 index cd24c8c..a085f96 100644
35 --- a/vmnet-only/Makefile
36 +++ b/vmnet-only/Makefile
37 @@ -14,9 +14,9 @@ SRCROOT = .
38 VM_UNAME = $(shell uname -r)
40 # Header directory for the running kernel
41 -HEADER_DIR = /lib/modules/$(VM_UNAME)/build/include
42 +HEADER_DIR = $(KERNEL_DIR)
44 -BUILD_DIR = $(HEADER_DIR)/..
45 +BUILD_DIR = $(KBUILD_OUTPUT)