Makefile (b464ef583dc71bb066ea83bda43317196f94da9c) Makefile (1c5af5cf9308fff327f52c7efd2dfa732d370871)
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

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

168 @echo ' randconfig - New config with random answer to all options'
169 @echo ' listnewconfig - List new options'
170 @echo ' olddefconfig - Same as oldconfig but sets new symbols to their'
171 @echo ' default value without prompting'
172 @echo ' kvmconfig - Enable additional options for kvm guest kernel support'
173 @echo ' xenconfig - Enable additional options for xen dom0 and guest kernel support'
174 @echo ' tinyconfig - Configure the tiniest possible kernel'
175
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

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

168 @echo ' randconfig - New config with random answer to all options'
169 @echo ' listnewconfig - List new options'
170 @echo ' olddefconfig - Same as oldconfig but sets new symbols to their'
171 @echo ' default value without prompting'
172 @echo ' kvmconfig - Enable additional options for kvm guest kernel support'
173 @echo ' xenconfig - Enable additional options for xen dom0 and guest kernel support'
174 @echo ' tinyconfig - Configure the tiniest possible kernel'
175
176# lxdialog stuff
177check-lxdialog := $(srctree)/$(src)/lxdialog/check-lxdialog.sh
178
179# Use recursively expanded variables so we do not call gcc unless
180# we really need to do so. (Do not call gcc as part of make mrproper)
181HOST_EXTRACFLAGS += $(shell $(CONFIG_SHELL) $(check-lxdialog) -ccflags) \
182 -DLOCALE
183
184# ===========================================================================
185# Shared Makefile for the various kconfig executables:
186# conf: Used for defconfig, oldconfig and related targets
176# ===========================================================================
177# Shared Makefile for the various kconfig executables:
178# 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# object files used by all kconfig flavours
192
179# object files used by all kconfig flavours
180
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
181conf-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
200
182kxgettext-objs := kxgettext.o zconf.tab.o
183
201hostprogs-y := conf nconf mconf kxgettext
184hostprogs-y := conf kxgettext
202
203targets += zconf.lex.c
204clean-files += gconf.glade.h
205clean-files += config.pot linux.pot
206
185
186targets += zconf.lex.c
187clean-files += gconf.glade.h
188clean-files += config.pot linux.pot
189
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
190# 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
191HOST_EXTRACFLAGS += $(shell $(CONFIG_SHELL) $(srctree)/$(src)/check.sh $(HOSTCC) $(HOSTCFLAGS)) \
192 -DLOCALE
193HOST_EXTRACXXFLAGS += $(shell $(CONFIG_SHELL) $(srctree)/$(src)/check.sh $(HOSTCXX) $(HOSTCXXFLAGS)) \
194 -DLOCALE
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
195# generated files seem to need this to find local include files
196HOSTCFLAGS_zconf.lex.o := -I$(src)
197HOSTCFLAGS_zconf.tab.o := -I$(src)
198
223HOSTLOADLIBES_mconf = $(shell $(CONFIG_SHELL) $(check-lxdialog) -ldflags $(HOSTCC))
199# nconf: Used for the nconfig target based on ncurses
200hostprogs-y += nconf
201nconf-objs := nconf.o zconf.tab.o nconf.gui.o
224
202
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" )
203HOSTLOADLIBES_nconf = $(shell . $(obj)/.nconf-cfg && echo $$libs)
204HOSTCFLAGS_nconf.o = $(shell . $(obj)/.nconf-cfg && echo $$cflags)
205HOSTCFLAGS_nconf.gui.o = $(shell . $(obj)/.nconf-cfg && echo $$cflags)
229
206
207$(obj)/nconf.o: $(obj)/.nconf-cfg
208
209# mconf: Used for the menuconfig target based on lxdialog
210hostprogs-y += mconf
211lxdialog := checklist.o inputbox.o menubox.o textbox.o util.o yesno.o
212mconf-objs := mconf.o zconf.tab.o $(addprefix lxdialog/, $(lxdialog))
213
214HOSTLOADLIBES_mconf = $(shell . $(obj)/.mconf-cfg && echo $$libs)
215$(foreach f, mconf.o $(lxdialog), \
216 $(eval HOSTCFLAGS_$f = $$(shell . $(obj)/.mconf-cfg && echo $$$$cflags)))
217
218$(addprefix $(obj)/, mconf.o $(lxdialog)): $(obj)/.mconf-cfg
219
230# qconf: Used for the xconfig target based on Qt
231hostprogs-y += qconf
232qconf-cxxobjs := qconf.o
233qconf-objs := zconf.tab.o
234
235HOSTLOADLIBES_qconf = $(shell . $(obj)/.qconf-cfg && echo $$libs)
236HOSTCXXFLAGS_qconf.o = $(shell . $(obj)/.qconf-cfg && echo $$cflags)
237

--- 33 unchanged lines hidden ---
220# qconf: Used for the xconfig target based on Qt
221hostprogs-y += qconf
222qconf-cxxobjs := qconf.o
223qconf-objs := zconf.tab.o
224
225HOSTLOADLIBES_qconf = $(shell . $(obj)/.qconf-cfg && echo $$libs)
226HOSTCXXFLAGS_qconf.o = $(shell . $(obj)/.qconf-cfg && echo $$cflags)
227

--- 33 unchanged lines hidden ---