From 0fa4e28d719e57762b334bf008d806d1150388d7 Mon Sep 17 00:00:00 2001 From: Mauro Carvalho Chehab Date: Wed, 10 Oct 2007 02:30:53 +0200 Subject: build: fix builds with kernel headers From: Maxim Levitsky /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 Signed-off-by: Mauro Carvalho Chehab --- v4l/Makefile | 6 ++++++ 1 file changed, 6 insertions(+) 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 -- cgit v1.2.3