summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--v4l/Makefile27
1 files changed, 20 insertions, 7 deletions
diff --git a/v4l/Makefile b/v4l/Makefile
index dc7836557..3afe20e8b 100644
--- a/v4l/Makefile
+++ b/v4l/Makefile
@@ -76,6 +76,7 @@ KDIRUSB := /lib/modules/$(KERNELRELEASE)/kernel/drivers/usb/media
#################################################
# Compiler fixup rules
+HOSTCC:=$(CC)
CC += -I$(obj)
ifeq ($(VERSION).$(PATCHLEVEL),2.6)
@@ -180,22 +181,28 @@ CONFIG_SHELL := $(shell if [ -x "$$BASH" ]; then echo $$BASH; \
else if [ -x /bin/bash ]; then echo /bin/bash; \
else echo sh; fi ; fi)
-build := srctree=$(KDIR) HOSTCXX=$(CXX) HOSTCC=$(CC) CONFIG_SHELL=$(CONFIG_SHELL) -f $(KDIR)/scripts/Makefile.build obj
+build := srctree=$(KDIR) HOSTCXX="$(CXX)" HOSTCC="$(HOSTCC)" CONFIG_SHELL="$(CONFIG_SHELL)" -f $(KDIR)/scripts/Makefile.build obj
xconfig:: links .version
- $(MAKE) -C $(KDIR) $(build)=scripts/kconfig qconf-target=1 scripts/kconfig/qconf
+ -if [ ! -f $(KDIR)/scripts/kconfig/qconf ]; then \
+ $(MAKE) -C $(KDIR) $(build)=scripts/kconfig qconf-target=1 scripts/kconfig/qconf; \
+ fi
./scripts/make_kconfig.pl
$(KDIR)/scripts/kconfig/qconf Kconfig
./scripts/make_noconfig.pl
gconfig:: links .version
- $(MAKE) -C $(KDIR) $(build)=scripts/kconfig scripts/kconfig/gconf
+ -if [ ! -f $(KDIR)/scripts/kconfig/gconf ]; then \
+ $(MAKE) -C $(KDIR) $(build)=scripts/kconfig scripts/kconfig/gconf; \
+ fi
./scripts/make_kconfig.pl
$(KDIR)/scripts/kconfig/gconf Kconfig
./scripts/make_noconfig.pl
config:: links .version
- $(MAKE) -C $(KDIR) $(build)=scripts/kconfig scripts/kconfig/conf
+ -if [ ! -f $(KDIR)/scripts/kconfig/conf ]; then \
+ $(MAKE) -C $(KDIR) $(build)=scripts/kconfig scripts/kconfig/conf; \
+ fi
./scripts/make_kconfig.pl
$(KDIR)/scripts/kconfig/conf Kconfig
./scripts/make_noconfig.pl
@@ -204,15 +211,21 @@ menuconfig:: links .version
./scripts/make_kconfig.pl
-rm scripts/lxdialog scripts/kconfig
-if [ -d $(KDIR)/scripts/lxdialog ]; then \
- $(MAKE) -C $(KDIR) $(build)=scripts/lxdialog; \
+ if [ ! -f $(KDIR)/scripts/lxdialog/lxdialog ]; then \
+ $(MAKE) -C $(KDIR) $(build)=scripts/lxdialog; \
+ fi; \
ln -s $(KDIR)/scripts/lxdialog scripts/lxdialog; \
fi
-if [ -d $(KDIR)/scripts/kconfig ]; then \
if [ -d $(KDIR)/scripts/kconfig/lxdialog ]; then \
- $(MAKE) -C $(KDIR) $(build)=scripts/kconfig/lxdialog; \
+ if [ ! -f $(KDIR)/scripts/kconfig/lxdialog ]; then \
+ $(MAKE) -C $(KDIR) $(build)=scripts/kconfig/lxdialog; \
+ fi; \
else \
- $(MAKE) -C $(KDIR) $(build)=scripts/kconfig scripts/kconfig/mconf; \
+ if [ ! -f $(KDIR)/scripts/kconfig/mconf ]; then \
+ $(MAKE) -C $(KDIR) $(build)=scripts/kconfig scripts/kconfig/mconf; \
+ fi; \
fi; \
ln -s $(KDIR)/scripts/kconfig scripts/kconfig; \
fi