[PATCH] Make kernel source path configurable

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Add an optional argument to the user-cs Makefile called KERNELPATH that allows
one to specify the path for kernel sources to use for the build.

Signed-off-by: Mike Waychison <mikew@xxxxxxxxxx>
---

 Makefile |    8 ++++----
 1 files changed, 4 insertions(+), 4 deletions(-)

diff --git a/Makefile b/Makefile
index 151d006..52cbfee 100644
--- a/Makefile
+++ b/Makefile
@@ -1,13 +1,13 @@
-
+KERNELPATH ?= ../linux
 # compile with debug ?
 DEBUG = -DCHECKPOINT_DEBUG
 
 # find linux architecure
-KERN_ARCH = $(shell readlink ../linux/include/asm | sed 's/^asm-//')
+KERN_ARCH = $(shell readlink $(KERNELPATH)/include/asm | sed 's/^asm-//')
 
 # look for includes
-PATHS = -I../linux/include \
-	-I../linux/arch/$(KERN_ARCH)/include
+PATHS = -I$(KERNELPATH)/include \
+	-I$(KERNELPATH)/arch/$(KERN_ARCH)/include
 
 # extra warnings and fun
 WARNS := -Wall -Wstrict-prototypes -Wno-trigraphs

_______________________________________________
Containers mailing list
Containers@xxxxxxxxxxxxxxxxxxxxxxxxxx
https://lists.linux-foundation.org/mailman/listinfo/containers

[Index of Archives]     [Cgroups]     [Netdev]     [Linux Wireless]     [Kernel Newbies]     [Security]     [Linux for Hams]     [Netfilter]     [Bugtraq]     [Yosemite Forum]     [MIPS Linux]     [ARM Linux]     [Linux RAID]     [Linux Admin]     [Samba]

  Powered by Linux