Diffstat (limited to 'scripts/kconfig/Makefile.kernel') (more/less context) (show whitespace changes)
-rw-r--r-- | scripts/kconfig/Makefile.kernel | 44 |
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 | |||
@@ -20,39 +20,49 @@ qconf-cxxobjs := qconf.o | |||
20 | 20 | ||
21 | clean-files:= libkconfig.so lkc_defs.h qconf.moc .tmp_qtcheck \ | 21 | clean-files:= libkconfig.so lkc_defs.h qconf.moc .tmp_qtcheck \ |
22 | zconf.tab.c zconf.tab.h lex.zconf.c | 22 | zconf.tab.c zconf.tab.h lex.zconf.c |
23 | 23 | ||
24 | include $(TOPDIR)/Rules.make | 24 | include $(TOPDIR)/Rules.make |
25 | 25 | ||
26 | # QT needs some extra effort... | ||
27 | ifndef QTDIR | ||
28 | QTDIR := /usr/share/qt | ||
29 | endif | ||
30 | |||
31 | # Executable to generate the .moc file | ||
32 | MOC=$(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 |
35 | HOSTCFLAGS_lex.zconf.o:= -I$(src) | 27 | HOSTCFLAGS_lex.zconf.o:= -I$(src) |
36 | HOSTCFLAGS_zconf.tab.o:= -I$(src) | 28 | 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 | ||
41 | $(obj)/conf.o $(obj)/mconf.o $(obj)/qconf.o: $(obj)/zconf.tab.h | 33 | $(obj)/conf.o $(obj)/mconf.o $(obj)/qconf.o: $(obj)/zconf.tab.h |
42 | 34 | ||
43 | $(obj)/qconf.o: $(obj)/.tmp_qtcheck | 35 | $(obj)/qconf.o: $(obj)/.tmp_qtcheck |
44 | 36 | ||
37 | ifeq ($(MAKECMDGOALS),$(obj)/qconf) | ||
38 | MOC = $(QTDIR)/bin/moc | ||
39 | -include $(obj)/.tmp_qtcheck | ||
40 | |||
41 | # QT needs some extra effort... | ||
45 | $(obj)/.tmp_qtcheck: | 42 | $(obj)/.tmp_qtcheck: |
46 | ifeq ($(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 "*"; \ |
51 | else | 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 | ||
53 | endif | 63 | endif |
54 | 64 | ||
55 | $(obj)/zconf.tab.o: $(obj)/lex.zconf.c | 65 | $(obj)/zconf.tab.o: $(obj)/lex.zconf.c |
56 | 66 | ||
57 | $(obj)/kconfig_load.o: $(obj)/lkc_defs.h | 67 | $(obj)/kconfig_load.o: $(obj)/lkc_defs.h |
58 | 68 | ||