Makefile (e199e6136ce6b151e6638ae93dca60748424d900) Makefile (20f4ad8a19ad01405f9d6b3110d6eb93666ae21e)
1# ===========================================================================
2# Kernel configuration targets
3# These targets are used from top-level makefile
4
5PHONY += oldconfig xconfig gconfig menuconfig config silentoldconfig update-po-config \
6 localmodconfig localyesconfig
7
8ifdef KBUILD_KCONFIG

--- 131 unchanged lines hidden (view full) ---

140 @echo ' listnewconfig - List new options'
141 @echo ' oldnoconfig - Same as silentoldconfig but set new symbols to n (unset)'
142
143# lxdialog stuff
144check-lxdialog := $(srctree)/$(src)/lxdialog/check-lxdialog.sh
145
146# Use recursively expanded variables so we do not call gcc unless
147# we really need to do so. (Do not call gcc as part of make mrproper)
1# ===========================================================================
2# Kernel configuration targets
3# These targets are used from top-level makefile
4
5PHONY += oldconfig xconfig gconfig menuconfig config silentoldconfig update-po-config \
6 localmodconfig localyesconfig
7
8ifdef KBUILD_KCONFIG

--- 131 unchanged lines hidden (view full) ---

140 @echo ' listnewconfig - List new options'
141 @echo ' oldnoconfig - Same as silentoldconfig but set new symbols to n (unset)'
142
143# lxdialog stuff
144check-lxdialog := $(srctree)/$(src)/lxdialog/check-lxdialog.sh
145
146# Use recursively expanded variables so we do not call gcc unless
147# we really need to do so. (Do not call gcc as part of make mrproper)
148HOST_EXTRACFLAGS = $(shell $(CONFIG_SHELL) $(check-lxdialog) -ccflags)
149HOST_LOADLIBES = $(shell $(CONFIG_SHELL) $(check-lxdialog) -ldflags $(HOSTCC))
148HOST_EXTRACFLAGS += $(shell $(CONFIG_SHELL) $(check-lxdialog) -ccflags) \
149 -DLOCALE
150
150
151HOST_EXTRACFLAGS += -DLOCALE
152
153
154# ===========================================================================
155# Shared Makefile for the various kconfig executables:
156# conf: Used for defconfig, oldconfig and related targets
157# nconf: Used for the nconfig target.
158# Utilizes ncurses
159# mconf: Used for the menuconfig target
160# Utilizes the lxdialog package
161# qconf: Used for the xconfig target

--- 41 unchanged lines hidden (view full) ---

203 .tmp_gtkcheck zconf.tab.c lex.zconf.c zconf.hash.c gconf.glade.h
204clean-files += mconf qconf gconf nconf
205clean-files += config.pot linux.pot
206
207# Check that we have the required ncurses stuff installed for lxdialog (menuconfig)
208PHONY += $(obj)/dochecklxdialog
209$(addprefix $(obj)/,$(lxdialog)): $(obj)/dochecklxdialog
210$(obj)/dochecklxdialog:
151# ===========================================================================
152# Shared Makefile for the various kconfig executables:
153# conf: Used for defconfig, oldconfig and related targets
154# nconf: Used for the nconfig target.
155# Utilizes ncurses
156# mconf: Used for the menuconfig target
157# Utilizes the lxdialog package
158# qconf: Used for the xconfig target

--- 41 unchanged lines hidden (view full) ---

