summaryrefslogtreecommitdiff
path: root/v4l/Makefile
diff options
context:
space:
mode:
authorMauro Carvalho Chehab <mchehab@infradead.org>2007-10-10 02:30:53 +0200
committerMauro Carvalho Chehab <mchehab@infradead.org>2007-10-10 02:30:53 +0200
commit0fa4e28d719e57762b334bf008d806d1150388d7 (patch)
tree075961787dc62478bf260994352919429dc8286a /v4l/Makefile
parentcd5915013429e7f2263a7f53ead5f36f9563300a (diff)
downloadmediapointer-dvb-s2-0fa4e28d719e57762b334bf008d806d1150388d7.tar.gz
mediapointer-dvb-s2-0fa4e28d719e57762b334bf008d806d1150388d7.tar.bz2
build: fix builds with kernel headers
From: Maxim Levitsky <maximlevitsky@gmail.com> /lib/modules/$(uname -r)/source isn't available if only kernel-headers were installed. use /lib/modules/$(uname -r)/build in that case Signed-off-by: Maxim Levitsky <maximlevitsky@gmail.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
Diffstat (limited to 'v4l/Makefile')
-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