summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--v4l/Makefile30
1 files changed, 15 insertions, 15 deletions
diff --git a/v4l/Makefile b/v4l/Makefile
index f9af44703..afea31ea8 100644
--- a/v4l/Makefile
+++ b/v4l/Makefile
@@ -30,7 +30,7 @@ endif
#################################################
# default compilation rule
-default:: config-compat.h Makefile.media links .version oss
+default:: config-compat.h Makefile.media links $(obj)/.version oss
@if [ "x$(SRCDIR)" != x ]; then echo SRCDIR is $(SRCDIR) ; fi
$(MAKE) -C $(KDIR) SUBDIRS=$(PWD) $(MYCFLAGS) modules
./scripts/rmmod.pl check
@@ -74,7 +74,7 @@ endif
# make will try to automatically rebuild the Makefile and all includes,
# and if any of them change, make will start over with the updated files
-.myconfig: .config Kconfig
+$(obj)/.myconfig: $(obj)/.config $(obj)/Kconfig
./scripts/make_myconfig.pl
# If it doesn't exist, this rule will build Makefile.media. If it does
@@ -184,7 +184,7 @@ remove rminstall:: media-rminstall ivtv-rminstall
#################################################
# Compiling preparation rules
-.version:
+$(obj)/.version:
ifneq ($(KERNELRELEASE),)
@echo -e VERSION=$(VERSION)\\nPATCHLEVEL:=$(PATCHLEVEL)\\nSUBLEVEL:=$(SUBLEVEL)\\nKERNELRELEASE:=$(KERNELRELEASE) > $(obj)/.version
ifneq ($(SRCDIR),)
@@ -308,12 +308,12 @@ LXDIALOG := $(KDIR)/scripts/$(LXDIALOG_DIR)lxdialog/lxdialog
# without destroying the user's configuration. Lacking that, we will
# just touch .config if it already exists, and run make_kconfig if it
# doesn't.
-.config: .version
+$(obj)/.config: $(obj)/.version
@echo Updating/Creating .config
- @if [ -e .config ]; then touch .config ; else \
+ @if [ -e $(obj)/.config ]; then touch $(obj)/.config ; else \
./scripts/make_kconfig.pl $(KDIR) ; fi
-Kconfig: .version
+$(obj)/Kconfig: $(obj)/.version
./scripts/make_kconfig.pl $(KDIR)
# With make -j, it's possible that both the .config and Kconfig rules
@@ -321,19 +321,19 @@ Kconfig: .version
# doesn't appear to be any way around this, but it doesn't cause a
# failure. One make_kconfig.pl will just overwrite the other's output.
-xconfig:: $(QCONF) Kconfig
- $(QCONF) Kconfig
+xconfig:: $(QCONF) $(obj)/Kconfig
+ $(QCONF) $(obj)/Kconfig
-gconfig:: $(GCONF) Kconfig
- $(QCONF) Kconfig
+gconfig:: $(GCONF) $(obj)/Kconfig
+ $(QCONF) $(obj)/Kconfig
-config:: $(CONF) Kconfig
- $(CONF) Kconfig
+config:: $(CONF) $(obj)/Kconfig
+ $(CONF) $(obj)/Kconfig
-menuconfig:: $(MCONF) lxdialog Kconfig
- $(MCONF) Kconfig
+menuconfig:: $(MCONF) lxdialog $(obj)/Kconfig
+ $(MCONF) $(obj)/Kconfig
-allyesconfig allmodconfig:: .version
+allyesconfig allmodconfig:: $(obj)/.version
./scripts/make_kconfig.pl $(KDIR) 1
# rule to build kernel conf programs