Makefile (03ab8e6297acd1bc0eedaa050e2a1635c576fd11) Makefile (3122c84409d578a5df8bcb1953547e0b871ac4c2)
1# SPDX-License-Identifier: GPL-2.0
2# ===========================================================================
3# Kernel configuration targets
4# These targets are used from top-level makefile
5
6ifdef KBUILD_KCONFIG
7Kconfig := $(KBUILD_KCONFIG)
8else

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

154# conf: Used for defconfig, oldconfig and related targets
155hostprogs += conf
156conf-objs := conf.o $(common-objs)
157
158# nconf: Used for the nconfig target based on ncurses
159hostprogs += nconf
160nconf-objs := nconf.o nconf.gui.o $(common-objs)
161
1# SPDX-License-Identifier: GPL-2.0
2# ===========================================================================
3# Kernel configuration targets
4# These targets are used from top-level makefile
5
6ifdef KBUILD_KCONFIG
7Kconfig := $(KBUILD_KCONFIG)
8else

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

154# conf: Used for defconfig, oldconfig and related targets
155hostprogs += conf
156conf-objs := conf.o $(common-objs)
157
158# nconf: Used for the nconfig target based on ncurses
159hostprogs += nconf
160nconf-objs := nconf.o nconf.gui.o $(common-objs)
161
162HOSTLDLIBS_nconf = $(shell . $(obj)/nconf-cfg && echo $$libs)
163HOSTCFLAGS_nconf.o = $(shell . $(obj)/nconf-cfg && echo $$cflags)
164HOSTCFLAGS_nconf.gui.o = $(shell . $(obj)/nconf-cfg && echo $$cflags)
162HOSTLDLIBS_nconf = $(call read-file, $(obj)/nconf-libs)
163HOSTCFLAGS_nconf.o = $(call read-file, $(obj)/nconf-cflags)
164HOSTCFLAGS_nconf.gui.o = $(call read-file, $(obj)/nconf-cflags)
165
165
166$(obj)/nconf.o $(obj)/nconf.gui.o: $(obj)/nconf-cfg
166$(obj)/nconf: | $(obj)/nconf-libs
167$(obj)/nconf.o $(obj)/nconf.gui.o: | $(obj)/nconf-cflags
167
168# mconf: Used for the menuconfig target based on lxdialog
169hostprogs += mconf
170lxdialog := $(addprefix lxdialog/, \
171 checklist.o inputbox.o menubox.o textbox.o util.o yesno.o)
172mconf-objs := mconf.o $(lxdialog) $(common-objs)
173
168
169# mconf: Used for the menuconfig target based on lxdialog
170hostprogs += mconf
171lxdialog := $(addprefix lxdialog/, \
172 checklist.o inputbox.o menubox.o textbox.o util.o yesno.o)
173mconf-objs := mconf.o $(lxdialog) $(common-objs)
174
174HOSTLDLIBS_mconf = $(shell . $(obj)/mconf-cfg && echo $$libs)
175HOSTLDLIBS_mconf = $(call read-file, $(obj)/mconf-libs)
175$(foreach f, mconf.o $(lxdialog), \
176$(foreach f, mconf.o $(lxdialog), \
176 $(eval HOSTCFLAGS_$f = $$(shell . $(obj)/mconf-cfg && echo $$$$cflags)))
177 $(eval HOSTCFLAGS_$f = $$(call read-file, $(obj)/mconf-cflags)))
177
178
178$(addprefix $(obj)/, mconf.o $(lxdialog)): $(obj)/mconf-cfg
179$(obj)/mconf: | $(obj)/mconf-libs
180$(addprefix $(obj)/, mconf.o $(lxdialog)): | $(obj)/mconf-cflags
179
180# qconf: Used for the xconfig target based on Qt
181hostprogs += qconf
182qconf-cxxobjs := qconf.o qconf-moc.o
183qconf-objs := images.o $(common-objs)
184
181
182# qconf: Used for the xconfig target based on Qt
183hostprogs += qconf
184qconf-cxxobjs := qconf.o qconf-moc.o
185qconf-objs := images.o $(common-objs)
186
185HOSTLDLIBS_qconf = $(shell . $(obj)/qconf-cfg && echo $$libs)
186HOSTCXXFLAGS_qconf.o = $(shell . $(obj)/qconf-cfg && echo $$cflags)
187HOSTCXXFLAGS_qconf-moc.o = $(shell . $(obj)/qconf-cfg && echo $$cflags)
187HOSTLDLIBS_qconf = $(call read-file, $(obj)/qconf-libs)
188HOSTCXXFLAGS_qconf.o = -std=c++11 -fPIC $(call read-file, $(obj)/qconf-cflags)
189HOSTCXXFLAGS_qconf-moc.o = -std=c++11 -fPIC $(call read-file, $(obj)/qconf-cflags)
190$(obj)/qconf: | $(obj)/qconf-libs
191$(obj)/qconf.o $(obj)/qconf-moc.o: | $(obj)/qconf-cflags
188
192
189$(obj)/qconf.o: $(obj)/qconf-cfg
190
191quiet_cmd_moc = MOC $@
193quiet_cmd_moc = MOC $@
192 cmd_moc = $(shell . $(obj)/qconf-cfg && echo $$moc) $< -o $@
194 cmd_moc = $(call read-file, $(obj)/qconf-bin)/moc $< -o $@
193
195
194$(obj)/qconf-moc.cc: $(src)/qconf.h $(obj)/qconf-cfg FORCE
196$(obj)/qconf-moc.cc: $(src)/qconf.h FORCE | $(obj)/qconf-bin
195 $(call if_changed,moc)
196
197targets += qconf-moc.cc
198
199# gconf: Used for the gconfig target based on GTK+
200hostprogs += gconf
201gconf-objs := gconf.o images.o $(common-objs)
202
197 $(call if_changed,moc)
198
199targets += qconf-moc.cc
200
201# gconf: Used for the gconfig target based on GTK+
202hostprogs += gconf
203gconf-objs := gconf.o images.o $(common-objs)
204
203HOSTLDLIBS_gconf = $(shell . $(obj)/gconf-cfg && echo $$libs)
204HOSTCFLAGS_gconf.o = $(shell . $(obj)/gconf-cfg && echo $$cflags)
205HOSTLDLIBS_gconf = $(call read-file, $(obj)/gconf-libs)
206HOSTCFLAGS_gconf.o = $(call read-file, $(obj)/gconf-cflags)
205
207
206$(obj)/gconf.o: $(obj)/gconf-cfg
208$(obj)/gconf: | $(obj)/gconf-libs
209$(obj)/gconf.o: | $(obj)/gconf-cflags
207
208# check if necessary packages are available, and configure build flags
210
211# check if necessary packages are available, and configure build flags
209filechk_conf_cfg = $(CONFIG_SHELL) $<
212cmd_conf_cfg = $< $(addprefix $(obj)/$*conf-, cflags libs bin)
210
213
211$(obj)/%conf-cfg: $(src)/%conf-cfg.sh FORCE
212 $(call filechk,conf_cfg)
214$(obj)/%conf-cflags $(obj)/%conf-libs $(obj)/%conf-bin: $(src)/%conf-cfg.sh
215 $(call cmd,conf_cfg)
213
216
214clean-files += *conf-cfg
217clean-files += *conf-cflags *conf-libs *conf-bin