From e86fc9f47f05f47375d5a306fe979012e3b7e8e4 Mon Sep 17 00:00:00 2001 From: Dave Airlie Date: Wed, 14 Jul 2004 12:14:37 +0000 Subject: allow O= usage for Linux 2.6 kernel building in another directory --- linux/Makefile | 11 +++++++++++ 1 file changed, 11 insertions(+) (limited to 'linux/Makefile') diff --git a/linux/Makefile b/linux/Makefile index 3d56c96c..066766a7 100644 --- a/linux/Makefile +++ b/linux/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 @@ -153,6 +157,13 @@ RHCONFIG := 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 -- cgit v1.2.3