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
|
LINUXDIR := /lib/modules/$(RUNNING_REL)/build
|
||||||
endif
|
endif
|
||||||
|
|
||||||
|
ifndef O
|
||||||
|
O := $(LINUXDIR)
|
||||||
|
endif
|
||||||
|
|
||||||
MACHINE := $(shell uname -m)
|
MACHINE := $(shell uname -m)
|
||||||
|
|
||||||
# Modules for all architectures
|
# Modules for all architectures
|
||||||
|
@ -153,6 +157,13 @@ RHCONFIG :=
|
||||||
endif
|
endif
|
||||||
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)
|
ifneq ($(HAVECONFIG),y)
|
||||||
$(error Cannot find a kernel config file)
|
$(error Cannot find a kernel config file)
|
||||||
endif
|
endif
|
||||||
|
|
|
@ -41,6 +41,10 @@ RUNNING_REL := $(shell uname -r)
|
||||||
LINUXDIR := /lib/modules/$(RUNNING_REL)/build
|
LINUXDIR := /lib/modules/$(RUNNING_REL)/build
|
||||||
endif
|
endif
|
||||||
|
|
||||||
|
ifndef O
|
||||||
|
O := $(LINUXDIR)
|
||||||
|
endif
|
||||||
|
|
||||||
MACHINE := $(shell uname -m)
|
MACHINE := $(shell uname -m)
|
||||||
|
|
||||||
# Modules for all architectures
|
# Modules for all architectures
|
||||||
|
@ -153,6 +157,13 @@ RHCONFIG :=
|
||||||
endif
|
endif
|
||||||
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)
|
ifneq ($(HAVECONFIG),y)
|
||||||
$(error Cannot find a kernel config file)
|
$(error Cannot find a kernel config file)
|
||||||
endif
|
endif
|
||||||
|
|
Loading…
Reference in New Issue