author | kergoth <kergoth> | 2003-06-17 17:03:49 (UTC) |
---|---|---|
committer | kergoth <kergoth> | 2003-06-17 17:03:49 (UTC) |
commit | 16e53b2a2e94742f3b55ee73700bb264e36638d4 (patch) (unidiff) | |
tree | 4f2b65a635d25c1ce0cfeea7953623c2bf7d9534 /scripts/kconfig/Makefile | |
parent | 384b7f1a42f9f2f101dc8fe11c3625055d96f672 (diff) | |
download | opie-16e53b2a2e94742f3b55ee73700bb264e36638d4.zip opie-16e53b2a2e94742f3b55ee73700bb264e36638d4.tar.gz opie-16e53b2a2e94742f3b55ee73700bb264e36638d4.tar.bz2 |
Update LinuxKernelConf version to 1.4.
-rw-r--r-- | scripts/kconfig/Makefile | 51 |
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,170 +1,187 @@ | |||
1 | VERSION=1.3 | 1 | VERSION=1.4 |
2 | CC=gcc | 2 | CC=gcc |
3 | CXX=g++ | 3 | CXX=g++ |
4 | CFLAGS=-O0 -Wall -g -fPIC | 4 | CFLAGS=-O0 -Wall -g -fPIC |
5 | CXXFLAGS=$(CFLAGS) -I$(HOSTQTDIR)/include | 5 | CXXFLAGS=$(CFLAGS) -I$(QTDIR)/include |
6 | LDFLAGS= | 6 | LDFLAGS= |
7 | LXXFLAGS=$(LDFLAGS) -L$(HOSTQTDIR)/lib -Wl,-rpath,$(HOSTQTDIR)/lib | 7 | LXXFLAGS=$(LDFLAGS) -L$(QTDIR)/lib -Wl,-rpath,$(QTDIR)/lib |
8 | LEX=flex | 8 | LEX=flex |
9 | LFLAGS=-L | 9 | LFLAGS=-L |
10 | YACC=bison | 10 | YACC=bison |
11 | YFLAGS=-l | 11 | YFLAGS=-l |
12 | #YFLAGS=-d -t -v -l | 12 | #YFLAGS=-t -v -l |
13 | ifndef HOSTQTDIR | 13 | ifndef QTDIR |
14 | HOSTQTDIR=/usr/share/qt | 14 | QTDIR=/usr/share/qt3 |
15 | endif | 15 | endif |
16 | MOC=$(wildcard $(HOSTQTDIR)/bin/moc) | 16 | MOC=$(wildcard $(QTDIR)/bin/moc) |
17 | GTKCFLAGS=`pkg-config gtk+-2.0 gmodule-2.0 libglade-2.0 --cflags` | ||
18 | GTKLDFLAGS=`pkg-config gtk+-2.0 gmodule-2.0 libglade-2.0 --libs` | ||
17 | 19 | ||
18 | parse_SRC=zconf.y | 20 | parse_SRC=zconf.y |
19 | conf_SRC=conf.c $(parse_SRC) | 21 | conf_SRC=conf.c $(parse_SRC) |
20 | mconf_SRC=mconf.c $(parse_SRC) | 22 | mconf_SRC=mconf.c $(parse_SRC) |
21 | qconf_SRC=qconf.cc | 23 | qconf_SRC=qconf.cc |
24 | gconf_SRC=gconf.c kconfig_load.c | ||
22 | HDR=expr.h lkc.h lkc_proto.h qconf.h | 25 | HDR=expr.h lkc.h lkc_proto.h qconf.h |
23 | OTHER=README lkc-language.txt Makefile.kernel \ | 26 | OTHER=README lkc-language.txt Makefile.kernel \ |
24 | kconfig.i extconf.rb example | 27 | kconfig.i extconf.rb example |
25 | INST=zconf.y zconf.l confdata.c expr.c symbol.c menu.c \ | 28 | INST=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) |
27 | INSTGEN=lex.zconf.c zconf.tab.c | 30 | INSTGEN=lex.zconf.c zconf.tab.c |
28 | 31 | ||
29 | #DEBUG=1 | 32 | #DEBUG=1 |
30 | ifdef DEBUG | 33 | ifdef DEBUG |
31 | CFLAGS+=-DLKC_DIRECT_LINK | 34 | CFLAGS+=-DLKC_DIRECT_LINK |
32 | qconf_SRC+=$(parse_SRC) | 35 | qconf_SRC+=$(parse_SRC) |
33 | else | 36 | else |
34 | qconf_SRC+=kconfig_load.c | 37 | qconf_SRC+=kconfig_load.c |
35 | endif | 38 | endif |
36 | 39 | ||
37 | SRC=$(conf_SRC) $(mconf_SRC) $(qconf_SRC) | 40 | SRC=$(conf_SRC) $(mconf_SRC) $(qconf_SRC) |
38 | CSRC=$(filter %.c, $(SRC)) | 41 | CSRC=$(filter %.c, $(SRC)) |
39 | YSRC=$(filter %.y, $(SRC)) | 42 | YSRC=$(filter %.y, $(SRC)) |
40 | LSRC=$(filter %.l, $(SRC)) | 43 | LSRC=$(filter %.l, $(SRC)) |
41 | 44 | ||
42 | parse_OBJ=$(filter %.o, \ | 45 | parse_OBJ=$(filter %.o, \ |
43 | $(patsubst %.c,%.o, \ | 46 | $(patsubst %.c,%.o, \ |
44 | $(patsubst %.y,%.tab.o, \ | 47 | $(patsubst %.y,%.tab.o, \ |
45 | $(patsubst %.l,lex.%.o, \ | 48 | $(patsubst %.l,lex.%.o, \ |
46 | $(parse_SRC))))) | 49 | $(parse_SRC))))) |
47 | conf_OBJ=$(filter %.o, \ | 50 | conf_OBJ=$(filter %.o, \ |
48 | $(patsubst %.c,%.o, \ | 51 | $(patsubst %.c,%.o, \ |
49 | $(patsubst %.y,%.tab.o, \ | 52 | $(patsubst %.y,%.tab.o, \ |
50 | $(patsubst %.l,lex.%.o, \ | 53 | $(patsubst %.l,lex.%.o, \ |
51 | $(conf_SRC))))) | 54 | $(conf_SRC))))) |
52 | mconf_OBJ=$(filter %.o, \ | 55 | mconf_OBJ=$(filter %.o, \ |
53 | $(patsubst %.c,%.o, \ | 56 | $(patsubst %.c,%.o, \ |
54 | $(patsubst %.y,%.tab.o, \ | 57 | $(patsubst %.y,%.tab.o, \ |
55 | $(patsubst %.l,lex.%.o, \ | 58 | $(patsubst %.l,lex.%.o, \ |
56 | $(mconf_SRC))))) | 59 | $(mconf_SRC))))) |
57 | qconf_OBJ=$(filter %.o, \ | 60 | qconf_OBJ=$(filter %.o, \ |
58 | $(patsubst %.c,%.o, \ | 61 | $(patsubst %.c,%.o, \ |
59 | $(patsubst %.cc,%.o, \ | 62 | $(patsubst %.cc,%.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)))))) |
66 | gconf_OBJ=$(filter %.o, \ | ||
67 | $(patsubst %.c,%.o, \ | ||
68 | $(patsubst %.y,%.tab.o, \ | ||
69 | $(patsubst %.l,lex.%.o, \ | ||
70 | $(gconf_SRC))))) | ||
63 | OBJ=$(conf_OBJ) $(mconf_OBJ) $(qconf_OBJ) | 71 | OBJ=$(conf_OBJ) $(mconf_OBJ) $(qconf_OBJ) |
64 | 72 | ||
65 | ifeq ($(MOC),) | 73 | ifeq ($(MOC),) |
66 | all: conf mconf | 74 | all: conf mconf |
67 | else | 75 | else |
68 | all: conf mconf qconf libkconfig.so | 76 | all: conf mconf qconf libkconfig.so |
69 | endif | 77 | endif |
70 | 78 | ||
71 | lkc_deps := lkc.h lkc_proto.h lkc_defs.h expr.h | 79 | lkc_deps := lkc.h lkc_proto.h lkc_defs.h expr.h |
72 | 80 | ||
73 | zconf.tab.c: zconf.y | 81 | zconf.tab.c: zconf.y |
74 | zconf.tab.h: zconf.y | 82 | zconf.tab.h: zconf.y |
75 | lex.zconf.c: zconf.l | 83 | lex.zconf.c: zconf.l |
76 | zconf.tab.o: zconf.tab.c lex.zconf.c confdata.c expr.c symbol.c menu.c $(lkc_deps) | 84 | zconf.tab.o: zconf.tab.c lex.zconf.c confdata.c expr.c symbol.c menu.c $(lkc_deps) |
77 | #lex.zconf.o: lex.zconf.c zconf.tab.h $(lkc_deps) | 85 | #lex.zconf.o: lex.zconf.c zconf.tab.h $(lkc_deps) |
78 | #confdata.o: confdata.c $(lkc_deps) | 86 | #confdata.o: confdata.c $(lkc_deps) |
79 | #expr.o: expr.c $(lkc_deps) | 87 | #expr.o: expr.c $(lkc_deps) |
80 | #symbol.o: symbol.c $(lkc_deps) | 88 | #symbol.o: symbol.c $(lkc_deps) |
81 | #menu.o: menu.c $(lkc_deps) | 89 | #menu.o: menu.c $(lkc_deps) |
82 | kconfig_load.o: kconfig_load.c $(lkc_deps) | 90 | kconfig_load.o: kconfig_load.c $(lkc_deps) |
83 | conf.o: conf.c $(lkc_deps) | 91 | conf.o: conf.c $(lkc_deps) |
84 | mconf.o: mconf.c $(lkc_deps) | 92 | mconf.o: mconf.c $(lkc_deps) |
85 | qconf.moc: qconf.h | 93 | qconf.moc: qconf.h |
86 | qconf.o: qconf.cc qconf.moc images.c $(lkc_deps) | 94 | qconf.o: qconf.cc qconf.moc images.c $(lkc_deps) |
95 | gconf.o: gconf.c $(lkc_deps) | ||
87 | 96 | ||
88 | mconf: $(mconf_OBJ) | 97 | mconf: $(mconf_OBJ) |
89 | $(CC) $(LDFLAGS) $^ -o $@ | 98 | $(CC) $(LDFLAGS) $^ -o $@ |
90 | 99 | ||
91 | conf: $(conf_OBJ) | 100 | conf: $(conf_OBJ) |
92 | $(CC) $(LDFLAGS) $^ -o $@ | 101 | $(CC) $(LDFLAGS) $^ -o $@ |
93 | 102 | ||
94 | ifeq ($(MOC),) | 103 | ifeq ($(MOC),) |
95 | qconf: | 104 | qconf: |
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 |
100 | else | 109 | else |
101 | qconf: $(qconf_OBJ) | 110 | qconf: $(qconf_OBJ) |
102 | $(CXX) $(LXXFLAGS) $^ -lqt -o $@ | 111 | $(CXX) $(LXXFLAGS) $^ -lqt-mt -o $@ |
103 | endif | 112 | endif |
104 | 113 | ||
114 | gconf.o: gconf.c | ||
115 | $(CC) $(CFLAGS) $(GTKCFLAGS) -c $< -o $@ | ||
116 | |||
117 | gconf: $(gconf_OBJ) | ||
118 | $(CC) $(LDFLAGS) $(GTKLDFLAGS) $^ -o $@ | ||
119 | |||
105 | libkconfig.so: $(parse_OBJ) | 120 | libkconfig.so: $(parse_OBJ) |
106 | $(CC) -shared $^ -o $@ | 121 | $(CC) -shared $^ -o $@ |
107 | 122 | ||
108 | lkc_defs.h: lkc_proto.h | 123 | lkc_defs.h: lkc_proto.h |
109 | sed < $< > $@ 's/P(\([^,]*\),.*/#define \1 (\*\1_p)/' | 124 | sed < $< > $@ 's/P(\([^,]*\),.*/#define \1 (\*\1_p)/' |
110 | 125 | ||
111 | clean: | 126 | clean: |
112 | rm -f $(OBJ) conf qconf mconf *.moc lex.* *.tab.? *.output | 127 | rm -f $(OBJ) conf qconf mconf *.moc lex.* *.tab.? *.output |
113 | rm -rf .ruby .python | 128 | rm -rf .ruby .python |
114 | 129 | ||
115 | tgz: | 130 | tgz: |
116 | mkdir tmp | 131 | mkdir tmp |
117 | mkdir tmp/lkc-$(VERSION) | 132 | mkdir tmp/lkc-$(VERSION) |
118 | cp -ra Makefile $(sort $(SRC) $(HDR) $(OTHER) $(INST)) tmp/lkc-$(VERSION) | 133 | cp -ra Makefile $(sort $(SRC) $(HDR) $(OTHER) $(INST)) tmp/lkc-$(VERSION) |
119 | tar -cpvz -C tmp --exclude CVS -f lkc-$(VERSION).tar.gz lkc-$(VERSION) | 134 | tar -cpvz -C tmp --exclude CVS -f lkc-$(VERSION).tar.gz lkc-$(VERSION) |
120 | rm -rf tmp | 135 | rm -rf tmp |
121 | 136 | ||
122 | %.tab.c %.tab.h: %.y | 137 | %.tab.c %.tab.h: %.y |
123 | $(YACC) $(YFLAGS) -b $* -p $* $< | 138 | $(YACC) $(YFLAGS) -b $* -p $* $< |
124 | 139 | ||
125 | lex.%.c: %.l | 140 | 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 $@ |
133 | 148 | ||
134 | %.o: %.cc | 149 | %.o: %.cc |
135 | $(CXX) $(CXXFLAGS) -c $< -o $@ | 150 | $(CXX) $(CXXFLAGS) -c $< -o $@ |
136 | 151 | ||
137 | ifdef KERNELSRC | 152 | ifdef KERNELSRC |
138 | install: $(INSTGEN) | 153 | install: $(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 | ||
143 | diff: $(INSTGEN) | 159 | diff: $(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 | ||
147 | else | 164 | else |
148 | install: | 165 | install: |
149 | @echo "Please use KERNELSRC=<path/to/linux-kernel> to install" | 166 | @echo "Please use KERNELSRC=<path/to/linux-kernel> to install" |
150 | endif | 167 | endif |
151 | 168 | ||
152 | ruby: .ruby libkconfig.so .ruby/kconfig.so | 169 | ruby: .ruby libkconfig.so .ruby/kconfig.so |
153 | 170 | ||
154 | .ruby: | 171 | .ruby: |
155 | mkdir .ruby | 172 | mkdir .ruby |
156 | 173 | ||
157 | .ruby/kconfig_wrap.c: kconfig.i kconfig_load.c expr.h lkc_proto.h | 174 | .ruby/kconfig_wrap.c: kconfig.i kconfig_load.c expr.h lkc_proto.h |
158 | swig -ruby -o $@ $< | 175 | swig -ruby -o $@ $< |
159 | 176 | ||
160 | .ruby/Makefile: extconf.rb | 177 | .ruby/Makefile: extconf.rb |
161 | cd .ruby; ruby ../extconf.rb | 178 | cd .ruby; ruby ../extconf.rb |
162 | 179 | ||
163 | .ruby/kconfig.so: .ruby/kconfig_wrap.c .ruby/Makefile | 180 | .ruby/kconfig.so: .ruby/kconfig_wrap.c .ruby/Makefile |
164 | make -C .ruby | 181 | make -C .ruby |
165 | 182 | ||
166 | 183 | ||
167 | PYTHON_INCLUDE=$(shell python -c "import sys; print '-I'+sys.prefix+'/include/python'+sys.version[:3]") | 184 | PYTHON_INCLUDE=$(shell python -c "import sys; print '-I'+sys.prefix+'/include/python'+sys.version[:3]") |
168 | 185 | ||
169 | python: .python .python/kconfig.py .python/_kconfig.so | 186 | python: .python .python/kconfig.py .python/_kconfig.so |
170 | 187 | ||