summaryrefslogtreecommitdiff
path: root/scripts/kconfig/Makefile
Unidiff
Diffstat (limited to 'scripts/kconfig/Makefile') (more/less context) (ignore 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 @@
1VERSION=1.3 1VERSION=1.4
2CC=gcc 2CC=gcc
3CXX=g++ 3CXX=g++
4CFLAGS=-O0 -Wall -g -fPIC 4CFLAGS=-O0 -Wall -g -fPIC
5CXXFLAGS=$(CFLAGS) -I$(HOSTQTDIR)/include 5CXXFLAGS=$(CFLAGS) -I$(QTDIR)/include
6LDFLAGS= 6LDFLAGS=
7LXXFLAGS=$(LDFLAGS) -L$(HOSTQTDIR)/lib -Wl,-rpath,$(HOSTQTDIR)/lib 7LXXFLAGS=$(LDFLAGS) -L$(QTDIR)/lib -Wl,-rpath,$(QTDIR)/lib
8LEX=flex 8LEX=flex
9LFLAGS=-L 9LFLAGS=-L
10YACC=bison 10YACC=bison
11YFLAGS=-l 11YFLAGS=-l
12#YFLAGS=-d -t -v -l 12#YFLAGS=-t -v -l
13ifndef HOSTQTDIR 13ifndef QTDIR
14HOSTQTDIR=/usr/share/qt 14QTDIR=/usr/share/qt3
15endif 15endif
16MOC=$(wildcard $(HOSTQTDIR)/bin/moc) 16MOC=$(wildcard $(QTDIR)/bin/moc)
17GTKCFLAGS=`pkg-config gtk+-2.0 gmodule-2.0 libglade-2.0 --cflags`
18GTKLDFLAGS=`pkg-config gtk+-2.0 gmodule-2.0 libglade-2.0 --libs`
17 19
18parse_SRC=zconf.y 20parse_SRC=zconf.y
19conf_SRC=conf.c $(parse_SRC) 21conf_SRC=conf.c $(parse_SRC)
20mconf_SRC=mconf.c $(parse_SRC) 22mconf_SRC=mconf.c $(parse_SRC)
21qconf_SRC=qconf.cc 23qconf_SRC=qconf.cc
24gconf_SRC=gconf.c kconfig_load.c
22HDR=expr.h lkc.h lkc_proto.h qconf.h 25HDR=expr.h lkc.h lkc_proto.h qconf.h
23OTHER=README lkc-language.txt Makefile.kernel \ 26OTHER=README lkc-language.txt Makefile.kernel \
24 kconfig.i extconf.rb example 27 kconfig.i extconf.rb example
25INST=zconf.y zconf.l confdata.c expr.c symbol.c menu.c \ 28INST=zconf.y zconf.l confdata.c expr.c symbol.c menu.c \
26 conf.c mconf.c qconf.cc kconfig_load.c images.c $(HDR) 29 conf.c mconf.c qconf.cc gconf.c gconf.glade kconfig_load.c images.c $(HDR)
27INSTGEN=lex.zconf.c zconf.tab.c 30INSTGEN=lex.zconf.c zconf.tab.c
28 31
29#DEBUG=1 32#DEBUG=1
@@ -60,6 +63,11 @@ qconf_OBJ=$(filter %.o, \
60 $(patsubst %.y,%.tab.o, \ 63 $(patsubst %.y,%.tab.o, \
61 $(patsubst %.l,lex.%.o, \ 64 $(patsubst %.l,lex.%.o, \
62 $(qconf_SRC)))))) 65 $(qconf_SRC))))))
66gconf_OBJ=$(filter %.o, \
67 $(patsubst %.c,%.o, \
68 $(patsubst %.y,%.tab.o, \
69 $(patsubst %.l,lex.%.o, \
70 $(gconf_SRC)))))
63OBJ=$(conf_OBJ) $(mconf_OBJ) $(qconf_OBJ) 71OBJ=$(conf_OBJ) $(mconf_OBJ) $(qconf_OBJ)
64 72
65ifeq ($(MOC),) 73ifeq ($(MOC),)
@@ -84,6 +92,7 @@ conf.o: conf.c $(lkc_deps)
84mconf.o: mconf.c $(lkc_deps) 92mconf.o: mconf.c $(lkc_deps)
85qconf.moc: qconf.h 93qconf.moc: qconf.h
86qconf.o: qconf.cc qconf.moc images.c $(lkc_deps) 94qconf.o: qconf.cc qconf.moc images.c $(lkc_deps)
95gconf.o: gconf.c $(lkc_deps)
87 96
88mconf: $(mconf_OBJ) 97mconf: $(mconf_OBJ)
89 $(CC) $(LDFLAGS) $^ -o $@ 98 $(CC) $(LDFLAGS) $^ -o $@
@@ -94,14 +103,20 @@ conf: $(conf_OBJ)
94ifeq ($(MOC),) 103ifeq ($(MOC),)
95qconf: 104qconf:
96 @echo Unable to find the QT installation. Please make sure that the 105 @echo Unable to find the QT installation. Please make sure that the
97 @echo QT development package is correctly installed and the HOSTQTDIR 106 @echo QT development package is correctly installed and the QTDIR
98 @echo environment variable is set to the correct location. 107 @echo environment variable is set to the correct location.
99 @false 108 @false
100else 109else
101qconf: $(qconf_OBJ) 110qconf: $(qconf_OBJ)
102 $(CXX) $(LXXFLAGS) $^ -lqt -o $@ 111 $(CXX) $(LXXFLAGS) $^ -lqt-mt -o $@
103endif 112endif
104 113
114gconf.o: gconf.c
115 $(CC) $(CFLAGS) $(GTKCFLAGS) -c $< -o $@
116
117gconf: $(gconf_OBJ)
118 $(CC) $(LDFLAGS) $(GTKLDFLAGS) $^ -o $@
119
105libkconfig.so: $(parse_OBJ) 120libkconfig.so: $(parse_OBJ)
106 $(CC) -shared $^ -o $@ 121 $(CC) -shared $^ -o $@
107 122
@@ -126,7 +141,7 @@ lex.%.c: %.l
126 $(LEX) $(LFLAGS) -P$* $< 141 $(LEX) $(LFLAGS) -P$* $<
127 142
128%.moc: %.h 143%.moc: %.h
129 $(HOSTQTDIR)/bin/moc -i $< -o $@ 144 $(QTDIR)/bin/moc -i $< -o $@
130 145
131%.o: %.c 146%.o: %.c
132 $(CC) $(CFLAGS) -c $< -o $@ 147 $(CC) $(CFLAGS) -c $< -o $@
@@ -136,14 +151,16 @@ lex.%.c: %.l
136 151
137ifdef KERNELSRC 152ifdef KERNELSRC
138install: $(INSTGEN) 153install: $(INSTGEN)
139 set -x; cp $(sort $(INST)) $(KERNELSRC)/scripts/kconfig; \ 154 set -x; cp --remove-destination $(sort $(INST)) $(KERNELSRC)/scripts/kconfig; \
140 for f in $(INSTGEN); do cp $$f $(KERNELSRC)/scripts/kconfig/$${f}_shipped; done; \ 155 for f in $(INSTGEN); do cp --remove-destination $$f $(KERNELSRC)/scripts/kconfig/$${f}_shipped; done; \
141 cp Makefile.kernel $(KERNELSRC)/scripts/kconfig/Makefile 156 cp --remove-destination Makefile.kernel $(KERNELSRC)/scripts/kconfig/Makefile; \
157 cp --remove-destination lkc-language.txt $(KERNELSRC)/Documentation/kbuild/kconfig-language.txt
142 158
143diff: $(INSTGEN) 159diff: $(INSTGEN)
144 for f in $(sort $(INST)); do diff -u $(KERNELSRC)/scripts/kconfig/$$f $$f; done; \ 160 for f in $(sort $(INST)); do diff -Nu $(KERNELSRC)/scripts/kconfig/$$f $$f; done; \
145 for f in $(INSTGEN); do diff -u $(KERNELSRC)/scripts/kconfig/$${f}_shipped $$f; done; \ 161 for f in $(INSTGEN); do diff -Nu $(KERNELSRC)/scripts/kconfig/$${f}_shipped $$f; done; \
146 diff -u $(KERNELSRC)/scripts/kconfig/Makefile Makefile.kernel 162 diff -Nu $(KERNELSRC)/scripts/kconfig/Makefile Makefile.kernel; \
163 diff -Nu lkc-language.txt $(KERNELSRC)/Documentation/kbuild/kconfig-language.txt
147else 164else
148install: 165install:
149 @echo "Please use KERNELSRC=<path/to/linux-kernel> to install" 166 @echo "Please use KERNELSRC=<path/to/linux-kernel> to install"