Makefile (0b669a5076fd8c4b0dc6f21e41f93b1102c52925) Makefile (b464ef583dc71bb066ea83bda43317196f94da9c)
1# SPDX-License-Identifier: GPL-2.0
2# ===========================================================================
3# Kernel configuration targets
4# These targets are used from top-level makefile
5
6PHONY += xconfig gconfig menuconfig config syncconfig update-po-config \
7 localmodconfig localyesconfig
8

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

183
184# ===========================================================================
185# Shared Makefile for the various kconfig executables:
186# conf: Used for defconfig, oldconfig and related targets
187# nconf: Used for the nconfig target.
188# Utilizes ncurses
189# mconf: Used for the menuconfig target
190# Utilizes the lxdialog package
1# SPDX-License-Identifier: GPL-2.0
2# ===========================================================================
3# Kernel configuration targets
4# These targets are used from top-level makefile
5
6PHONY += xconfig gconfig menuconfig config syncconfig update-po-config \
7 localmodconfig localyesconfig
8

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

183
184# ===========================================================================
185# Shared Makefile for the various kconfig executables:
186# conf: Used for defconfig, oldconfig and related targets
187# nconf: Used for the nconfig target.
188# Utilizes ncurses
189# mconf: Used for the menuconfig target
190# Utilizes the lxdialog package
191# gconf: Used for the gconfig target
192# Based on GTK+ which needs to be installed to compile it
193# object files used by all kconfig flavours
194
195lxdialog := lxdialog/checklist.o lxdialog/util.o lxdialog/inputbox.o
196lxdialog += lxdialog/textbox.o lxdialog/yesno.o lxdialog/menubox.o
197
198conf-objs := conf.o zconf.tab.o
199mconf-objs := mconf.o zconf.tab.o $(lxdialog)
200nconf-objs := nconf.o zconf.tab.o nconf.gui.o
201kxgettext-objs := kxgettext.o zconf.tab.o
191# object files used by all kconfig flavours
192
193lxdialog := lxdialog/checklist.o lxdialog/util.o lxdialog/inputbox.o
194lxdialog += lxdialog/textbox.o lxdialog/yesno.o lxdialog/menubox.o
195
196conf-objs := conf.o zconf.tab.o
197mconf-objs := mconf.o zconf.tab.o $(lxdialog)
198nconf-objs := nconf.o zconf.tab.o nconf.gui.o
199kxgettext-objs := kxgettext.o zconf.tab.o
202gconf-objs := gconf.o zconf.tab.o
203
200
204hostprogs-y := conf nconf mconf kxgettext gconf
201hostprogs-y := conf nconf mconf kxgettext
205
206targets += zconf.lex.c
202
203targets += zconf.lex.c
207clean-files := .tmp_gtkcheck
208clean-files += gconf.glade.h
209clean-files += config.pot linux.pot
210
211# Check that we have the required ncurses stuff installed for lxdialog (menuconfig)
212PHONY += $(obj)/dochecklxdialog
213$(addprefix $(obj)/, mconf.o $(lxdialog)): $(obj)/dochecklxdialog
214$(obj)/dochecklxdialog:
215 $(Q)$(CONFIG_SHELL) $(check-lxdialog) -check $(HOSTCC) $(HOST_EXTRACFLAGS) $(HOSTLOADLIBES_mconf)
216
217always := dochecklxdialog
218
219# Add environment specific flags
220HOST_EXTRACFLAGS += $(shell $(CONFIG_SHELL) $(srctree)/$(src)/check.sh $(HOSTCC) $(HOSTCFLAGS))
221HOST_EXTRACXXFLAGS += $(shell $(CONFIG_SHELL) $(srctree)/$(src)/check.sh $(HOSTCXX) $(HOSTCXXFLAGS))
222
223# generated files seem to need this to find local include files
224HOSTCFLAGS_zconf.lex.o := -I$(src)
225HOSTCFLAGS_zconf.tab.o := -I$(src)
226
204clean-files += gconf.glade.h
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)/, mconf.o $(lxdialog)): $(obj)/dochecklxdialog
210$(obj)/dochecklxdialog:
211 $(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))
217HOST_EXTRACXXFLAGS += $(shell $(CONFIG_SHELL) $(srctree)/$(src)/check.sh $(HOSTCXX) $(HOSTCXXFLAGS))
218
219# generated files seem to need this to find local include files
220HOSTCFLAGS_zconf.lex.o := -I$(src)
221HOSTCFLAGS_zconf.tab.o := -I$(src)
222
227HOSTLOADLIBES_gconf = `pkg-config --libs gtk+-2.0 gmodule-2.0 libglade-2.0`
228HOSTCFLAGS_gconf.o = `pkg-config --cflags gtk+-2.0 gmodule-2.0 libglade-2.0` \
229 -Wno-missing-prototypes
230
231HOSTLOADLIBES_mconf = $(shell $(CONFIG_SHELL) $(check-lxdialog) -ldflags $(HOSTCC))
232
233HOSTLOADLIBES_nconf = $(shell \
234 pkg-config --libs menuw panelw ncursesw 2>/dev/null \
235 || pkg-config --libs menu panel ncurses 2>/dev/null \
236 || echo "-lmenu -lpanel -lncurses" )
237
238# qconf: Used for the xconfig target based on Qt

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

