diff options
| -rw-r--r-- | Makefile | 12 |
1 files changed, 11 insertions, 1 deletions
| @@ -149,7 +149,17 @@ else | |||
| 149 | _all: modules | 149 | _all: modules |
| 150 | endif | 150 | endif |
| 151 | 151 | ||
| 152 | srctree := $(if $(KBUILD_SRC),$(KBUILD_SRC),.) | 152 | ifeq ($(KBUILD_SRC),) |
| 153 | # building in the source tree | ||
| 154 | srctree := . | ||
| 155 | else | ||
| 156 | ifeq ($(KBUILD_SRC)/,$(dir $(CURDIR))) | ||
| 157 | # building in a subdirectory of the source tree | ||
| 158 | srctree := .. | ||
| 159 | else | ||
| 160 | srctree := $(KBUILD_SRC) | ||
| 161 | endif | ||
| 162 | endif | ||
| 153 | objtree := . | 163 | objtree := . |
| 154 | src := $(srctree) | 164 | src := $(srctree) |
| 155 | obj := $(objtree) | 165 | obj := $(objtree) |
