summaryrefslogtreecommitdiff
blob: 23d435b6687e5b81a0f913e4cfda52fec226f186 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
diff --git a/Makefile b/Makefile
index cca9c4f..a304043 100644
--- a/Makefile
+++ b/Makefile
@@ -19,7 +19,14 @@ ifndef KDIR
 KDIR = /lib/modules/$(shell uname -r)/build
 endif
 
+ifndef ARCH
+ARCH := $(shell uname -m)
+endif
+ARCH := $(shell echo ${ARCH} | sed -e 's/_64$$//')
+
 CFLAGS += -I${KDIR}/include
+d=${KDIR}/arch/${ARCH}/include
+CFLAGS += $(shell test -d ${d} && echo -I${d})
 CFLAGS += -O -Wall
 
 Cmd = umount.aufs auchk aubrsync