246$(obj)/qconf.o: $(obj)/.qconf-cfg $(obj)/qconf.moc
247
248quiet_cmd_moc = MOC $@
249 cmd_moc = $(shell . $(obj)/.qconf-cfg && echo $$moc) -i $< -o $@
250
251$(obj)/%.moc: $(src)/%.h $(obj)/.qconf-cfg
252 $(call cmd,moc)
253
223HOSTLOADLIBES_mconf = $(shell $(CONFIG_SHELL) $(check-lxdialog) -ldflags $(HOSTCC))
224
225HOSTLOADLIBES_nconf = $(shell \
226 pkg-config --libs menuw panelw ncursesw 2>/dev/null \
227 || pkg-config --libs menu panel ncurses 2>/dev/null \
228 || echo "-lmenu -lpanel -lncurses" )
229
230# qconf: Used for the xconfig target based on Qt

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

238$(obj)/qconf.o: $(obj)/.qconf-cfg $(obj)/qconf.moc
239
240quiet_cmd_moc = MOC $@
241 cmd_moc = $(shell . $(obj)/.qconf-cfg && echo $$moc) -i $< -o $@
242
243$(obj)/%.moc: $(src)/%.h $(obj)/.qconf-cfg
244 $(call cmd,moc)
245
254$(obj)/gconf.o: $(obj)/.tmp_gtkcheck
246# gconf: Used for the gconfig target based on GTK+
247hostprogs-y += gconf
248gconf-objs := gconf.o zconf.tab.o
255
249
256ifeq ($(MAKECMDGOALS),gconfig)
257-include $(obj)/.tmp_gtkcheck
250HOSTLOADLIBES_gconf = $(shell . $(obj)/.gconf-cfg && echo $$libs)
251HOSTCFLAGS_gconf.o = $(shell . $(obj)/.gconf-cfg && echo $$cflags)
258
252
259# GTK+ needs some extra effort, too...
260$(obj)/.tmp_gtkcheck:
261 @if `pkg-config --exists gtk+-2.0 gmodule-2.0 libglade-2.0`; then \
262 if `pkg-config --atleast-version=2.0.0 gtk+-2.0`; then \
263 touch $@; \
264 else \
265 echo >&2 "*"; \
266 echo >&2 "* GTK+ is present but version >= 2.0.0 is required."; \
267 echo >&2 "*"; \
268 false; \
269 fi \
270 else \
271 echo >&2 "*"; \
272 echo >&2 "* Unable to find the GTK+ installation. Please make sure that"; \
273 echo >&2 "* the GTK+ 2.0 development package is correctly installed..."; \
274 echo >&2 "* You need gtk+-2.0, glib-2.0 and libglade-2.0."; \
275 echo >&2 "*"; \
276 false; \
277 fi
278endif
253$(obj)/gconf.o: $(obj)/.gconf-cfg
279
280$(obj)/zconf.tab.o: $(obj)/zconf.lex.c
281
282# Extract gconf menu items for i18n support
283$(obj)/gconf.glade.h: $(obj)/gconf.glade
284 $(Q)intltool-extract --type=gettext/glade --srcdir=$(srctree) \
285 $(obj)/gconf.glade
286
287# check if necessary packages are available, and configure build flags
288define filechk_conf_cfg
289 $(CONFIG_SHELL) $<
290endef
291
292$(obj)/.%conf-cfg: $(src)/%conf-cfg.sh FORCE
293 $(call filechk,conf_cfg)
294
295clean-files += .*conf-cfg
254
255$(obj)/zconf.tab.o: $(obj)/zconf.lex.c
256
257# Extract gconf menu items for i18n support
258$(obj)/gconf.glade.h: $(obj)/gconf.glade
259 $(Q)intltool-extract --type=gettext/glade --srcdir=$(srctree) \
260 $(obj)/gconf.glade
261
262# check if necessary packages are available, and configure build flags
263define filechk_conf_cfg
264 $(CONFIG_SHELL) $<
265endef
266
267$(obj)/.%conf-cfg: $(src)/%conf-cfg.sh FORCE
268 $(call filechk,conf_cfg)
269
270clean-files += .*conf-cfg