summaryrefslogtreecommitdiff
path: root/v4l/Makefile
diff options
context:
space:
mode:
authorMauro Carvalho Chehab <mchehab@infradead.org>2006-06-21 15:26:11 -0300
committerMauro Carvalho Chehab <mchehab@infradead.org>2006-06-21 15:26:11 -0300
commit37cd1fdb9dd4dc835d2cbd05ebd12b39593bfd42 (patch)
tree974f630d6a67db2bd28e20fc55a3f076483d36e4 /v4l/Makefile
parent16659a1919874e2a99f44778de6594b8a6b3f65f (diff)
parent6cfc8eeff6261fb1153a67e5bc3c71616f332044 (diff)
downloadmediapointer-dvb-s2-37cd1fdb9dd4dc835d2cbd05ebd12b39593bfd42.tar.gz
mediapointer-dvb-s2-37cd1fdb9dd4dc835d2cbd05ebd12b39593bfd42.tar.bz2
merge: http://linuxtv.org/hg/~rmcc/v4l-dvb
From: Mauro Carvalho Chehab <mchehab@infradead.org> Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
Diffstat (limited to 'v4l/Makefile')
-rw-r--r--v4l/Makefile32
1 files changed, 18 insertions, 14 deletions
diff --git a/v4l/Makefile b/v4l/Makefile
index d20e68d4e..881329d7d 100644
--- a/v4l/Makefile
+++ b/v4l/Makefile
@@ -17,7 +17,12 @@ else
ifneq ($(SRCDIR),)
KDIR := $(SRCDIR)
else
+ifneq ($(KERNELRELEASE),)
KDIR := /lib/modules/$(KERNELRELEASE)/build
+else
+KDIR := /lib/modules/$(shell uname -r|perl -ne 'if (/^([0-9]*)\.([0-9])*\.([0-9]*)(.*)$$/) { printf ("%s.%s.%s%s\n",$$1,$$2,$$3,$$4); };')/build
+
+endif
endif
endif
@@ -133,9 +138,6 @@ remove rminstall:: media-rminstall ivtv-rminstall
#################################################
# Compiling preparation rules
-Makefile.media:: .version
- scripts/make_makefile.pl
-
.version::
ifneq ($(KERNELRELEASE),)
@echo -e VERSION=$(VERSION)\\nPATCHLEVEL:=$(PATCHLEVEL)\\nSUBLEVEL:=$(SUBLEVEL)\\nKERNELRELEASE:=$(KERNELRELEASE) > $(obj)/.version
@@ -147,6 +149,9 @@ else
@uname -r|perl -ne 'if (/^([0-9]*)\.([0-9])*\.([0-9]*)(.*)$$/) { printf ("VERSION=%s\nPATCHLEVEL:=%s\nSUBLEVEL:=%s\nKERNELRELEASE:=%s.%s.%s%s\n",$$1,$$2,$$3,$$1,$$2,$$3,$$4); };' > $(obj)/.version
endif
+Makefile.media:: .version
+ scripts/make_makefile.pl $(KDIR)
+
release::
ifneq ($(VER),)
@echo "Forcing compiling to version $(VER)."
@@ -216,8 +221,9 @@ clean::
distclean:: clean
-rm -f .version .*.o.flags .*.o.d Makefile.media \
- Kconfig Kconfig.kern .config .config.cmd
+ Kconfig Kconfig.kern .config .config.cmd .myconfig
-rm -rf .tmp_versions
+ -rm -f scripts/lxdialog scripts/kconfig
@find .. -name '*.orig' -exec rm '{}' \;
@find .. -name '*.rej' -exec rm '{}' \;
@@ -250,29 +256,27 @@ LXDIALOG_DIR := $(shell if [ -d $(KDIR)/scripts/kconfig/lxdialog ]; then echo kc
LXDIALOG_LNK := $(if $(LXDIALOG_DIR),scripts/kconfig,scripts/lxdialog)
LXDIALOG := $(KDIR)/scripts/$(LXDIALOG_DIR)lxdialog/lxdialog
+.myconfig : .config
+ ./scripts/make_myconfig.pl
+
xconfig:: links .version $(QCONF)
- ./scripts/make_kconfig.pl
+ ./scripts/make_kconfig.pl $(KDIR)
$(QCONF) Kconfig
- ./scripts/make_noconfig.pl
gconfig:: links .version $(GCONF)
- ./scripts/make_kconfig.pl
+ ./scripts/make_kconfig.pl $(KDIR)
$(QCONF) Kconfig
- ./scripts/make_noconfig.pl
config:: links .version $(CONF)
- ./scripts/make_kconfig.pl
+ ./scripts/make_kconfig.pl $(KDIR)
$(CONF) Kconfig
- ./scripts/make_noconfig.pl
menuconfig:: links .version $(MCONF) lxdialog
- ./scripts/make_kconfig.pl
+ ./scripts/make_kconfig.pl $(KDIR)
$(MCONF) Kconfig
- ./scripts/make_noconfig.pl
allyesconfig allmodconfig:: links .version
- ./scripts/make_kconfig.pl 1
- ./scripts/make_noconfig.pl
+ ./scripts/make_kconfig.pl $(KDIR) 1
# rule to build kernel conf programs
KMAKEVARS := config-targets=1 mixed-targets=0 dot-config=0