summaryrefslogtreecommitdiff
path: root/v4l/Makefile
diff options
context:
space:
mode:
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