summaryrefslogtreecommitdiff
Unidiff
Diffstat (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 b918300..6006a80 100644
--- a/scripts/kconfig/Makefile
+++ b/scripts/kconfig/Makefile
@@ -53,146 +53,146 @@ conf_OBJ=$(filter %.o, \
53 $(patsubst %.l,lex.%.o, \ 53 $(patsubst %.l,lex.%.o, \
54 $(conf_SRC))))) 54 $(conf_SRC)))))
55mconf_OBJ=$(filter %.o, \ 55mconf_OBJ=$(filter %.o, \
56 $(patsubst %.c,%.o, \ 56 $(patsubst %.c,%.o, \
57 $(patsubst %.y,%.tab.o, \ 57 $(patsubst %.y,%.tab.o, \
58 $(patsubst %.l,lex.%.o, \ 58 $(patsubst %.l,lex.%.o, \
59 $(mconf_SRC))))) 59 $(mconf_SRC)))))
60qconf_OBJ=$(filter %.o, \ 60qconf_OBJ=$(filter %.o, \
61 $(patsubst %.c,%.o, \ 61 $(patsubst %.c,%.o, \
62 $(patsubst %.cc,%.o, \ 62 $(patsubst %.cc,%.o, \
63 $(patsubst %.y,%.tab.o, \ 63 $(patsubst %.y,%.tab.o, \
64 $(patsubst %.l,lex.%.o, \ 64 $(patsubst %.l,lex.%.o, \
65 $(qconf_SRC)))))) 65 $(qconf_SRC))))))
66gconf_OBJ=$(filter %.o, \ 66gconf_OBJ=$(filter %.o, \
67 $(patsubst %.c,%.o, \ 67 $(patsubst %.c,%.o, \
68 $(patsubst %.y,%.tab.o, \ 68 $(patsubst %.y,%.tab.o, \
69 $(patsubst %.l,lex.%.o, \ 69 $(patsubst %.l,lex.%.o, \
70 $(gconf_SRC))))) 70 $(gconf_SRC)))))
71OBJ=$(conf_OBJ) $(mconf_OBJ) $(qconf_OBJ) 71OBJ=$(conf_OBJ) $(mconf_OBJ) $(qconf_OBJ)
72 72
73ifeq ($(MOC),) 73ifeq ($(MOC),)
74all: conf mconf 74all: conf mconf
75else 75else
76all: conf mconf qconf libkconfig.so 76all: conf mconf qconf libkconfig.so
77endif 77endif
78 78
79lkc_deps := lkc.h lkc_proto.h lkc_defs.h expr.h 79lkc_deps := lkc.h lkc_proto.h lkc_defs.h expr.h
80 80
81zconf.tab.c: zconf.y 81zconf.tab.c: zconf.y
82zconf.tab.h: zconf.y 82zconf.tab.h: zconf.y
83lex.zconf.c: zconf.l 83lex.zconf.c: zconf.l
84zconf.tab.o: zconf.tab.c lex.zconf.c confdata.c expr.c symbol.c menu.c $(lkc_deps) 84zconf.tab.o: zconf.tab.c lex.zconf.c confdata.c expr.c symbol.c menu.c $(lkc_deps)
85#lex.zconf.o: lex.zconf.c zconf.tab.h $(lkc_deps) 85#lex.zconf.o: lex.zconf.c zconf.tab.h $(lkc_deps)
86#confdata.o: confdata.c $(lkc_deps) 86#confdata.o: confdata.c $(lkc_deps)
87#expr.o: expr.c $(lkc_deps) 87#expr.o: expr.c $(lkc_deps)
88#symbol.o: symbol.c $(lkc_deps) 88#symbol.o: symbol.c $(lkc_deps)
89#menu.o: menu.c $(lkc_deps) 89#menu.o: menu.c $(lkc_deps)
90kconfig_load.o: kconfig_load.c $(lkc_deps) 90kconfig_load.o: kconfig_load.c $(lkc_deps)
91conf.o: conf.c $(lkc_deps) 91conf.o: conf.c $(lkc_deps)
92mconf.o: mconf.c $(lkc_deps) 92mconf.o: mconf.c $(lkc_deps)
93qconf.moc: qconf.h 93qconf.moc: qconf.h
94qconf.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) 95gconf.o: gconf.c $(lkc_deps)
96 96
97mconf: $(mconf_OBJ) 97mconf: $(mconf_OBJ)
98 $(CC) $(LDFLAGS) $^ -o $@ 98 $(CC) $(LDFLAGS) $^ -o $@
99 99
100conf: $(conf_OBJ) 100conf: $(conf_OBJ)
101 $(CC) $(LDFLAGS) $^ -o $@ 101 $(CC) $(LDFLAGS) $^ -o $@
102 102
103ifeq ($(MOC),) 103ifeq ($(MOC),)
104qconf: 104qconf:
105 @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
106 @echo QT development package is correctly installed and the QTDIR 106 @echo QT development package is correctly installed and the QTDIR
107 @echo environment variable is set to the correct location. 107 @echo environment variable is set to the correct location.
108 @false 108 @false
109else 109else
110qconf: $(qconf_OBJ) 110qconf: $(qconf_OBJ)
111 $(CXX) $(LXXFLAGS) $^ -lqt-mt -o $@ 111 $(CXX) $(LXXFLAGS) $^ -lqt-mt -o $@
112endif 112endif
113 113
114gconf.o: gconf.c 114gconf.o: gconf.c
115 $(CC) $(CFLAGS) $(GTKCFLAGS) -c $< -o $@ 115 $(CC) $(CFLAGS) $(GTKCFLAGS) -c $< -o $@
116 116
117gconf: $(gconf_OBJ) 117gconf: $(gconf_OBJ)
118 $(CC) $(LDFLAGS) $(GTKLDFLAGS) $^ -o $@ 118 $(CC) $(LDFLAGS) $(GTKLDFLAGS) $^ -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) conf qconf mconf *.moc lex.* *.tab.? *.output 127 rm -f $(OBJ) conf qconf mconf *.moc lex.* *.tab.? *.output
128 rm -rf .ruby .python 128 rm -rf .ruby .python
129 129
130tgz: 130tgz:
131 mkdir tmp 131 mkdir tmp
132 mkdir tmp/lkc-$(VERSION) 132 mkdir tmp/lkc-$(VERSION)
133 cp -ra Makefile $(sort $(SRC) $(HDR) $(OTHER) $(INST)) tmp/lkc-$(VERSION) 133 cp -ra Makefile $(sort $(SRC) $(HDR) $(OTHER) $(INST)) tmp/lkc-$(VERSION)
134 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)
135 rm -rf tmp 135 rm -rf tmp
136 136
137%.tab.c %.tab.h: %.y 137%.tab.c %.tab.h: %.y
138 $(YACC) $(YFLAGS) -b $* -p $* $< 138 $(YACC) $(YFLAGS) -b $* -p $* $<
139 139
140lex.%.c: %.l 140lex.%.c: %.l
141 $(LEX) $(LFLAGS) -P$* $< 141 $(LEX) $(LFLAGS) -P$* $<
142 142
143%.moc: %.h 143%.moc: %.h
144 $(QTDIR)/bin/moc -i $< -o $@ 144 $(QTDIR)/bin/moc -i $< -o $@
145 145
146%.o: %.c 146%.o: %.c
147 $(CC) $(CFLAGS) -c $< -o $@ 147 $(CC) $(CFLAGS) -c $< -o $@
148 148
149%.o: %.cc 149%.o: %.cc
150 $(CXX) $(CXXFLAGS) -c $< -o $@ 150 $(CXX) $(CXXFLAGS) -c $< -o $@
151 151
152ifdef KERNELSRC 152ifdef KERNELSRC
153install: $(INSTGEN) 153install: $(INSTGEN)
154 set -x; cp --remove-destination $(sort $(INST)) $(KERNELSRC)/scripts/kconfig; \ 154 set -x; cp --remove-destination $(sort $(INST)) $(KERNELSRC)/scripts/kconfig; \
155 for f in $(INSTGEN); do cp --remove-destination $$f $(KERNELSRC)/scripts/kconfig/$${f}_shipped; done; \ 155 for f in $(INSTGEN); do cp --remove-destination $$f $(KERNELSRC)/scripts/kconfig/$${f}_shipped; done; \
156 cp --remove-destination 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 157 cp --remove-destination lkc-language.txt $(KERNELSRC)/Documentation/kbuild/kconfig-language.txt
158 158
159diff: $(INSTGEN) 159diff: $(INSTGEN)
160 for f in $(sort $(INST)); do diff -Nu $(KERNELSRC)/scripts/kconfig/$$f $$f; done; \ 160 for f in $(sort $(INST)); do diff -Nu $(KERNELSRC)/scripts/kconfig/$$f $$f; done; \
161 for f in $(INSTGEN); do diff -Nu $(KERNELSRC)/scripts/kconfig/$${f}_shipped $$f; done; \ 161 for f in $(INSTGEN); do diff -Nu $(KERNELSRC)/scripts/kconfig/$${f}_shipped $$f; done; \
162 diff -Nu $(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 163 diff -Nu lkc-language.txt $(KERNELSRC)/Documentation/kbuild/kconfig-language.txt
164else 164else
165install: 165install:
166 @echo "Please use KERNELSRC=<path/to/linux-kernel> to install" 166 @echo "Please use KERNELSRC=<path/to/linux-kernel> to install"
167endif 167endif
168 168
169ruby: .ruby libkconfig.so .ruby/kconfig.so 169ruby: .ruby libkconfig.so .ruby/kconfig.so
170 170
171.ruby: 171.ruby:
172 mkdir .ruby 172 mkdir .ruby
173 173
174.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
175 swig -ruby -o $@ $< 175 swig -ruby -o $@ $<
176 176
177.ruby/Makefile: extconf.rb 177.ruby/Makefile: extconf.rb
178 cd .ruby; ruby ../extconf.rb 178 cd .ruby; ruby ../extconf.rb
179 179
180.ruby/kconfig.so: .ruby/kconfig_wrap.c .ruby/Makefile 180.ruby/kconfig.so: .ruby/kconfig_wrap.c .ruby/Makefile
181 make -C .ruby 181 $(MAKE) -C .ruby
182 182
183 183
184PYTHON_INCLUDE=$(shell python -c "import sys; print '-I'+sys.prefix+'/include/python'+sys.version[:3]") 184PYTHON_INCLUDE=$(shell python -c "import sys; print '-I'+sys.prefix+'/include/python'+sys.version[:3]")
185 185
186python: .python .python/kconfig.py .python/_kconfig.so 186python: .python .python/kconfig.py .python/_kconfig.so
187 187
188.python: 188.python:
189 mkdir .python 189 mkdir .python
190 190
191.python/kconfig_wrap.c .python/kconfig.py: kconfig.i kconfig_load.c expr.h lkc_proto.h 191.python/kconfig_wrap.c .python/kconfig.py: kconfig.i kconfig_load.c expr.h lkc_proto.h
192 swig -python -o .python/kconfig_wrap.c kconfig.i 192 swig -python -o .python/kconfig_wrap.c kconfig.i
193 193
194.python/_kconfig.so: .python/kconfig_wrap.c 194.python/_kconfig.so: .python/kconfig_wrap.c
195 cd .python; $(CC) $(CFLAGS) -shared kconfig_wrap.c -o _kconfig.so -I.. $(PYTHON_INCLUDE) 195 cd .python; $(CC) $(CFLAGS) -shared kconfig_wrap.c -o _kconfig.so -I.. $(PYTHON_INCLUDE)
196 196
197 197
198.PHONY: all tgz clean ruby python 198.PHONY: all tgz clean ruby python