summaryrefslogtreecommitdiff
path: root/scripts/kconfig/Makefile.kernel
Side-by-side diff
Diffstat (limited to 'scripts/kconfig/Makefile.kernel') (more/less context) (ignore 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
@@ -8,3 +8,6 @@
# Based on QT which needs to be installed to compile it
+# gconf: Used for the gconfig target
+# Based on GTK which needs to be installed to compile it
#
+#################
@@ -13,3 +16,3 @@ libkconfig-objs := zconf.tab.o
-host-progs := conf mconf qconf
+host-progs := conf mconf qconf gconf
conf-objs := conf.o libkconfig.so
@@ -17,9 +20,13 @@ mconf-objs := mconf.o libkconfig.so
-qconf-objs := kconfig_load.o
+ifeq ($(MAKECMDGOALS),$(obj)/qconf)
qconf-cxxobjs := qconf.o
+qconf-objs := kconfig_load.o
+endif
-clean-files := libkconfig.so lkc_defs.h qconf.moc .tmp_qtcheck \
- zconf.tab.c zconf.tab.h lex.zconf.c
+ifeq ($(MAKECMDGOALS),$(obj)/gconf)
+gconf-objs := gconf.o kconfig_load.o
+endif
-include $(TOPDIR)/Rules.make
+clean-files := libkconfig.so lkc_defs.h qconf.moc .tmp_qtcheck \
+ .tmp_gtkcheck zconf.tab.c zconf.tab.h lex.zconf.c
@@ -32,3 +39,6 @@ HOSTCXXFLAGS_qconf.o = -I$(QTDIR)/include
-$(obj)/conf.o $(obj)/mconf.o $(obj)/qconf.o: $(obj)/zconf.tab.h
+HOSTLOADLIBES_gconf = `pkg-config gtk+-2.0 gmodule-2.0 libglade-2.0 --libs`
+HOSTCFLAGS_gconf.o = `pkg-config gtk+-2.0 gmodule-2.0 libglade-2.0 --cflags`
+
+$(obj)/conf.o $(obj)/mconf.o $(obj)/qconf.o $(obj)/gconf.o: $(obj)/zconf.tab.h
@@ -42,3 +52,3 @@ MOC = $(QTDIR)/bin/moc
$(obj)/.tmp_qtcheck:
- @set -e; for d in $$QTDIR /usr/share/qt /usr/lib/qt3; do \
+ @set -e; for d in $$QTDIR /usr/share/qt* /usr/lib/qt*; do \
if [ -f $$d/include/qconfig.h ]; then DIR=$$d; break; fi; \
@@ -64,2 +74,28 @@ endif
+$(obj)/gconf.o: $(obj)/.tmp_gtkcheck
+
+ifeq ($(MAKECMDGOALS),$(obj)/gconf)
+-include $(obj)/.tmp_gtkcheck
+
+# GTK needs some extra effort, too...
+$(obj)/.tmp_gtkcheck:
+ @if `pkg-config gtk+-2.0 gmodule-2.0 libglade-2.0 --exists`; then \
+ if `pkg-config gtk+-2.0 --atleast-version=2.0.0`; then \
+ touch $@; \
+ else \
+ echo "*"; \
+ echo "* GTK+ is present but version >= 2.0.0 is required."; \
+ echo "*"; \
+ false; \
+ fi \
+ else \
+ echo "*"; \
+ echo "* Unable to find the GTK+ installation. Please make sure that"; \
+ echo "* the GTK+ 2.0 development package is correctly installed..."; \
+ echo "* You need gtk+-2.0, glib-2.0 and libglade-2.0."; \
+ echo "*"; \
+ false; \
+ fi
+endif
+
$(obj)/zconf.tab.o: $(obj)/lex.zconf.c
@@ -70,2 +106,4 @@ $(obj)/qconf.o: $(obj)/qconf.moc $(obj)/lkc_defs.h
+$(obj)/gconf.o: $(obj)/lkc_defs.h
+
$(obj)/%.moc: $(src)/%.h