1 # ===========================================================================
2 # Kernel configuration targets
3 # These targets are used from top-level makefile
5 KCONFIG_TOP = Config.in
6 KCONFIG_PROJECT = ToyBox
8 PHONY += clean help oldconfig menuconfig config silentoldconfig \
9 randconfig allyesconfig allnoconfig allmodconfig defconfig
11 menuconfig: $(obj)/mconf $(KCONFIG_TOP)
14 config: $(obj)/conf $(KCONFIG_TOP)
17 oldconfig: $(obj)/conf $(KCONFIG_TOP)
20 silentoldconfig: $(obj)/conf $(KCONFIG_TOP)
23 randconfig: $(obj)/conf $(KCONFIG_TOP)
24 $< -r $(KCONFIG_TOP) > /dev/null
26 allyesconfig: $(obj)/conf $(KCONFIG_TOP)
27 $< -y $(KCONFIG_TOP) > /dev/null
29 allnoconfig: $(obj)/conf $(KCONFIG_TOP)
30 $< -n $(KCONFIG_TOP) > /dev/null
32 defconfig: $(obj)/conf $(KCONFIG_TOP)
33 $< -D /dev/null $(KCONFIG_TOP) > /dev/null
35 # Help text used by make help
37 @echo ' config - Update current config utilising a line-oriented program'
38 @echo ' menuconfig - Update current config utilising a menu based program'
39 @echo ' oldconfig - Update current config utilising a provided .config as base'
40 @echo ' silentoldconfig - Same as oldconfig, but quietly'
41 @echo ' randconfig - New config with random answer to all options'
42 @echo ' defconfig - New config with default answer to all options'
43 @echo ' This is the maximum sane configuration.'
44 @echo ' allyesconfig - New config where all options are accepted with yes'
45 @echo " This may not actually compile, it's a starting point"
46 @echo ' for further configuration (probably with menuconfig)'
47 @echo ' allnoconfig - New config where all options are answered with no'
48 @echo ' (NOP binary, starting point for further configuration)'
52 SHIPPED = kconfig/zconf.tab.c kconfig/lex.zconf.c kconfig/zconf.hash.c
55 @ln -s $(notdir $<) $@
59 kconfig/mconf: $(SHIPPED)
60 $(HOSTCC) -o $@ kconfig/mconf.c kconfig/zconf.tab.c \
61 kconfig/lxdialog/*.c -lcurses -DCURSES_LOC="<ncurses.h>" \
62 -DKBUILD_NO_NLS=1 -DPROJECT_NAME=\"$(KCONFIG_PROJECT)\"
64 kconfig/conf: $(SHIPPED)
65 $(HOSTCC) -o $@ kconfig/conf.c kconfig/zconf.tab.c -DKBUILD_NO_NLS=1 \
66 -DPROJECT_NAME=\"$(KCONFIG_PROJECT)\"
69 rm -f $(wildcard kconfig/*zconf*.c) kconfig/conf kconfig/mconf