summaryrefslogtreecommitdiff
path: root/scripts
authorkergoth <kergoth>2002-11-05 20:49:36 (UTC)
committer kergoth <kergoth>2002-11-05 20:49:36 (UTC)
commitf8d2e3ed6d926e267bb5891f7e17ac094907a944 (patch) (unidiff)
tree27cf0206b89b42e8577106a321478cac1ff77c68 /scripts
parent59320e9eca887102cd841d0f1787b74fe4a11700 (diff)
downloadopie-f8d2e3ed6d926e267bb5891f7e17ac094907a944.zip
opie-f8d2e3ed6d926e267bb5891f7e17ac094907a944.tar.gz
opie-f8d2e3ed6d926e267bb5891f7e17ac094907a944.tar.bz2
Add libkconfig.so to the makefile dependencies for qconf, should ensure it gets built
Diffstat (limited to 'scripts') (more/less context) (ignore whitespace changes)
-rw-r--r--scripts/kconfig/Makefile2
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 @@
1VERSION=1.2 1VERSION=1.2
2CC=gcc 2CC=gcc
3CXX=g++ 3CXX=g++
4CFLAGS=-O2 -Wall -g -fPIC 4CFLAGS=-O2 -Wall -g -fPIC
5CXXFLAGS=$(CFLAGS) -I$(HOSTQTDIR)/include 5CXXFLAGS=$(CFLAGS) -I$(HOSTQTDIR)/include
6LDFLAGS= 6LDFLAGS=
7LXXFLAGS=$(LDFLAGS) -L$(HOSTQTDIR)/lib -Wl,-rpath,$(HOSTQTDIR)/lib 7LXXFLAGS=$(LDFLAGS) -L$(HOSTQTDIR)/lib -Wl,-rpath,$(HOSTQTDIR)/lib
8LEX=flex 8LEX=flex
9YACC=bison 9YACC=bison
10YFLAGS=-d -t -v 10YFLAGS=-d -t -v
11ifndef HOSTQTDIR 11ifndef HOSTQTDIR
12HOSTQTDIR=/usr/share/qt 12HOSTQTDIR=/usr/share/qt
13endif 13endif
14MOC=$(wildcard $(HOSTQTDIR)/bin/moc) 14MOC=$(wildcard $(HOSTQTDIR)/bin/moc)
15 15
16parse_SRC=zconf.y 16parse_SRC=zconf.y
17conf_SRC=conf.c $(parse_SRC) 17conf_SRC=conf.c $(parse_SRC)
18mconf_SRC=mconf.c $(parse_SRC) 18mconf_SRC=mconf.c $(parse_SRC)
19qconf_SRC=qconf.cc 19qconf_SRC=qconf.cc
20lkcc_SRC=cml1.y cml1.l help.l cml1.h expr1.c 20lkcc_SRC=cml1.y cml1.l help.l cml1.h expr1.c
21HDR=expr.h lkc.h lkc_proto.h qconf.h 21HDR=expr.h lkc.h lkc_proto.h qconf.h
22OTHER=README lkc_spec lkc_overview Makefile.kernel convert-all prepare-all.diff fixup-all.diff \ 22OTHER=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
24INST=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) 24INST=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)
25INSTGEN=lex.zconf.c zconf.tab.c zconf.tab.h 25INSTGEN=lex.zconf.c zconf.tab.c zconf.tab.h
26 26
27#DEBUG=1 27#DEBUG=1
28ifdef DEBUG 28ifdef DEBUG
29CFLAGS+=-DLKC_DIRECT_LINK 29CFLAGS+=-DLKC_DIRECT_LINK
30qconf_SRC+=$(parse_SRC) 30qconf_SRC+=$(parse_SRC)
31else 31else
32qconf_SRC+=kconfig_load.c 32qconf_SRC+=kconfig_load.c
33endif 33endif
34 34
35SRC=$(conf_SRC) $(mconf_SRC) $(qconf_SRC) $(lkcc_SRC) 35SRC=$(conf_SRC) $(mconf_SRC) $(qconf_SRC) $(lkcc_SRC)
36CSRC=$(filter %.c, $(SRC)) 36CSRC=$(filter %.c, $(SRC))
37YSRC=$(filter %.y, $(SRC)) 37YSRC=$(filter %.y, $(SRC))
38LSRC=$(filter %.l, $(SRC)) 38LSRC=$(filter %.l, $(SRC))
39 39
40parse_OBJ=$(filter %.o, \ 40parse_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)))))
45conf_OBJ=$(filter %.o, \ 45conf_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)))))
50mconf_OBJ=$(filter %.o, \ 50mconf_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)))))
55qconf_OBJ=$(filter %.o, \ 55qconf_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))))))
61lkcc_OBJ=$(filter %.o, \ 61lkcc_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)))))
66OBJ=$(conf_OBJ) $(mconf_OBJ) $(qconf_OBJ) $(lkcc_OBJ) 66OBJ=$(conf_OBJ) $(mconf_OBJ) $(qconf_OBJ) $(lkcc_OBJ)
67 67
68ifeq ($(MOC),) 68ifeq ($(MOC),)
69all: lkcc conf mconf 69all: lkcc conf mconf
70else 70else
71all: lkcc conf mconf qconf libkconfig.so 71all: lkcc conf mconf qconf libkconfig.so
72endif 72endif
73 73
74lex.help.c: help.l 74lex.help.c: help.l
75lex.help.o: lex.help.c cml1.h expr.h 75lex.help.o: lex.help.c cml1.h expr.h
76lex.cml1.c: cml1.l 76lex.cml1.c: cml1.l
77lex.cml1.o: lex.cml1.c cml1.tab.h cml1.h expr.h 77lex.cml1.o: lex.cml1.c cml1.tab.h cml1.h expr.h
78cml1.tab.c: cml1.y 78cml1.tab.c: cml1.y
79cml1.tab.h: cml1.y 79cml1.tab.h: cml1.y
80cml1.tab.o: cml1.tab.c cml1.h expr.h 80cml1.tab.o: cml1.tab.c cml1.h expr.h
81expr1.o: expr1.c expr.h 81expr1.o: expr1.c expr.h
82 82
83lkc_deps := lkc.h lkc_proto.h lkc_defs.h expr.h 83lkc_deps := lkc.h lkc_proto.h lkc_defs.h expr.h
84 84
85zconf.tab.c: zconf.y 85zconf.tab.c: zconf.y
86zconf.tab.h: zconf.y 86zconf.tab.h: zconf.y
87lex.zconf.c: zconf.l 87lex.zconf.c: zconf.l
88zconf.tab.o: zconf.tab.c lex.zconf.c confdata.c expr.c symbol.c menu.c $(lkc_deps) 88zconf.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)
94kconfig_load.o: kconfig_load.c $(lkc_deps) 94kconfig_load.o: kconfig_load.c $(lkc_deps)
95conf.o: conf.c $(lkc_deps) 95conf.o: conf.c $(lkc_deps)
96mconf.o: mconf.c $(lkc_deps) 96mconf.o: mconf.c $(lkc_deps)
97qconf.moc: qconf.h 97qconf.moc: qconf.h
98qconf.o: qconf.cc qconf.moc images.c $(lkc_deps) 98qconf.o: qconf.cc qconf.moc images.c $(lkc_deps)
99 99
100mconf: $(mconf_OBJ) 100mconf: $(mconf_OBJ)
101 $(CC) $(LDFLAGS) $^ -o $@ 101 $(CC) $(LDFLAGS) $^ -o $@
102 102
103conf: $(conf_OBJ) 103conf: $(conf_OBJ)
104 $(CC) $(LDFLAGS) $^ -o $@ 104 $(CC) $(LDFLAGS) $^ -o $@
105 105
106ifeq ($(MOC),) 106ifeq ($(MOC),)
107qconf: 107qconf:
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
112else 112else
113qconf: $(qconf_OBJ) 113qconf: $(qconf_OBJ) libkconfig.so
114 $(CXX) $(LXXFLAGS) $^ -lqt -o $@ 114 $(CXX) $(LXXFLAGS) $^ -lqt -o $@
115endif 115endif
116 116
117lkcc: $(lkcc_OBJ) 117lkcc: $(lkcc_OBJ)
118 $(CC) $(LDFLAGS) $^ -o $@ 118 $(CC) $(LDFLAGS) $^ -o $@
119 119
120libkconfig.so: $(parse_OBJ) 120libkconfig.so: $(parse_OBJ)
121 $(CC) -shared $^ -o $@ 121 $(CC) -shared $^ -o $@
122 122
123lkc_defs.h: lkc_proto.h 123lkc_defs.h: lkc_proto.h
124 sed < $< > $@ 's/P(\([^,]*\),.*/#define \1 (\*\1_p)/' 124 sed < $< > $@ 's/P(\([^,]*\),.*/#define \1 (\*\1_p)/'
125 125
126clean: 126clean:
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
129tgz: 129tgz:
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
139lex.%.c: %.l 139lex.%.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
151ifdef KERNELSRC 151ifdef KERNELSRC
152install: lkcc $(INSTGEN) 152install: 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
165uninstall: 165uninstall:
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.*
170else 170else
171install: 171install:
172 @echo "Please use KERNELSRC=<path/to/linux-kernel> to install" 172 @echo "Please use KERNELSRC=<path/to/linux-kernel> to install"
173endif 173endif
174 174
175ruby: .ruby libkconfig.so .ruby/kconfig.so 175ruby: .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