allow O= usage for Linux 2.6 kernel building in another directory

main
Dave Airlie 2004-07-14 12:14:37 +00:00
parent 6c16cbd404
commit e86fc9f47f
2 changed files with 22 additions and 0 deletions

View File

@ -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

View File

@ -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