summaryrefslogtreecommitdiff
path: root/scripts/kconfig/Makefile.kernel
Unidiff
Diffstat (limited to 'scripts/kconfig/Makefile.kernel') (more/less context) (show whitespace changes)
-rw-r--r--scripts/kconfig/Makefile.kernel44
1 files changed, 27 insertions, 17 deletions
diff --git a/scripts/kconfig/Makefile.kernel b/scripts/kconfig/Makefile.kernel
index beb4dcf..22724a7 100644
--- a/scripts/kconfig/Makefile.kernel
+++ b/scripts/kconfig/Makefile.kernel
@@ -25,10 +25,2 @@ include $(TOPDIR)/Rules.make
25 25
26# QT needs some extra effort...
27ifndef QTDIR
28 QTDIR := /usr/share/qt
29endif
30
31# Executable to generate the .moc file
32MOC=$(wildcard $(QTDIR)/bin/moc)
33
34# generated files seem to need this to find local include files 26# generated files seem to need this to find local include files
@@ -37,4 +29,4 @@ HOSTCFLAGS_zconf.tab.o := -I$(src)
37 29
38 HOSTLOADLIBES_qconf:= -L$(QTDIR)/lib -Wl,-rpath,$(QTDIR)/lib -lqt -ldl 30 HOSTLOADLIBES_qconf= -L$(QTDIR)/lib -Wl,-rpath,$(QTDIR)/lib -l$(QTLIB) -ldl
39 HOSTCXXFLAGS_qconf.o:= -I$(QTDIR)/include 31 HOSTCXXFLAGS_qconf.o= -I$(QTDIR)/include
40 32
@@ -44,10 +36,28 @@ $(obj)/qconf.o: $(obj)/.tmp_qtcheck
44 36
37ifeq ($(MAKECMDGOALS),$(obj)/qconf)
38MOC = $(QTDIR)/bin/moc
39-include $(obj)/.tmp_qtcheck
40
41# QT needs some extra effort...
45$(obj)/.tmp_qtcheck: 42$(obj)/.tmp_qtcheck:
46ifeq ($(MOC),) 43 @set -e; for d in $$QTDIR /usr/share/qt /usr/lib/qt3; do \
47 @echo Unable to find the QT installation. Please make sure that the 44 if [ -f $$d/include/qconfig.h ]; then DIR=$$d; break; fi; \
48 @echo QT development package is correctly installed and the QTDIR 45 done; \
49 @echo environment variable is set to the correct location. 46 if [ -z "$$DIR" ]; then \
50 @false 47 echo "*"; \
51else 48 echo "* Unable to find the QT installation. Please make sure that the"; \
52 @touch $@ 49 echo "* QT development package is correctly installed and the QTDIR"; \
50 echo "* environment variable is set to the correct location."; \
51 echo "*"; \
52 false; \
53 fi; \
54 LIB=qt; \
55 if [ -f $$DIR/lib/libqt-mt.so ]; then LIB=qt-mt; fi; \
56 echo "QTDIR=$$DIR" > $@; echo "QTLIB=$$LIB" >> $@; \
57 if [ ! -x $$DIR/bin/moc -a -x /usr/bin/moc ]; then \
58 echo "*"; \
59 echo "* Unable to find $$DIR/bin/moc, using /usr/bin/moc instead."; \
60 echo "*"; \
61 echo "MOC=/usr/bin/moc" >> $@; \
62 fi
53endif 63endif