author | kergoth <kergoth> | 2002-11-05 20:49:36 (UTC) |
---|---|---|
committer | kergoth <kergoth> | 2002-11-05 20:49:36 (UTC) |
commit | f8d2e3ed6d926e267bb5891f7e17ac094907a944 (patch) (unidiff) | |
tree | 27cf0206b89b42e8577106a321478cac1ff77c68 /scripts | |
parent | 59320e9eca887102cd841d0f1787b74fe4a11700 (diff) | |
download | opie-f8d2e3ed6d926e267bb5891f7e17ac094907a944.zip opie-f8d2e3ed6d926e267bb5891f7e17ac094907a944.tar.gz opie-f8d2e3ed6d926e267bb5891f7e17ac094907a944.tar.bz2 |
Add libkconfig.so to the makefile dependencies for qconf, should ensure it gets built
-rw-r--r-- | scripts/kconfig/Makefile | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/scripts/kconfig/Makefile b/scripts/kconfig/Makefile index b60db9f..7553311 100644 --- a/scripts/kconfig/Makefile +++ b/scripts/kconfig/Makefile | |||
@@ -1,189 +1,189 @@ | |||
1 | VERSION=1.2 | 1 | VERSION=1.2 |
2 | CC=gcc | 2 | CC=gcc |
3 | CXX=g++ | 3 | CXX=g++ |
4 | CFLAGS=-O2 -Wall -g -fPIC | 4 | CFLAGS=-O2 -Wall -g -fPIC |
5 | CXXFLAGS=$(CFLAGS) -I$(HOSTQTDIR)/include | 5 | CXXFLAGS=$(CFLAGS) -I$(HOSTQTDIR)/include |
6 | LDFLAGS= | 6 | LDFLAGS= |
7 | LXXFLAGS=$(LDFLAGS) -L$(HOSTQTDIR)/lib -Wl,-rpath,$(HOSTQTDIR)/lib | 7 | LXXFLAGS=$(LDFLAGS) -L$(HOSTQTDIR)/lib -Wl,-rpath,$(HOSTQTDIR)/lib |
8 | LEX=flex | 8 | LEX=flex |
9 | YACC=bison | 9 | YACC=bison |
10 | YFLAGS=-d -t -v | 10 | YFLAGS=-d -t -v |
11 | ifndef HOSTQTDIR | 11 | ifndef HOSTQTDIR |
12 | HOSTQTDIR=/usr/share/qt | 12 | HOSTQTDIR=/usr/share/qt |
13 | endif | 13 | endif |
14 | MOC=$(wildcard $(HOSTQTDIR)/bin/moc) | 14 | MOC=$(wildcard $(HOSTQTDIR)/bin/moc) |
15 | 15 | ||
16 | parse_SRC=zconf.y | 16 | parse_SRC=zconf.y |
17 | conf_SRC=conf.c $(parse_SRC) | 17 | conf_SRC=conf.c $(parse_SRC) |
18 | mconf_SRC=mconf.c $(parse_SRC) | 18 | mconf_SRC=mconf.c $(parse_SRC) |
19 | qconf_SRC=qconf.cc | 19 | qconf_SRC=qconf.cc |
20 | lkcc_SRC=cml1.y cml1.l help.l cml1.h expr1.c | 20 | lkcc_SRC=cml1.y cml1.l help.l cml1.h expr1.c |
21 | HDR=expr.h lkc.h lkc_proto.h qconf.h | 21 | HDR=expr.h lkc.h lkc_proto.h qconf.h |
22 | OTHER=README lkc_spec lkc_overview Makefile.kernel convert-all prepare-all.diff fixup-all.diff \ | 22 | OTHER=README lkc_spec lkc_overview Makefile.kernel convert-all prepare-all.diff fixup-all.diff \ |
23 | kconfig.i extconf.rb example | 23 | kconfig.i extconf.rb example |
24 | INST=zconf.y zconf.l confdata.c expr.c symbol.c menu.c conf.c mconf.c qconf.cc kconfig_load.c images.c $(parse_SRC) $(HDR) | 24 | INST=zconf.y zconf.l confdata.c expr.c symbol.c menu.c conf.c mconf.c qconf.cc kconfig_load.c images.c $(parse_SRC) $(HDR) |
25 | INSTGEN=lex.zconf.c zconf.tab.c zconf.tab.h | 25 | INSTGEN=lex.zconf.c zconf.tab.c zconf.tab.h |
26 | 26 | ||
27 | #DEBUG=1 | 27 | #DEBUG=1 |
28 | ifdef DEBUG | 28 | ifdef DEBUG |
29 | CFLAGS+=-DLKC_DIRECT_LINK | 29 | CFLAGS+=-DLKC_DIRECT_LINK |
30 | qconf_SRC+=$(parse_SRC) | 30 | qconf_SRC+=$(parse_SRC) |
31 | else | 31 | else |
32 | qconf_SRC+=kconfig_load.c | 32 | qconf_SRC+=kconfig_load.c |
33 | endif | 33 | endif |
34 | 34 | ||
35 | SRC=$(conf_SRC) $(mconf_SRC) $(qconf_SRC) $(lkcc_SRC) | 35 | SRC=$(conf_SRC) $(mconf_SRC) $(qconf_SRC) $(lkcc_SRC) |
36 | CSRC=$(filter %.c, $(SRC)) | 36 | CSRC=$(filter %.c, $(SRC)) |
37 | YSRC=$(filter %.y, $(SRC)) | 37 | YSRC=$(filter %.y, $(SRC)) |
38 | LSRC=$(filter %.l, $(SRC)) | 38 | LSRC=$(filter %.l, $(SRC)) |
39 | 39 | ||
40 | parse_OBJ=$(filter %.o, \ | 40 | parse_OBJ=$(filter %.o, \ |
41 | $(patsubst %.c,%.o, \ | 41 | $(patsubst %.c,%.o, \ |
42 | $(patsubst %.y,%.tab.o, \ | 42 | $(patsubst %.y,%.tab.o, \ |
43 | $(patsubst %.l,lex.%.o, \ | 43 | $(patsubst %.l,lex.%.o, \ |
44 | $(parse_SRC))))) | 44 | $(parse_SRC))))) |
45 | conf_OBJ=$(filter %.o, \ | 45 | conf_OBJ=$(filter %.o, \ |
46 | $(patsubst %.c,%.o, \ | 46 | $(patsubst %.c,%.o, \ |
47 | $(patsubst %.y,%.tab.o, \ | 47 | $(patsubst %.y,%.tab.o, \ |
48 | $(patsubst %.l,lex.%.o, \ | 48 | $(patsubst %.l,lex.%.o, \ |
49 | $(conf_SRC))))) | 49 | $(conf_SRC))))) |
50 | mconf_OBJ=$(filter %.o, \ | 50 | mconf_OBJ=$(filter %.o, \ |
51 | $(patsubst %.c,%.o, \ | 51 | $(patsubst %.c,%.o, \ |
52 | $(patsubst %.y,%.tab.o, \ | 52 | $(patsubst %.y,%.tab.o, \ |
53 | $(patsubst %.l,lex.%.o, \ | 53 | $(patsubst %.l,lex.%.o, \ |
54 | $(mconf_SRC))))) | 54 | $(mconf_SRC))))) |
55 | qconf_OBJ=$(filter %.o, \ | 55 | qconf_OBJ=$(filter %.o, \ |
56 | $(patsubst %.c,%.o, \ | 56 | $(patsubst %.c,%.o, \ |
57 | $(patsubst %.cc,%.o, \ | 57 | $(patsubst %.cc,%.o, \ |
58 | $(patsubst %.y,%.tab.o, \ | 58 | $(patsubst %.y,%.tab.o, \ |
59 | $(patsubst %.l,lex.%.o, \ | 59 | $(patsubst %.l,lex.%.o, \ |
60 | $(qconf_SRC)))))) | 60 | $(qconf_SRC)))))) |
61 | lkcc_OBJ=$(filter %.o, \ | 61 | lkcc_OBJ=$(filter %.o, \ |
62 | $(patsubst %.c,%.o, \ | 62 | $(patsubst %.c,%.o, \ |
63 | $(patsubst %.y,%.tab.o, \ | 63 | $(patsubst %.y,%.tab.o, \ |
64 | $(patsubst %.l,lex.%.o, \ | 64 | $(patsubst %.l,lex.%.o, \ |
65 | $(lkcc_SRC))))) | 65 | $(lkcc_SRC))))) |
66 | OBJ=$(conf_OBJ) $(mconf_OBJ) $(qconf_OBJ) $(lkcc_OBJ) | 66 | OBJ=$(conf_OBJ) $(mconf_OBJ) $(qconf_OBJ) $(lkcc_OBJ) |
67 | 67 | ||
68 | ifeq ($(MOC),) | 68 | ifeq ($(MOC),) |
69 | all: lkcc conf mconf | 69 | all: lkcc conf mconf |
70 | else | 70 | else |
71 | all: lkcc conf mconf qconf libkconfig.so | 71 | all: lkcc conf mconf qconf libkconfig.so |
72 | endif | 72 | endif |
73 | 73 | ||
74 | lex.help.c: help.l | 74 | lex.help.c: help.l |
75 | lex.help.o: lex.help.c cml1.h expr.h | 75 | lex.help.o: lex.help.c cml1.h expr.h |
76 | lex.cml1.c: cml1.l | 76 | lex.cml1.c: cml1.l |
77 | lex.cml1.o: lex.cml1.c cml1.tab.h cml1.h expr.h | 77 | lex.cml1.o: lex.cml1.c cml1.tab.h cml1.h expr.h |
78 | cml1.tab.c: cml1.y | 78 | cml1.tab.c: cml1.y |
79 | cml1.tab.h: cml1.y | 79 | cml1.tab.h: cml1.y |
80 | cml1.tab.o: cml1.tab.c cml1.h expr.h | 80 | cml1.tab.o: cml1.tab.c cml1.h expr.h |
81 | expr1.o: expr1.c expr.h | 81 | expr1.o: expr1.c expr.h |
82 | 82 | ||
83 | lkc_deps := lkc.h lkc_proto.h lkc_defs.h expr.h | 83 | lkc_deps := lkc.h lkc_proto.h lkc_defs.h expr.h |
84 | 84 | ||
85 | zconf.tab.c: zconf.y | 85 | zconf.tab.c: zconf.y |
86 | zconf.tab.h: zconf.y | 86 | zconf.tab.h: zconf.y |
87 | lex.zconf.c: zconf.l | 87 | lex.zconf.c: zconf.l |
88 | zconf.tab.o: zconf.tab.c lex.zconf.c confdata.c expr.c symbol.c menu.c $(lkc_deps) | 88 | zconf.tab.o: zconf.tab.c lex.zconf.c confdata.c expr.c symbol.c menu.c $(lkc_deps) |
89 | #lex.zconf.o: lex.zconf.c zconf.tab.h $(lkc_deps) | 89 | #lex.zconf.o: lex.zconf.c zconf.tab.h $(lkc_deps) |
90 | #confdata.o: confdata.c $(lkc_deps) | 90 | #confdata.o: confdata.c $(lkc_deps) |
91 | #expr.o: expr.c $(lkc_deps) | 91 | #expr.o: expr.c $(lkc_deps) |
92 | #symbol.o: symbol.c $(lkc_deps) | 92 | #symbol.o: symbol.c $(lkc_deps) |
93 | #menu.o: menu.c $(lkc_deps) | 93 | #menu.o: menu.c $(lkc_deps) |
94 | kconfig_load.o: kconfig_load.c $(lkc_deps) | 94 | kconfig_load.o: kconfig_load.c $(lkc_deps) |
95 | conf.o: conf.c $(lkc_deps) | 95 | conf.o: conf.c $(lkc_deps) |
96 | mconf.o: mconf.c $(lkc_deps) | 96 | mconf.o: mconf.c $(lkc_deps) |
97 | qconf.moc: qconf.h | 97 | qconf.moc: qconf.h |
98 | qconf.o: qconf.cc qconf.moc images.c $(lkc_deps) | 98 | qconf.o: qconf.cc qconf.moc images.c $(lkc_deps) |
99 | 99 | ||
100 | mconf: $(mconf_OBJ) | 100 | mconf: $(mconf_OBJ) |
101 | $(CC) $(LDFLAGS) $^ -o $@ | 101 | $(CC) $(LDFLAGS) $^ -o $@ |
102 | 102 | ||
103 | conf: $(conf_OBJ) | 103 | conf: $(conf_OBJ) |
104 | $(CC) $(LDFLAGS) $^ -o $@ | 104 | $(CC) $(LDFLAGS) $^ -o $@ |
105 | 105 | ||
106 | ifeq ($(MOC),) | 106 | ifeq ($(MOC),) |
107 | qconf: | 107 | qconf: |
108 | @echo Unable to find the QT installation. Please make sure that the | 108 | @echo Unable to find the QT installation. Please make sure that the |
109 | @echo QT development package is correctly installed and the HOSTQTDIR | 109 | @echo QT development package is correctly installed and the HOSTQTDIR |
110 | @echo environment variable is set to the correct location. | 110 | @echo environment variable is set to the correct location. |
111 | @false | 111 | @false |
112 | else | 112 | else |
113 | qconf: $(qconf_OBJ) | 113 | qconf: $(qconf_OBJ) libkconfig.so |
114 | $(CXX) $(LXXFLAGS) $^ -lqt -o $@ | 114 | $(CXX) $(LXXFLAGS) $^ -lqt -o $@ |
115 | endif | 115 | endif |
116 | 116 | ||
117 | lkcc: $(lkcc_OBJ) | 117 | lkcc: $(lkcc_OBJ) |
118 | $(CC) $(LDFLAGS) $^ -o $@ | 118 | $(CC) $(LDFLAGS) $^ -o $@ |
119 | 119 | ||
120 | libkconfig.so: $(parse_OBJ) | 120 | libkconfig.so: $(parse_OBJ) |
121 | $(CC) -shared $^ -o $@ | 121 | $(CC) -shared $^ -o $@ |
122 | 122 | ||
123 | lkc_defs.h: lkc_proto.h | 123 | lkc_defs.h: lkc_proto.h |
124 | sed < $< > $@ 's/P(\([^,]*\),.*/#define \1 (\*\1_p)/' | 124 | sed < $< > $@ 's/P(\([^,]*\),.*/#define \1 (\*\1_p)/' |
125 | 125 | ||
126 | clean: | 126 | clean: |
127 | rm -f $(OBJ) lkcc conf qconf mconf *.moc lex.* *.tab.? *.output | 127 | rm -f $(OBJ) lkcc conf qconf mconf *.moc lex.* *.tab.? *.output |
128 | 128 | ||
129 | tgz: | 129 | tgz: |
130 | mkdir tmp | 130 | mkdir tmp |
131 | mkdir tmp/lkc-$(VERSION) | 131 | mkdir tmp/lkc-$(VERSION) |
132 | cp -ra Makefile $(sort $(SRC) $(HDR) $(OTHER) $(INST)) tmp/lkc-$(VERSION) | 132 | cp -ra Makefile $(sort $(SRC) $(HDR) $(OTHER) $(INST)) tmp/lkc-$(VERSION) |
133 | tar -cpvz -C tmp -f lkc-$(VERSION).tar.gz lkc-$(VERSION) | 133 | tar -cpvz -C tmp -f lkc-$(VERSION).tar.gz lkc-$(VERSION) |
134 | rm -rf tmp | 134 | rm -rf tmp |
135 | 135 | ||
136 | %.tab.c %.tab.h: %.y | 136 | %.tab.c %.tab.h: %.y |
137 | $(YACC) $(YFLAGS) -b $* -p $* $< | 137 | $(YACC) $(YFLAGS) -b $* -p $* $< |
138 | 138 | ||
139 | lex.%.c: %.l | 139 | lex.%.c: %.l |
140 | $(LEX) $(LFLAGS) -P$* $< | 140 | $(LEX) $(LFLAGS) -P$* $< |
141 | 141 | ||
142 | %.moc: %.h | 142 | %.moc: %.h |
143 | $(HOSTQTDIR)/bin/moc -i $< -o $@ | 143 | $(HOSTQTDIR)/bin/moc -i $< -o $@ |
144 | 144 | ||
145 | %.o: %.c | 145 | %.o: %.c |
146 | $(CC) $(CFLAGS) -c $< -o $@ | 146 | $(CC) $(CFLAGS) -c $< -o $@ |
147 | 147 | ||
148 | %.o: %.cc | 148 | %.o: %.cc |
149 | $(CXX) $(CXXFLAGS) -c $< -o $@ | 149 | $(CXX) $(CXXFLAGS) -c $< -o $@ |
150 | 150 | ||
151 | ifdef KERNELSRC | 151 | ifdef KERNELSRC |
152 | install: lkcc $(INSTGEN) | 152 | install: lkcc $(INSTGEN) |
153 | set -x; mkdir $(KERNELSRC)/scripts/kconfig; \ | 153 | set -x; mkdir $(KERNELSRC)/scripts/kconfig; \ |
154 | cp $(sort $(INST)) $(KERNELSRC)/scripts/kconfig; \ | 154 | cp $(sort $(INST)) $(KERNELSRC)/scripts/kconfig; \ |
155 | for f in $(INSTGEN); do cp $$f $(KERNELSRC)/scripts/kconfig/$${f}_shipped; done; \ | 155 | for f in $(INSTGEN); do cp $$f $(KERNELSRC)/scripts/kconfig/$${f}_shipped; done; \ |
156 | cp Makefile.kernel $(KERNELSRC)/scripts/kconfig/Makefile; \ | 156 | cp Makefile.kernel $(KERNELSRC)/scripts/kconfig/Makefile; \ |
157 | LKCSRC=$$PWD; export LKCSRC; \ | 157 | LKCSRC=$$PWD; export LKCSRC; \ |
158 | cd $(KERNELSRC); \ | 158 | cd $(KERNELSRC); \ |
159 | patch -p0 -N < $$LKCSRC/prepare-all.diff; \ | 159 | patch -p0 -N < $$LKCSRC/prepare-all.diff; \ |
160 | sh $$LKCSRC/convert-all; \ | 160 | sh $$LKCSRC/convert-all; \ |
161 | patch -p0 -N < $$LKCSRC/fixup-all.diff | 161 | patch -p0 -N < $$LKCSRC/fixup-all.diff |
162 | 162 | ||
163 | #cp Makefile $(KERNELSRC)/scripts/kconfig/Makefile; \ | 163 | #cp Makefile $(KERNELSRC)/scripts/kconfig/Makefile; \ |
164 | 164 | ||
165 | uninstall: | 165 | uninstall: |
166 | patch -p0 -N -R -d $(KERNELSRC) < prepare-all.diff; \ | 166 | patch -p0 -N -R -d $(KERNELSRC) < prepare-all.diff; \ |
167 | cd $(KERNELSRC); \ | 167 | cd $(KERNELSRC); \ |
168 | find -name "Kconfig*" | xargs rm; \ | 168 | find -name "Kconfig*" | xargs rm; \ |
169 | rm -rf scripts/kconfig log.* | 169 | rm -rf scripts/kconfig log.* |
170 | else | 170 | else |
171 | install: | 171 | install: |
172 | @echo "Please use KERNELSRC=<path/to/linux-kernel> to install" | 172 | @echo "Please use KERNELSRC=<path/to/linux-kernel> to install" |
173 | endif | 173 | endif |
174 | 174 | ||
175 | ruby: .ruby libkconfig.so .ruby/kconfig.so | 175 | ruby: .ruby libkconfig.so .ruby/kconfig.so |
176 | 176 | ||
177 | .ruby: | 177 | .ruby: |
178 | mkdir .ruby | 178 | mkdir .ruby |
179 | 179 | ||
180 | .ruby/kconfig_wrap.c: kconfig.i kconfig_load.c expr.h lkc_proto.h | 180 | .ruby/kconfig_wrap.c: kconfig.i kconfig_load.c expr.h lkc_proto.h |
181 | swig -ruby -o $@ $< | 181 | swig -ruby -o $@ $< |
182 | 182 | ||
183 | .ruby/Makefile: extconf.rb | 183 | .ruby/Makefile: extconf.rb |
184 | cd .ruby; ruby ../extconf.rb | 184 | cd .ruby; ruby ../extconf.rb |
185 | 185 | ||
186 | .ruby/kconfig.so: .ruby/kconfig_wrap.c .ruby/Makefile | 186 | .ruby/kconfig.so: .ruby/kconfig_wrap.c .ruby/Makefile |
187 | make -C .ruby | 187 | make -C .ruby |
188 | 188 | ||
189 | .PHONY: all tgz clean ruby | 189 | .PHONY: all tgz clean ruby |