summaryrefslogtreecommitdiff
path: root/scripts/kconfig/Makefile
Side-by-side diff
Diffstat (limited to 'scripts/kconfig/Makefile') (more/less context) (show whitespace changes)
-rw-r--r--scripts/kconfig/Makefile51
1 files changed, 34 insertions, 17 deletions
diff --git a/scripts/kconfig/Makefile b/scripts/kconfig/Makefile
index 5a0d7e5..b918300 100644
--- a/scripts/kconfig/Makefile
+++ b/scripts/kconfig/Makefile
@@ -1,29 +1,32 @@
-VERSION=1.3
+VERSION=1.4
CC=gcc
CXX=g++
CFLAGS=-O0 -Wall -g -fPIC
-CXXFLAGS=$(CFLAGS) -I$(HOSTQTDIR)/include
+CXXFLAGS=$(CFLAGS) -I$(QTDIR)/include
LDFLAGS=
-LXXFLAGS=$(LDFLAGS) -L$(HOSTQTDIR)/lib -Wl,-rpath,$(HOSTQTDIR)/lib
+LXXFLAGS=$(LDFLAGS) -L$(QTDIR)/lib -Wl,-rpath,$(QTDIR)/lib
LEX=flex
LFLAGS=-L
YACC=bison
YFLAGS=-l
-#YFLAGS=-d -t -v -l
-ifndef HOSTQTDIR
-HOSTQTDIR=/usr/share/qt
+#YFLAGS=-t -v -l
+ifndef QTDIR
+QTDIR=/usr/share/qt3
endif
-MOC=$(wildcard $(HOSTQTDIR)/bin/moc)
+MOC=$(wildcard $(QTDIR)/bin/moc)
+GTKCFLAGS=`pkg-config gtk+-2.0 gmodule-2.0 libglade-2.0 --cflags`
+GTKLDFLAGS=`pkg-config gtk+-2.0 gmodule-2.0 libglade-2.0 --libs`
parse_SRC=zconf.y
conf_SRC=conf.c $(parse_SRC)
mconf_SRC=mconf.c $(parse_SRC)
qconf_SRC=qconf.cc
+gconf_SRC=gconf.c kconfig_load.c
HDR=expr.h lkc.h lkc_proto.h qconf.h
OTHER=README lkc-language.txt Makefile.kernel \
kconfig.i extconf.rb example
INST=zconf.y zconf.l confdata.c expr.c symbol.c menu.c \
- conf.c mconf.c qconf.cc kconfig_load.c images.c $(HDR)
+ conf.c mconf.c qconf.cc gconf.c gconf.glade kconfig_load.c images.c $(HDR)
INSTGEN=lex.zconf.c zconf.tab.c
#DEBUG=1
@@ -60,6 +63,11 @@ qconf_OBJ=$(filter %.o, \
$(patsubst %.y,%.tab.o, \
$(patsubst %.l,lex.%.o, \
$(qconf_SRC))))))
+gconf_OBJ=$(filter %.o, \
+ $(patsubst %.c,%.o, \
+ $(patsubst %.y,%.tab.o, \
+ $(patsubst %.l,lex.%.o, \
+ $(gconf_SRC)))))
OBJ=$(conf_OBJ) $(mconf_OBJ) $(qconf_OBJ)
ifeq ($(MOC),)
@@ -84,6 +92,7 @@ conf.o: conf.c $(lkc_deps)
mconf.o: mconf.c $(lkc_deps)
qconf.moc: qconf.h
qconf.o: qconf.cc qconf.moc images.c $(lkc_deps)
+gconf.o: gconf.c $(lkc_deps)
mconf: $(mconf_OBJ)
$(CC) $(LDFLAGS) $^ -o $@
@@ -94,14 +103,20 @@ conf: $(conf_OBJ)
ifeq ($(MOC),)
qconf:
@echo Unable to find the QT installation. Please make sure that the
- @echo QT development package is correctly installed and the HOSTQTDIR
+ @echo QT development package is correctly installed and the QTDIR
@echo environment variable is set to the correct location.
@false
else
qconf: $(qconf_OBJ)
- $(CXX) $(LXXFLAGS) $^ -lqt -o $@
+ $(CXX) $(LXXFLAGS) $^ -lqt-mt -o $@
endif
+gconf.o: gconf.c
+ $(CC) $(CFLAGS) $(GTKCFLAGS) -c $< -o $@
+
+gconf: $(gconf_OBJ)
+ $(CC) $(LDFLAGS) $(GTKLDFLAGS) $^ -o $@
+
libkconfig.so: $(parse_OBJ)
$(CC) -shared $^ -o $@
@@ -126,7 +141,7 @@ lex.%.c: %.l
$(LEX) $(LFLAGS) -P$* $<
%.moc: %.h
- $(HOSTQTDIR)/bin/moc -i $< -o $@
+ $(QTDIR)/bin/moc -i $< -o $@
%.o: %.c
$(CC) $(CFLAGS) -c $< -o $@
@@ -136,14 +151,16 @@ lex.%.c: %.l
ifdef KERNELSRC
install: $(INSTGEN)
- set -x; cp $(sort $(INST)) $(KERNELSRC)/scripts/kconfig; \
- for f in $(INSTGEN); do cp $$f $(KERNELSRC)/scripts/kconfig/$${f}_shipped; done; \
- cp Makefile.kernel $(KERNELSRC)/scripts/kconfig/Makefile
+ set -x; cp --remove-destination $(sort $(INST)) $(KERNELSRC)/scripts/kconfig; \
+ for f in $(INSTGEN); do cp --remove-destination $$f $(KERNELSRC)/scripts/kconfig/$${f}_shipped; done; \
+ cp --remove-destination Makefile.kernel $(KERNELSRC)/scripts/kconfig/Makefile; \
+ cp --remove-destination lkc-language.txt $(KERNELSRC)/Documentation/kbuild/kconfig-language.txt
diff: $(INSTGEN)
- for f in $(sort $(INST)); do diff -u $(KERNELSRC)/scripts/kconfig/$$f $$f; done; \
- for f in $(INSTGEN); do diff -u $(KERNELSRC)/scripts/kconfig/$${f}_shipped $$f; done; \
- diff -u $(KERNELSRC)/scripts/kconfig/Makefile Makefile.kernel
+ for f in $(sort $(INST)); do diff -Nu $(KERNELSRC)/scripts/kconfig/$$f $$f; done; \
+ for f in $(INSTGEN); do diff -Nu $(KERNELSRC)/scripts/kconfig/$${f}_shipped $$f; done; \
+ diff -Nu $(KERNELSRC)/scripts/kconfig/Makefile Makefile.kernel; \
+ diff -Nu lkc-language.txt $(KERNELSRC)/Documentation/kbuild/kconfig-language.txt
else
install:
@echo "Please use KERNELSRC=<path/to/linux-kernel> to install"