summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--v4l/Makefile6
1 files changed, 6 insertions, 0 deletions
diff --git a/v4l/Makefile b/v4l/Makefile
index 932e61da2..bb22f7e5d 100644
--- a/v4l/Makefile
+++ b/v4l/Makefile
@@ -24,7 +24,13 @@ KDIR_BASE := /lib/modules/$(KERNELRELEASE)
else
KDIR_BASE := /lib/modules/$(shell uname -r|perl -ne 'if (/^([0-9]*)\.([0-9])*\.([0-9]*)(.*)$$/) { printf ("%s.%s.%s%s\n",$$1,$$2,$$3,$$4); };')
endif
+
+ifneq ($(wildcard $(KDIR_BASE)/source),)
KDIR := $(KDIR_BASE)/source
+else
+KDIR := $(KDIR_BASE)/build
+endif
+
KDIR_OBJ := $(KDIR_BASE)/build
endif