^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1) # SPDX-License-Identifier: GPL-2.0
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 2) # ===========================================================================
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 3) # Kernel configuration targets
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 4) # These targets are used from top-level makefile
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 5)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 6) PHONY += xconfig gconfig menuconfig config localmodconfig localyesconfig \
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 7) build_menuconfig build_nconfig build_gconfig build_xconfig
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 8)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 9) ifdef KBUILD_KCONFIG
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 10) Kconfig := $(KBUILD_KCONFIG)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 11) else
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 12) Kconfig := Kconfig
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 13) endif
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 14)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 15) ifeq ($(quiet),silent_)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 16) silent := -s
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 17) endif
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 18)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 19) # We need this, in case the user has it in its environment
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 20) unexport CONFIG_
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 21)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 22) xconfig: $(obj)/qconf
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 23) $(Q)$< $(silent) $(Kconfig)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 24)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 25) gconfig: $(obj)/gconf
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 26) $(Q)$< $(silent) $(Kconfig)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 27)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 28) menuconfig: $(obj)/mconf
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 29) $(Q)$< $(silent) $(Kconfig)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 30)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 31) config: $(obj)/conf
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 32) $(Q)$< $(silent) --oldaskconfig $(Kconfig)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 33)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 34) nconfig: $(obj)/nconf
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 35) $(Q)$< $(silent) $(Kconfig)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 36)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 37) build_menuconfig: $(obj)/mconf
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 38)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 39) build_nconfig: $(obj)/nconf
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 40)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 41) build_gconfig: $(obj)/gconf
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 42)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 43) build_xconfig: $(obj)/qconf
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 44)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 45) localyesconfig localmodconfig: $(obj)/conf
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 46) $(Q)$(PERL) $(srctree)/$(src)/streamline_config.pl --$@ $(srctree) $(Kconfig) > .tmp.config
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 47) $(Q)if [ -f .config ]; then \
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 48) cmp -s .tmp.config .config || \
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 49) (mv -f .config .config.old.1; \
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 50) mv -f .tmp.config .config; \
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 51) $< $(silent) --oldconfig $(Kconfig); \
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 52) mv -f .config.old.1 .config.old) \
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 53) else \
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 54) mv -f .tmp.config .config; \
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 55) $< $(silent) --oldconfig $(Kconfig); \
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 56) fi
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 57) $(Q)rm -f .tmp.config
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 58)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 59) # These targets map 1:1 to the commandline options of 'conf'
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 60) #
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 61) # Note:
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 62) # syncconfig has become an internal implementation detail and is now
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 63) # deprecated for external use
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 64) simple-targets := oldconfig allnoconfig allyesconfig allmodconfig \
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 65) alldefconfig randconfig listnewconfig olddefconfig syncconfig \
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 66) helpnewconfig yes2modconfig mod2yesconfig
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 67)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 68) PHONY += $(simple-targets)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 69)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 70) $(simple-targets): $(obj)/conf
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 71) $(Q)$< $(silent) --$@ $(Kconfig)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 72)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 73) PHONY += savedefconfig defconfig
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 74)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 75) savedefconfig: $(obj)/conf
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 76) $(Q)$< $(silent) --$@=defconfig $(Kconfig)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 77)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 78) defconfig: $(obj)/conf
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 79) ifneq ($(wildcard $(srctree)/arch/$(SRCARCH)/configs/$(KBUILD_DEFCONFIG)),)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 80) @$(kecho) "*** Default configuration is based on '$(KBUILD_DEFCONFIG)'"
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 81) $(Q)$< $(silent) --defconfig=arch/$(SRCARCH)/configs/$(KBUILD_DEFCONFIG) $(Kconfig)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 82) else
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 83) @$(kecho) "*** Default configuration is based on target '$(KBUILD_DEFCONFIG)'"
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 84) $(Q)$(MAKE) -f $(srctree)/Makefile $(KBUILD_DEFCONFIG)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 85) endif
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 86)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 87) %_defconfig: $(obj)/conf
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 88) $(Q)$< $(silent) --defconfig=arch/$(SRCARCH)/configs/$@ $(Kconfig)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 89)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 90) configfiles=$(wildcard $(srctree)/kernel/configs/$@ $(srctree)/arch/$(SRCARCH)/configs/$@)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 91)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 92) %.config: $(obj)/conf
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 93) $(if $(call configfiles),, $(error No configuration exists for this target on this architecture))
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 94) $(Q)$(CONFIG_SHELL) $(srctree)/scripts/kconfig/merge_config.sh -m .config $(configfiles)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 95) $(Q)$(MAKE) -f $(srctree)/Makefile olddefconfig
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 96)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 97) PHONY += kvmconfig
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 98) kvmconfig: kvm_guest.config
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 99) @echo >&2 "WARNING: 'make $@' will be removed after Linux 5.10"
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 100) @echo >&2 " Please use 'make $<' instead."
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 101)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 102) PHONY += xenconfig
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 103) xenconfig: xen.config
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 104) @echo >&2 "WARNING: 'make $@' will be removed after Linux 5.10"
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 105) @echo >&2 " Please use 'make $<' instead."
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 106)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 107) PHONY += tinyconfig
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 108) tinyconfig:
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 109) $(Q)$(MAKE) -f $(srctree)/Makefile allnoconfig tiny.config
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 110)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 111) # CHECK: -o cache_dir=<path> working?
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 112) PHONY += testconfig
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 113) testconfig: $(obj)/conf
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 114) $(Q)$(PYTHON3) -B -m pytest $(srctree)/$(src)/tests \
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 115) -o cache_dir=$(abspath $(obj)/tests/.cache) \
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 116) $(if $(findstring 1,$(KBUILD_VERBOSE)),--capture=no)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 117) clean-files += tests/.cache
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 118)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 119) # Help text used by make help
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 120) help:
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 121) @echo ' config - Update current config utilising a line-oriented program'
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 122) @echo ' nconfig - Update current config utilising a ncurses menu based program'
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 123) @echo ' menuconfig - Update current config utilising a menu based program'
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 124) @echo ' xconfig - Update current config utilising a Qt based front-end'
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 125) @echo ' gconfig - Update current config utilising a GTK+ based front-end'
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 126) @echo ' oldconfig - Update current config utilising a provided .config as base'
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 127) @echo ' localmodconfig - Update current config disabling modules not loaded'
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 128) @echo ' except those preserved by LMC_KEEP environment variable'
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 129) @echo ' localyesconfig - Update current config converting local mods to core'
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 130) @echo ' except those preserved by LMC_KEEP environment variable'
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 131) @echo ' defconfig - New config with default from ARCH supplied defconfig'
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 132) @echo ' savedefconfig - Save current config as ./defconfig (minimal config)'
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 133) @echo ' allnoconfig - New config where all options are answered with no'
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 134) @echo ' allyesconfig - New config where all options are accepted with yes'
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 135) @echo ' allmodconfig - New config selecting modules when possible'
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 136) @echo ' alldefconfig - New config with all symbols set to default'
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 137) @echo ' randconfig - New config with random answer to all options'
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 138) @echo ' yes2modconfig - Change answers from yes to mod if possible'
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 139) @echo ' mod2yesconfig - Change answers from mod to yes if possible'
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 140) @echo ' listnewconfig - List new options'
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 141) @echo ' helpnewconfig - List new options and help text'
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 142) @echo ' olddefconfig - Same as oldconfig but sets new symbols to their'
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 143) @echo ' default value without prompting'
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 144) @echo ' tinyconfig - Configure the tiniest possible kernel'
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 145) @echo ' testconfig - Run Kconfig unit tests (requires python3 and pytest)'
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 146)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 147) # ===========================================================================
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 148) # object files used by all kconfig flavours
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 149) common-objs := confdata.o expr.o lexer.lex.o parser.tab.o preprocess.o \
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 150) symbol.o util.o
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 151)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 152) $(obj)/lexer.lex.o: $(obj)/parser.tab.h
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 153) HOSTCFLAGS_lexer.lex.o := -I $(srctree)/$(src)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 154) HOSTCFLAGS_parser.tab.o := -I $(srctree)/$(src)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 155)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 156) # conf: Used for defconfig, oldconfig and related targets
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 157) hostprogs += conf
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 158) conf-objs := conf.o $(common-objs)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 159)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 160) # nconf: Used for the nconfig target based on ncurses
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 161) hostprogs += nconf
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 162) nconf-objs := nconf.o nconf.gui.o $(common-objs)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 163)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 164) HOSTLDLIBS_nconf = $(shell . $(obj)/nconf-cfg && echo $$libs)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 165) HOSTCFLAGS_nconf.o = $(shell . $(obj)/nconf-cfg && echo $$cflags)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 166) HOSTCFLAGS_nconf.gui.o = $(shell . $(obj)/nconf-cfg && echo $$cflags)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 167)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 168) $(obj)/nconf.o $(obj)/nconf.gui.o: $(obj)/nconf-cfg
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 169)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 170) # mconf: Used for the menuconfig target based on lxdialog
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 171) hostprogs += mconf
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 172) lxdialog := $(addprefix lxdialog/, \
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 173) checklist.o inputbox.o menubox.o textbox.o util.o yesno.o)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 174) mconf-objs := mconf.o $(lxdialog) $(common-objs)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 175)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 176) HOSTLDLIBS_mconf = $(shell . $(obj)/mconf-cfg && echo $$libs)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 177) $(foreach f, mconf.o $(lxdialog), \
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 178) $(eval HOSTCFLAGS_$f = $$(shell . $(obj)/mconf-cfg && echo $$$$cflags)))
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 179)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 180) $(addprefix $(obj)/, mconf.o $(lxdialog)): $(obj)/mconf-cfg
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 181)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 182) # qconf: Used for the xconfig target based on Qt
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 183) hostprogs += qconf
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 184) qconf-cxxobjs := qconf.o qconf-moc.o
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 185) qconf-objs := images.o $(common-objs)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 186)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 187) HOSTLDLIBS_qconf = $(shell . $(obj)/qconf-cfg && echo $$libs)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 188) HOSTCXXFLAGS_qconf.o = $(shell . $(obj)/qconf-cfg && echo $$cflags)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 189) HOSTCXXFLAGS_qconf-moc.o = $(shell . $(obj)/qconf-cfg && echo $$cflags)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 190)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 191) $(obj)/qconf.o: $(obj)/qconf-cfg
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 192)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 193) quiet_cmd_moc = MOC $@
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 194) cmd_moc = $(shell . $(obj)/qconf-cfg && echo $$moc) $< -o $@
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 195)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 196) $(obj)/qconf-moc.cc: $(src)/qconf.h $(obj)/qconf-cfg FORCE
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 197) $(call if_changed,moc)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 198)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 199) targets += qconf-moc.cc
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 200)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 201) # gconf: Used for the gconfig target based on GTK+
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 202) hostprogs += gconf
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 203) gconf-objs := gconf.o images.o $(common-objs)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 204)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 205) HOSTLDLIBS_gconf = $(shell . $(obj)/gconf-cfg && echo $$libs)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 206) HOSTCFLAGS_gconf.o = $(shell . $(obj)/gconf-cfg && echo $$cflags)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 207)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 208) $(obj)/gconf.o: $(obj)/gconf-cfg
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 209)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 210) # check if necessary packages are available, and configure build flags
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 211) filechk_conf_cfg = $(CONFIG_SHELL) $<
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 212)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 213) $(obj)/%conf-cfg: $(src)/%conf-cfg.sh FORCE
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 214) $(call filechk,conf_cfg)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 215)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 216) clean-files += *conf-cfg