allow O= usage for Linux 2.6 kernel building in another directory
parent
6c16cbd404
commit
e86fc9f47f
|
@ -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
|
||||
|
|
|
@ -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
|
||||
|
|
Loading…
Reference in New Issue