summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBernard Ogden <bernie.ogden@linaro.org>2015-09-08 10:29:52 +0100
committerBernard Ogden <bernie.ogden@linaro.org>2015-09-08 10:32:46 +0100
commit07ba8a0ffc591f9198e4895a6ec04cb7751ec684 (patch)
tree589fec50b1d569a9d8cf042d4f012ceb0316b566
parent03410f0b3ec5a4ee6288029a9b9a0a9c1014b170 (diff)
Cross-compile for existing rules, add native rules
Change-Id: I8350e14358bb74c1f0bd6b44f83c924bb51f86c1
-rw-r--r--Makefile12
1 files changed, 9 insertions, 3 deletions
diff --git a/Makefile b/Makefile
index 4fce947..6ff8acc 100644
--- a/Makefile
+++ b/Makefile
@@ -1,15 +1,21 @@
KERNEL_SOURCE ?= /usr/src/linux-headers-$(shell uname -r)
all:
- @echo "Select arm or arm64"
+ @echo "Select {native-,}{arm,aarch64}"
clean:
rm -rf .modex.ko.cmd .modex.mod.o.cmd .modex.o.cmd .tmp_versions/ \
Module.symvers modex.ko modex.mod.c modex.mod.o modex.o \
modules.order
+native-arm:
+ make ARCH=ARM -C $(KERNEL_SOURCE) SUBDIRS="`pwd`" modules
+
arm:
- make ARCH=arm -C $(KERNEL_SOURCE) SUBDIRS="`pwd`" modules
+ make CROSS_COMPILE=arm-linux-gnueabihf- ARCH=arm -C $(KERNEL_SOURCE) SUBDIRS="`pwd`" modules
+
+native-arm64:
+ make ARCH=arm64 -C $(KERNEL_SOURCE) SUBDIRS="`pwd`" modules
arm64:
- make ARCH=arm64 -C $(KERNEL_SOURCE) SUBDIRS="`pwd`" modules
+ make CROSS_COMPILE=aarch64-linux-gnu- ARCH=arm64 -C $(KERNEL_SOURCE) SUBDIRS="`pwd`" modules