Makefile (8377bd2b9ee1be35b39b5523f640a2b75ddd7c4e) Makefile (4ab3b80159d4db63b902ef635d4b5e882911b2da)
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 \
7 localmodconfig localyesconfig
8

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

164# generated files seem to need this to find local include files
165HOSTCFLAGS_zconf.lex.o := -I$(src)
166HOSTCFLAGS_zconf.tab.o := -I$(src)
167
168# nconf: Used for the nconfig target based on ncurses
169hostprogs-y += nconf
170nconf-objs := nconf.o zconf.tab.o nconf.gui.o
171
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 \
7 localmodconfig localyesconfig
8

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

164# generated files seem to need this to find local include files
165HOSTCFLAGS_zconf.lex.o := -I$(src)
166HOSTCFLAGS_zconf.tab.o := -I$(src)
167
168# nconf: Used for the nconfig target based on ncurses
169hostprogs-y += nconf
170nconf-objs := nconf.o zconf.tab.o nconf.gui.o
171
172HOSTLDLIBS_nconf = $(shell . $(obj)/.nconf-cfg && echo $$libs)
172HOSTLOADLIBES_nconf = $(shell . $(obj)/.nconf-cfg && echo $$libs)
173HOSTCFLAGS_nconf.o = $(shell . $(obj)/.nconf-cfg && echo $$cflags)
174HOSTCFLAGS_nconf.gui.o = $(shell . $(obj)/.nconf-cfg && echo $$cflags)
175
176$(obj)/nconf.o: $(obj)/.nconf-cfg
177
178# mconf: Used for the menuconfig target based on lxdialog
179hostprogs-y += mconf
180lxdialog := checklist.o inputbox.o menubox.o textbox.o util.o yesno.o
181mconf-objs := mconf.o zconf.tab.o $(addprefix lxdialog/, $(lxdialog))
182
173HOSTCFLAGS_nconf.o = $(shell . $(obj)/.nconf-cfg && echo $$cflags)
174HOSTCFLAGS_nconf.gui.o = $(shell . $(obj)/.nconf-cfg && echo $$cflags)
175
176$(obj)/nconf.o: $(obj)/.nconf-cfg
177
178# mconf: Used for the menuconfig target based on lxdialog
179hostprogs-y += mconf
180lxdialog := checklist.o inputbox.o menubox.o textbox.o util.o yesno.o
181mconf-objs := mconf.o zconf.tab.o $(addprefix lxdialog/, $(lxdialog))
182
183HOSTLDLIBS_mconf = $(shell . $(obj)/.mconf-cfg && echo $$libs)
183HOSTLOADLIBES_mconf = $(shell . $(obj)/.mconf-cfg && echo $$libs)
184$(foreach f, mconf.o $(lxdialog), \
185 $(eval HOSTCFLAGS_$f = $$(shell . $(obj)/.mconf-cfg && echo $$$$cflags)))
186
187$(addprefix $(obj)/, mconf.o $(lxdialog)): $(obj)/.mconf-cfg
188
189# qconf: Used for the xconfig target based on Qt
190hostprogs-y += qconf
191qconf-cxxobjs := qconf.o
192qconf-objs := zconf.tab.o
193
184$(foreach f, mconf.o $(lxdialog), \
185 $(eval HOSTCFLAGS_$f = $$(shell . $(obj)/.mconf-cfg && echo $$$$cflags)))
186
187$(addprefix $(obj)/, mconf.o $(lxdialog)): $(obj)/.mconf-cfg
188
189# qconf: Used for the xconfig target based on Qt
190hostprogs-y += qconf
191qconf-cxxobjs := qconf.o
192qconf-objs := zconf.tab.o
193
194HOSTLDLIBS_qconf = $(shell . $(obj)/.qconf-cfg && echo $$libs)
194HOSTLOADLIBES_qconf = $(shell . $(obj)/.qconf-cfg && echo $$libs)
195HOSTCXXFLAGS_qconf.o = $(shell . $(obj)/.qconf-cfg && echo $$cflags)
196
197$(obj)/qconf.o: $(obj)/.qconf-cfg $(obj)/qconf.moc
198
199quiet_cmd_moc = MOC $@
200 cmd_moc = $(shell . $(obj)/.qconf-cfg && echo $$moc) -i $< -o $@
201
202$(obj)/%.moc: $(src)/%.h $(obj)/.qconf-cfg
203 $(call cmd,moc)
204
205# gconf: Used for the gconfig target based on GTK+
206hostprogs-y += gconf
207gconf-objs := gconf.o zconf.tab.o
208
195HOSTCXXFLAGS_qconf.o = $(shell . $(obj)/.qconf-cfg && echo $$cflags)
196
197$(obj)/qconf.o: $(obj)/.qconf-cfg $(obj)/qconf.moc
198
199quiet_cmd_moc = MOC $@
200 cmd_moc = $(shell . $(obj)/.qconf-cfg && echo $$moc) -i $< -o $@
201
202$(obj)/%.moc: $(src)/%.h $(obj)/.qconf-cfg
203 $(call cmd,moc)
204
205# gconf: Used for the gconfig target based on GTK+
206hostprogs-y += gconf
207gconf-objs := gconf.o zconf.tab.o
208
209HOSTLDLIBS_gconf = $(shell . $(obj)/.gconf-cfg && echo $$libs)
209HOSTLOADLIBES_gconf = $(shell . $(obj)/.gconf-cfg && echo $$libs)
210HOSTCFLAGS_gconf.o = $(shell . $(obj)/.gconf-cfg && echo $$cflags)
211
212$(obj)/gconf.o: $(obj)/.gconf-cfg
213
214$(obj)/zconf.tab.o: $(obj)/zconf.lex.c
215
216# check if necessary packages are available, and configure build flags
217define filechk_conf_cfg
210HOSTCFLAGS_gconf.o = $(shell . $(obj)/.gconf-cfg && echo $$cflags)
211
212$(obj)/gconf.o: $(obj)/.gconf-cfg
213
214$(obj)/zconf.tab.o: $(obj)/zconf.lex.c
215
216# check if necessary packages are available, and configure build flags
217define filechk_conf_cfg
218 $(CONFIG_SHELL) $(srctree)/scripts/kconfig/check-pkgconfig.sh; \
218 $(CONFIG_SHELL) $<
219endef
220
221$(obj)/.%conf-cfg: $(src)/%conf-cfg.sh FORCE
222 $(call filechk,conf_cfg)
223
224clean-files += .*conf-cfg
219 $(CONFIG_SHELL) $<
220endef
221
222$(obj)/.%conf-cfg: $(src)/%conf-cfg.sh FORCE
223 $(call filechk,conf_cfg)
224
225clean-files += .*conf-cfg