summaryrefslogtreecommitdiff
path: root/linux-core/Makefile
diff options
context:
space:
mode:
Diffstat (limited to 'linux-core/Makefile')
-rw-r--r--linux-core/Makefile11
1 files changed, 11 insertions, 0 deletions
diff --git a/linux-core/Makefile b/linux-core/Makefile
index 3d56c96c..066766a7 100644
--- a/linux-core/Makefile
+++ b/linux-core/Makefile
@@ -41,6 +41,10 @@ RUNNING_REL := $(shell uname -r)
LINUXDIR := /lib/modules/$(RUNNING_REL)/build
endif
+ifndef O
+O := $(LINUXDIR)
+endif
+
MACHINE := $(shell uname -m)
# Modules for all architectures
@@ -154,6 +158,13 @@ endif
endif
ifneq ($(HAVECONFIG),y)
+ifneq ($(0),$(LINUXDIR))
+GETCONFIG += O=$(O)
+endif
+HAVECONFIG := $(shell if [ -e $(O)/.config ]; then echo y; fi)
+endif
+
+ifneq ($(HAVECONFIG),y)
$(error Cannot find a kernel config file)
endif