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.kernel52
1 files changed, 45 insertions, 7 deletions
diff --git a/scripts/kconfig/Makefile.kernel b/scripts/kconfig/Makefile.kernel
index 22724a7..bae5e29 100644
--- a/scripts/kconfig/Makefile.kernel
+++ b/scripts/kconfig/Makefile.kernel
@@ -7,20 +7,27 @@
7# qconf: Used for the xconfig target 7# qconf: Used for the xconfig target
8# Based on QT which needs to be installed to compile it 8# Based on QT which needs to be installed to compile it
9# gconf: Used for the gconfig target
10# Based on GTK which needs to be installed to compile it
9# 11#
12#################
10 13
11# object files used by all lkc flavours 14# object files used by all lkc flavours
12libkconfig-objs := zconf.tab.o 15libkconfig-objs := zconf.tab.o
13 16
14 host-progs:= conf mconf qconf 17 host-progs:= conf mconf qconf gconf
15 conf-objs:= conf.o libkconfig.so 18 conf-objs:= conf.o libkconfig.so
16 mconf-objs:= mconf.o libkconfig.so 19 mconf-objs:= mconf.o libkconfig.so
17 20
18 qconf-objs:= kconfig_load.o 21ifeq ($(MAKECMDGOALS),$(obj)/qconf)
19 qconf-cxxobjs:= qconf.o 22 qconf-cxxobjs:= qconf.o
23 qconf-objs:= kconfig_load.o
24endif
20 25
21 clean-files:= libkconfig.so lkc_defs.h qconf.moc .tmp_qtcheck \ 26ifeq ($(MAKECMDGOALS),$(obj)/gconf)
22 zconf.tab.c zconf.tab.h lex.zconf.c 27 gconf-objs:= gconf.o kconfig_load.o
28endif
23 29
24include $(TOPDIR)/Rules.make 30 clean-files:= libkconfig.so lkc_defs.h qconf.moc .tmp_qtcheck \
31 .tmp_gtkcheck zconf.tab.c zconf.tab.h lex.zconf.c
25 32
26# generated files seem to need this to find local include files 33# generated files seem to need this to find local include files
@@ -31,5 +38,8 @@ HOSTLOADLIBES_qconf = -L$(QTDIR)/lib -Wl,-rpath,$(QTDIR)/lib -l$(QTLIB) -ldl
31 HOSTCXXFLAGS_qconf.o= -I$(QTDIR)/include 38 HOSTCXXFLAGS_qconf.o= -I$(QTDIR)/include
32 39
33$(obj)/conf.o $(obj)/mconf.o $(obj)/qconf.o: $(obj)/zconf.tab.h 40 HOSTLOADLIBES_gconf= `pkg-config gtk+-2.0 gmodule-2.0 libglade-2.0 --libs`
41 HOSTCFLAGS_gconf.o= `pkg-config gtk+-2.0 gmodule-2.0 libglade-2.0 --cflags`
42
43$(obj)/conf.o $(obj)/mconf.o $(obj)/qconf.o $(obj)/gconf.o: $(obj)/zconf.tab.h
34 44
35$(obj)/qconf.o: $(obj)/.tmp_qtcheck 45$(obj)/qconf.o: $(obj)/.tmp_qtcheck
@@ -41,5 +51,5 @@ MOC = $(QTDIR)/bin/moc
41# QT needs some extra effort... 51# QT needs some extra effort...
42$(obj)/.tmp_qtcheck: 52$(obj)/.tmp_qtcheck:
43 @set -e; for d in $$QTDIR /usr/share/qt /usr/lib/qt3; do \ 53 @set -e; for d in $$QTDIR /usr/share/qt* /usr/lib/qt*; do \
44 if [ -f $$d/include/qconfig.h ]; then DIR=$$d; break; fi; \ 54 if [ -f $$d/include/qconfig.h ]; then DIR=$$d; break; fi; \
45 done; \ 55 done; \
@@ -63,4 +73,30 @@ $(obj)/.tmp_qtcheck:
63endif 73endif
64 74
75$(obj)/gconf.o: $(obj)/.tmp_gtkcheck
76
77ifeq ($(MAKECMDGOALS),$(obj)/gconf)
78-include $(obj)/.tmp_gtkcheck
79
80# GTK needs some extra effort, too...
81$(obj)/.tmp_gtkcheck:
82 @if `pkg-config gtk+-2.0 gmodule-2.0 libglade-2.0 --exists`; then \
83 if `pkg-config gtk+-2.0 --atleast-version=2.0.0`; then \
84 touch $@; \
85 else \
86 echo "*"; \
87 echo "* GTK+ is present but version >= 2.0.0 is required.";\
88 echo "*"; \
89 false; \
90 fi \
91 else \
92 echo "*"; \
93 echo "* Unable to find the GTK+ installation. Please make sure that"; \
94 echo "* the GTK+ 2.0 development package is correctly installed..."; \
95 echo "* You need gtk+-2.0, glib-2.0 and libglade-2.0."; \
96 echo "*"; \
97 false; \
98 fi
99endif
100
65$(obj)/zconf.tab.o: $(obj)/lex.zconf.c 101$(obj)/zconf.tab.o: $(obj)/lex.zconf.c
66 102
@@ -69,4 +105,6 @@ $(obj)/kconfig_load.o: $(obj)/lkc_defs.h
69$(obj)/qconf.o: $(obj)/qconf.moc $(obj)/lkc_defs.h 105$(obj)/qconf.o: $(obj)/qconf.moc $(obj)/lkc_defs.h
70 106
107$(obj)/gconf.o: $(obj)/lkc_defs.h
108
71$(obj)/%.moc: $(src)/%.h 109$(obj)/%.moc: $(src)/%.h
72 $(MOC) -i $< -o $@ 110 $(MOC) -i $< -o $@