diff options
author | Dave Airlie <airlied@linux.ie> | 2004-07-14 12:14:37 +0000 |
---|---|---|
committer | Dave Airlie <airlied@linux.ie> | 2004-07-14 12:14:37 +0000 |
commit | e86fc9f47f05f47375d5a306fe979012e3b7e8e4 (patch) | |
tree | 59ec4aaab7480de2ef37858f93e12d92828f5b6f | |
parent | 6c16cbd40469d2690b293ef854de7a1f7246b998 (diff) |
allow O= usage for Linux 2.6 kernel building in another directory
-rw-r--r-- | linux-core/Makefile | 11 | ||||
-rw-r--r-- | linux/Makefile | 11 |
2 files changed, 22 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 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 @@ -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 |