200 .tmp_gtkcheck zconf.tab.c lex.zconf.c zconf.hash.c gconf.glade.h
201clean-files += mconf qconf gconf nconf
202clean-files += config.pot linux.pot
203
204# Check that we have the required ncurses stuff installed for lxdialog (menuconfig)
205PHONY += $(obj)/dochecklxdialog
206$(addprefix $(obj)/,$(lxdialog)): $(obj)/dochecklxdialog
207$(obj)/dochecklxdialog:
211 $(Q)$(CONFIG_SHELL) $(check-lxdialog) -check $(HOSTCC) $(HOST_EXTRACFLAGS) $(HOST_LOADLIBES)
208 $(Q)$(CONFIG_SHELL) $(check-lxdialog) -check $(HOSTCC) $(HOST_EXTRACFLAGS) $(HOSTLOADLIBES_mconf)
212
213always := dochecklxdialog
214
215# Add environment specific flags
216HOST_EXTRACFLAGS += $(shell $(CONFIG_SHELL) $(srctree)/$(src)/check.sh $(HOSTCC) $(HOSTCFLAGS))
217
218# generated files seem to need this to find local include files
219HOSTCFLAGS_lex.zconf.o := -I$(src)
220HOSTCFLAGS_zconf.tab.o := -I$(src)
221
222HOSTLOADLIBES_qconf = $(KC_QT_LIBS) -ldl
223HOSTCXXFLAGS_qconf.o = $(KC_QT_CFLAGS) -D LKC_DIRECT_LINK
224
225HOSTLOADLIBES_gconf = `pkg-config --libs gtk+-2.0 gmodule-2.0 libglade-2.0` -ldl
226HOSTCFLAGS_gconf.o = `pkg-config --cflags gtk+-2.0 gmodule-2.0 libglade-2.0` \
227 -D LKC_DIRECT_LINK
228
209
210always := dochecklxdialog
211
212# Add environment specific flags
213HOST_EXTRACFLAGS += $(shell $(CONFIG_SHELL) $(srctree)/$(src)/check.sh $(HOSTCC) $(HOSTCFLAGS))
214
215# generated files seem to need this to find local include files
216HOSTCFLAGS_lex.zconf.o := -I$(src)
217HOSTCFLAGS_zconf.tab.o := -I$(src)
218
219HOSTLOADLIBES_qconf = $(KC_QT_LIBS) -ldl
220HOSTCXXFLAGS_qconf.o = $(KC_QT_CFLAGS) -D LKC_DIRECT_LINK
221
222HOSTLOADLIBES_gconf = `pkg-config --libs gtk+-2.0 gmodule-2.0 libglade-2.0` -ldl
223HOSTCFLAGS_gconf.o = `pkg-config --cflags gtk+-2.0 gmodule-2.0 libglade-2.0` \
224 -D LKC_DIRECT_LINK
225
226HOSTLOADLIBES_mconf = $(shell $(CONFIG_SHELL) $(check-lxdialog) -ldflags $(HOSTCC))
227
229HOSTLOADLIBES_nconf = -lmenu -lpanel -lncurses
230$(obj)/qconf.o: $(obj)/.tmp_qtcheck
231
232ifeq ($(qconf-target),1)
233$(obj)/.tmp_qtcheck: $(src)/Makefile
234-include $(obj)/.tmp_qtcheck
235
236# QT needs some extra effort...
237$(obj)/.tmp_qtcheck:
238 @set -e; echo " CHECK qt"; dir=""; pkg=""; \
228HOSTLOADLIBES_nconf = -lmenu -lpanel -lncurses
229$(obj)/qconf.o: $(obj)/.tmp_qtcheck
230
231ifeq ($(qconf-target),1)
232$(obj)/.tmp_qtcheck: $(src)/Makefile
233-include $(obj)/.tmp_qtcheck
234
235# QT needs some extra effort...
236$(obj)/.tmp_qtcheck:
237 @set -e; echo " CHECK qt"; dir=""; pkg=""; \
239 pkg-config --exists qt 2> /dev/null && pkg=qt; \
240 pkg-config --exists qt-mt 2> /dev/null && pkg=qt-mt; \
241 if [ -n "$$pkg" ]; then \
242 cflags="\$$(shell pkg-config $$pkg --cflags)"; \
243 libs="\$$(shell pkg-config $$pkg --libs)"; \
244 moc="\$$(shell pkg-config $$pkg --variable=prefix)/bin/moc"; \
245 dir="$$(pkg-config $$pkg --variable=prefix)"; \
238 if ! pkg-config --exists QtCore 2> /dev/null; then \
239 echo "* Unable to find the QT4 tool qmake. Trying to use QT3"; \
240 pkg-config --exists qt 2> /dev/null && pkg=qt; \
241 pkg-config --exists qt-mt 2> /dev/null && pkg=qt-mt; \
242 if [ -n "$$pkg" ]; then \
243 cflags="\$$(shell pkg-config $$pkg --cflags)"; \
244 libs="\$$(shell pkg-config $$pkg --libs)"; \
245 moc="\$$(shell pkg-config $$pkg --variable=prefix)/bin/moc"; \
246 dir="$$(pkg-config $$pkg --variable=prefix)"; \
247 else \
248 for d in $$QTDIR /usr/share/qt* /usr/lib/qt*; do \
249 if [ -f $$d/include/qconfig.h ]; then dir=$$d; break; fi; \
250 done; \
251 if [ -z "$$dir" ]; then \
252 echo "*"; \
253 echo "* Unable to find any QT installation. Please make sure that"; \
254 echo "* the QT4 or QT3 development package is correctly installed and"; \
255 echo "* either qmake can be found or install pkg-config or set"; \
256 echo "* the QTDIR environment variable to the correct location."; \
257 echo "*"; \
258 false; \
259 fi; \
260 libpath=$$dir/lib; lib=qt; osdir=""; \
261 $(HOSTCXX) -print-multi-os-directory > /dev/null 2>&1 && \
262 osdir=x$$($(HOSTCXX) -print-multi-os-directory); \
263 test -d $$libpath/$$osdir && libpath=$$libpath/$$osdir; \
264 test -f $$libpath/libqt-mt.so && lib=qt-mt; \
265 cflags="-I$$dir/include"; \
266 libs="-L$$libpath -Wl,-rpath,$$libpath -l$$lib"; \
267 moc="$$dir/bin/moc"; \
268 fi; \
269 if [ ! -x $$dir/bin/moc -a -x /usr/bin/moc ]; then \
270 echo "*"; \
271 echo "* Unable to find $$dir/bin/moc, using /usr/bin/moc instead."; \
272 echo "*"; \
273 moc="/usr/bin/moc"; \
274 fi; \
246 else \
275 else \
247 for d in $$QTDIR /usr/share/qt* /usr/lib/qt*; do \
248 if [ -f $$d/include/qconfig.h ]; then dir=$$d; break; fi; \
249 done; \
250 if [ -z "$$dir" ]; then \
251 echo "*"; \
252 echo "* Unable to find the QT3 installation. Please make sure that"; \
253 echo "* the QT3 development package is correctly installed and"; \
254 echo "* either install pkg-config or set the QTDIR environment"; \
255 echo "* variable to the correct location."; \
256 echo "*"; \
257 false; \
258 fi; \
259 libpath=$$dir/lib; lib=qt; osdir=""; \
260 $(HOSTCXX) -print-multi-os-directory > /dev/null 2>&1 && \
261 osdir=x$$($(HOSTCXX) -print-multi-os-directory); \
262 test -d $$libpath/$$osdir && libpath=$$libpath/$$osdir; \
263 test -f $$libpath/libqt-mt.so && lib=qt-mt; \
264 cflags="-I$$dir/include"; \
265 libs="-L$$libpath -Wl,-rpath,$$libpath -l$$lib"; \
266 moc="$$dir/bin/moc"; \
276 cflags="\$$(shell pkg-config QtCore --cflags) \$$(shell pkg-config QtGui --cflags) \$$(shell pkg-config Qt3Support --cflags)"; \
277 libs="\$$(shell pkg-config QtCore --libs) \$$(shell pkg-config QtGui --libs) \$$(shell pkg-config Qt3Support --libs)"; \
278 binpath="\$$(shell pkg-config QtCore --variable=prefix)"; \
279 moc="$$binpath/bin/moc"; \
267 fi; \
280 fi; \
268 if [ ! -x $$dir/bin/moc -a -x /usr/bin/moc ]; then \
269 echo "*"; \
270 echo "* Unable to find $$dir/bin/moc, using /usr/bin/moc instead."; \
271 echo "*"; \
272 moc="/usr/bin/moc"; \
273 fi; \
274 echo "KC_QT_CFLAGS=$$cflags" > $@; \
275 echo "KC_QT_LIBS=$$libs" >> $@; \
276 echo "KC_QT_MOC=$$moc" >> $@
277endif
278
279$(obj)/gconf.o: $(obj)/.tmp_gtkcheck
280
281ifeq ($(gconf-target),1)

--- 66 unchanged lines hidden ---
281 echo "KC_QT_CFLAGS=$$cflags" > $@; \
282 echo "KC_QT_LIBS=$$libs" >> $@; \
283 echo "KC_QT_MOC=$$moc" >> $@
284endif
285
286$(obj)/gconf.o: $(obj)/.tmp_gtkcheck
287
288ifeq ($(gconf-target),1)

--- 66 unchanged lines hidden ---